I want to make Cart order list empty after a new product has been added to the cart. In fact only on product every time can be in cart. Tanx
相关问题
- Adding a custom button after add to cart button in
- Extend prestashop webservice resource
- Checking that a specific attribute value is used i
- Decision tree using continuous variable
- Which Hook is running after Woocommerce update car
相关文章
- Prestashop 1.6 Create Module to Display Carrier Fi
- Allow only one product category in cart at once in
- Prestashop and web service(Restful), HttpURLConnec
- How to change content of order confirmation email
- Search products in a specific category
- Set a minimal order amount for a specific User rol
- How to remove the single cart item using codeignit
- WooCommerce discount: buy one get one 50% off
2 ways to add your custom logic :
override "add" and "update" methods in "Cart" class (/override/classes/Cartp.php)Edit : The 2nd way os wrong because infinite update loop.
Here is a module that do it :
For people using Prestashop v 1.4.9 and have created a module:
call
global $smarty, $cart;
then run the function
$cart->delete();