Jump to content

"Add to Cart" bug with new_products module.


cfocket

Recommended Posts

Hi there,

 

I've been trying to implement the new_products block on my homepage but I meet difficulties when adding a new product to the cart.

 

Indeed, when adding a product to the cart it doesn't get the required one. (That would be, "new_products.0","new_products.1" or "new_products.2").

 

You can see the issue on the following link (http://tcacleaner.com/dev2/) in the category "NOUVEAUX PRODUITS" at the bottom of the page.

 

I tried to change the following bit of code from the newproducts.tpl file, but without success.

 

<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&id_product={$product.id_product}&token={$static_token}&add"></a>

 

Though, I managed to target the required product from the "Détails" button with the following modifications.

 

<a class="button" href="{$new_products.0.link}" title="{l s='Détails' mod='homefeatured'}">{l s='Détails' mod='homefeatured'}</a>

 

What should I do to get it right ?

 

Many thanks for your help.

 

Clément

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