Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Adding Items to the cart (by sku)
 
bcelenza
Member
 
Avatar
Total Posts:  44
Joined:  2008-08-27
 

Hello.

I have an instance where I’m going to need to programmatically add mutliple items to the cart, by their sku. I’ve noticed the cart object has an addByProductIds() method, which I can use as a backup. The bigger question is, what is the right way to go about this? Do I need to get the session instance of the cart in my controller and add it there?

I guess I just don’t know where to start. Any help would be greatly appreciated. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top