cart icon indicating copy to clipboard operation
cart copied to clipboard

teaser plugin, addToCartByAjax will not work

Open stephangrass opened this issue 6 years ago • 3 comments

addToCartByAjax will not work in teaser pugins, if more than one article is shown per page. In cart.js the action ist called by $("#add-product-form").submit(function(e) { ... } and in CatForm.html the add-to-cart form is inserted with <f:form pageUid="{pid}" id="add-product-form" ...

Changing id to class will work.

stephangrass avatar Jul 25 '18 07:07 stephangrass

I'll fix this asap.

extcode avatar Jul 25 '18 07:07 extcode

Oh! Fix! You also have to change:

  • put

<div class="form-message"></div> and <div class="form-success" style="display: none;">...</div> and <div class="form-error" style="display: none;">...</div> between the form tag

  • In cart.js you have to to something like: message = $form.find(".form-success").html(); $(message).appendTo($form.find(".form-message")).delay(2000).fadeOut("slow", function() { $(this).remove(); });

stephangrass avatar Jul 25 '18 07:07 stephangrass

Any idea when you can fix it?

stephangrass avatar Aug 27 '18 13:08 stephangrass