Pierre SKLI Posted February 27, 2011 Share Posted February 27, 2011 Hi everybody,It's been a week I've been digging into Prestashop for an e-commerce website, and that's a very good OpenSource code...My client would like a special functionality: he'd like visitors to buy only 1 product from the website. If 1 product is already in the shopping cart, it should shows an error.Does anyone know the $variable to know the current number of product in the cart, and also in which file I should put my "if ($product_cart == 1)..." to check this before adding a new product?I tried some code in cart.php, but doesn't seem to work... Anyway, once I have the $variable of current number of products in the cart, I'll be able to hide all the "add to card" buttons.Thanks for the help,Pierre Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now