cart
cart copied to clipboard
teaser plugin, addToCartByAjax will not work
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.
I'll fix this asap.
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(); });
Any idea when you can fix it?