Created
October 24, 2018 18:42
-
-
Save nagygabor/7072dd190414f238cd22cf3e363f6903 to your computer and use it in GitHub Desktop.
Kosár darabszám változás után automatikus újraszámolás legyen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Kosár darabszám változás után automatikus újraszámolás legyen | |
| //https://gist.github.com/mikaelz/f41e29c6a99a595602e4 | |
| function xnagyg_cart_update_qty_script() { | |
| if (is_cart()) : | |
| ?> | |
| <script> | |
| jQuery('div.woocommerce').on('change', '.qty', function(){ | |
| jQuery("[name='update_cart']").removeAttr('disabled'); | |
| jQuery("[name='update_cart']").trigger("click"); | |
| }); | |
| </script> | |
| <?php | |
| endif; | |
| } | |
| add_action( 'wp_footer', 'xnagyg_cart_update_qty_script' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment