tozi Posted January 11, 2014 Share Posted January 11, 2014 (edited) Hi all, animation does not work correctly when you add to cart. How can i fix it? web: http://horeka-shop.cz/test/ Edited January 12, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
tozi Posted January 12, 2014 Author Share Posted January 12, 2014 This is code of button {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} {else} <div class="exclusive">{l s='Add to cart'}</div><br /> {/if} Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2014 Share Posted January 12, 2014 problem isn't in button, roblem is in ajax-cart.js file located in blockcart module directory / add the picture to the cart var $element = $(callerElement).parent().parent().find('a.product_image img,a.product_img_link img'); if (!$element.length) $element = $('#bigpic'); var $picture = $element.clone(); var pictureOffsetOriginal = $element.offset(); pictureOffsetOriginal.right = $(window).innerWidth() - pictureOffsetOriginal.left - $element.width(); if ($picture.length) { $picture.css({ position: 'absolute', top: pictureOffsetOriginal.top, right: pictureOffsetOriginal.right }); } Link to comment Share on other sites More sharing options...
tozi Posted January 12, 2014 Author Share Posted January 12, 2014 Thanks Milos, the product list is already ok. But homefeatured animation still is not working properly. Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2014 Share Posted January 12, 2014 well, in this case it will be much better to modify the homefeatured.tpl than modify ajax-cart.js what to do? you've got there button <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_13" href="http://horeka-shop.cz/test/cart?add=1&id_product=13&token=a8f77afdf290a949c7639036973e78cc" title="Přidat do košíku">Přidat do košíku</a> insert it between div tag <div> <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_13" href="http://horeka-shop.cz/test/cart?add=1&id_product=13&token=a8f77afdf290a949c7639036973e78cc" title="Přidat do košíku">Přidat do košíku</a> </div> animation should work then Link to comment Share on other sites More sharing options...
tozi Posted January 12, 2014 Author Share Posted January 12, 2014 Thanks a lot. This is solved. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now