php - WooCommerce Cart page needs to update live without the Update Cart button -
After changing the quantity of the Wuyisers store, the cart page needs to be updated after I am working on it. Also, there can not currently be an updated cart button by default. Any ideas on how this could happen, possibly with AJAX or any other clue?
Any help would be great! Currently the cart of our page is the same and it should be for example.
What have I tried so far:
-
Trying to search for update cart method is automatically unable to find what was changing cart subtotals .
-
Also tried to use AJAX to re-print the page without reloading. This was just reloaded the whole page, but the volume was still the same
This script we tried:
without user clicking the "update cart" button. It is not AJAX, but it is an easy way to complete.
Actually, if the user changes the amount of any item, then after the user exits the product-quantity TD, the car It automatically uses the .igigre () jQuery event handler to submit the form.
Just use this jQuery code:
jQuery (document) .ready (function () {Var itemQtyInitial; JQuery ('.woocommerce table.cart tr.cart_item .product-quantity'). Hover (function () {itemQtyInitial = jQuery ('. Qty', this) .val ();}, function () {var ItemQtyExit = jQuery ('. Qty', this) .val (); if (idictinal! = Itemquotext) {jQuery (".button [name = 'update_cart']"). Trigger ("click");}}); }); Then you can hide the "Update Cart" button with this CSS:
.woocommerce table.cart td.actions input [name = "update_cart " ] { display none; } This should work!
Comments
Post a Comment