Jump to content

[SOLVED]Animation not working


Recommended Posts

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 by tozi (see edit history)
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...