I am trying to find a way to add products to cart using from a CMS page using a foreach loop which displays the list of products from a specific category. The problem is that my add to cart form will only submit one of the products to the cart.
Could anyone point me in the right direction, I've been here for hours!
I'm not sure if it is my form or if this is even possible in Magento but I'd appreciate som advice...
Thankyou for your response. Although the code you posted is correct I am trying to use a slightly different method.
I have used catalog_product_list_related and included an add to cart button and dropdown quantity chooser.
The problem now is that I cannot add more than on +1 item to the cart even if I select a quantity of 5. However, only the last product in the list allows me to choose a quantity....
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Well, essentially you are using the code I posted by using the getAddToCartUrl(). It produces code very similar to what I posted it just uses it as a form action.
I'm not going to object but in the spirit of this site, you should have accepted my response instead of requesting deletion.
rafique12
ASKER
I can now add related products to the shopping cart from a CMS page
Open in new window