tozi Posted January 30, 2014 Share Posted January 30, 2014 (edited) Hi all, where i have the error? Animation of products in product-list.tpl and homefeatured didnt work. web:http://mujtest.eu/obchodpetrklic/index.php?id_category=3&controller=category ajax-cart.js ,selectors is there // 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(); In products-list.tpl {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)}" title="{l s='Add to cart'}"><span></span>{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)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> {/if} Any idea? Edited February 1, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 31, 2014 Share Posted January 31, 2014 try adding another .parent() to the $element selector Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2014 Share Posted January 31, 2014 additional parent doesn't work in addition, there is no error in browser console - usually in cases like that we can find some errors (related to undefined image) can you disable labels addon for a moment? Link to comment Share on other sites More sharing options...
tozi Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) Milos and where it is disable? edit: i have the ajax-cart.js in mytheme/js/modules/blockcart Nemo 1: i'm add 1,2,3,4,5 parent, but didn't work Edited January 31, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2014 Share Posted January 31, 2014 i mean that you use label addons (these images on each product on category listing, you're selling it) can you for test purposes disable this addon>? by the way, i can't open yur website anymore: Link to comment Share on other sites More sharing options...
tozi Posted January 31, 2014 Author Share Posted January 31, 2014 Please try now. Module i turned off.. Link to comment Share on other sites More sharing options...
tozi Posted January 31, 2014 Author Share Posted January 31, 2014 Any idea guys? I have tried what I thought. But does not work for me. Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2014 Share Posted January 31, 2014 ok, i've got it! you removed id="shopping_cart" from object: add it there and everything will work Link to comment Share on other sites More sharing options...
tozi Posted January 31, 2014 Author Share Posted January 31, 2014 I add. But didnt work. <ul id="header_nav"> {if !$PS_CATALOG_MODE} <li class="user_cart" id="shopping_cart"> <a href="{$link->getPageLink($order_process, true)}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow"><img src="{$img_dir}basket.png" alt="cart-icon" width="46" height="46" /></a> <div class="cart_wrapper" > <a href="{$link->getPageLink($order_process, true)}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow"> <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span> <span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span> <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span> <span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}"> Link to comment Share on other sites More sharing options...
vekia Posted February 1, 2014 Share Posted February 1, 2014 oops i forgot about second part, now add parent() as nemo suggested change var $element = $(callerElement).parent().parent().find('a.product_image img,a.product_img_link img'); to var $element = $(callerElement).parent().parent().parent().find('a.product_image img,a.product_img_link img'); Link to comment Share on other sites More sharing options...
tozi Posted February 1, 2014 Author Share Posted February 1, 2014 It woooorks!!! Thanks a lot. If you'll in my part of the world I invite you in a beer or something else...juice. 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