Skip to main content

List of all our extensions

Create an account

Remove multiple products at once from the cart

Remove multiple products at once from the cart was created by keep2000

Posted 7 months 2 weeks ago #162
When you remove a product from the cart, VM has a trigger: vDispatcher::trigger('plgVmOnRemoveFromCart',array($this,$prod_id));
I use this to remove binded products like when there is a phone and a case in the cart and you remove the phone, the plugin removes the case as well.
The cart management does work, but there is a bit of issue with the display.
For testing add this to a vmcustom plugin:
Code:
    function plgVmOnRemoveFromCart( &$cart, $prod_id )     {         unset($cart->product[$prod_id+1]);         unset($cart->cartProductsData[$prod_id+1]);     }
Add two products to the cart, and remove the first one.
The expected behavior: it should show an empty cart, because VM removed the first product and the plugin removed the second one.

Actual behavior:
vmuikitx removes the first product, but the second one is still there. The cart module already shows 0 products. When I refresh the checkout page, it's empty.
 

Please Log in or Create an account to join the conversation.

Replied by keep2000 on topic Remove multiple products at once from the cart

Posted 7 months 2 weeks ago #166
maybe a quick solution is an optional non-ajax version for removing products

Please Log in or Create an account to join the conversation.

Time to create page: 0.594 seconds
Powered by Kunena Forum
Joomla 4.0 supported
6 months support & updates
6 months of access to support and downloads/updates. The extensions will keep working after this period.
Joomla 3.10 supported
Unlimited Websites
You can install all our extensions on as many websites as you like.
Wordpress version available
Custom Development
If you encounter any problems with your website that does not cover support we might offer you a custom quote to help you.
Look for these icons for available supported platforms:
Joomla 4.0 supported
Joomla® 5.x support
New Joomla® 5 supported!
Joomla 3.10 supported
Joomla® 3.x support
Joomla® 3.9 / 3.10 supported
Wordpress version available
Wordpress version
Alternative WP version available

Extension list

yootheme

ecommerce

joomla