V
V
vremeno12017-04-27 17:53:17
WooCommerce
vremeno1, 2017-04-27 17:53:17

How to clear cart in woocommerce when adding product?

Hello, Can you please tell me how to make woocommerce
so that it would be impossible to add more than one product to the cart? I need the cart to be constantly reset, so that when a new product is added, the old one is deleted and replaced with a new one, the same goes for the number of products - there should always be one product in one copy ... Thus, the user always buys what he chose last time or just now, thus, the user always buys what he chose last time or just now.
It is important to add that the product is added by a link - http://MyDomain/checkout/?add-to-cart=7224

I need that when clicking on the link, all products from the cart are deleted and only this one (which is specified in the URL) remains. Can this be done somehow?

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WordPress WooCommerce, 2017-04-28
@maxxannik

Try this solution https://businessbloomer.com/woocommerce-allow-1-pr...
Should help.
You can also look for solutions to disable the recycle bin. In such a scenario, it is clearly redundant.

S
Site Developer, 2017-04-27
@secsite

Some kind of stupidity .. The basket just serves to put = collect goods into it.
If you do not need to collect, then as a be and a basket is not needed. Yes, and WC in general, too, in this case. There is not the right choice of tools for solving the problem.
Sell ​​/ buy immediately through the return form and all business.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question