Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Help with shopping cart and AllowPurchase


Reply


855 Views

Avatar
funkncreative

Community Member, 4 Posts

28 July 2009 at 8:31am

Could someone please help me with this...

First off, Im looking for a way to only allow one product at a time in the cart. The best way I can think of is clearing the cart just before adding a product, but I cannot figure out how to do it? I have tried in the 'Items Management' section of ShoppingCart.php, but could'n't get it to work.

Second, I want to set AllowPurchase on the product that is added to the cart to false, and then back to true if the order is cancelled.

I have been digging around the files and trying some stuff, but cant manage to get either happening.

please help