1

I want that the all product/item on the cart will be empty and add the current selected product/item on the cart. Could the be possible?

  • What is the "current selected product"? What's the context? – benmarks Nov 24 '15 at 5:06
  • The current product has the product id only. – Alen Nov 24 '15 at 5:20
1

Mage::helper('checkout/cart')->getQuote()->removeAllItems(); should do the trick for removing all items. How you add the "current product" depends on the context.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.