Jump to content

Delete specific category product from cart summary - read description


Recommended Posts

i have a specific question:


i have some products in a category (ID 10 for exapmle), this products normally cant see in the navigation because its additional products and cannot ordering without ordering a product outside of category 10. this products can only add in the shopping cart summary page.


i add a normal product to the cart and after the summary page i can add over a fancybox a additional product from category 10 to the cart. This works.


But if i delete all normal products from the cart i also need to delete automatically all products from category 10 from the cart, because this product(s) cannot ordering without ordering normal products.


I think its something in ajax-cart.js but i dont know exactly the way to specify the category watch.


thanks for some help


Link to comment
Share on other sites

it's not a matter of ajax-cart.js

in this case you have to use hookactionCartSave

you need to check there what products cart has, and if there is no product required to have "some products in a category (ID 10 for exapmle)" - then php script should remove them from cart.

 

it can be done with php only, with custom module that uses hookactionCartSave or with modification of cart class functions update() and add()

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...