[FIX] website_sale: fix infinite recursion from product configurator

When the configurator modal is shown on the shop page (when the add to cart
button customize show is enabled), changing the quantity would trigger an
infinite recursion before this commit, because the selector was not finding the
input on the page (because it is not there), but it was not restrictive enough
so it matched the input on the modal itself.

PR: #32691
This commit is contained in:
Sébastien Theys
2019-05-21 08:44:46 +00:00
parent be5f07c612
commit e015ee5df3
@@ -131,7 +131,7 @@ sAnimations.registry.WebsiteSaleOptions = sAnimations.Class.extend(ProductConfig
*/
_onOptionsUpdateQuantity: function (quantity) {
this.$form
.find('input[name="add_qty"]')
.find('.js_main_product input[name="add_qty"]')
.first()
.val(quantity)
.trigger('change');