Jump to content

[SOLVED]homefeatured image animation


Recommended Posts

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

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

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

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...