Commit 154d0527 authored by Krystian Podemski's avatar Krystian Podemski
Browse files

fix adding to cart with the click on the icon

parent 5ab5b35a
......@@ -97,10 +97,10 @@ $(document).ready(() => {
$body.on('click', '[data-button-action="add-to-cart"]', (event) => {
event.preventDefault();
const $form = $(event.target.form);
const $form = $(event.currentTarget.form);
const query = `${$form.serialize()}&add=1&action=update`;
const actionURL = $form.attr('action');
const addToCartButton = $(event.target);
const addToCartButton = $(event.currentTarget);
addToCartButton.prop('disabled', true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment