Jump to content

Attributes buttons in Product List (1.2 => 1.4)


Recommended Posts

Hi all,

 

I would like to upgrade our shop from 1.2.5 to 1.4 but one integration we did seems not to run anymore on the last version.

 

Indeed, in product-list of 1.2.5 version we show multiple buttons (one per attribute) under each product. (see attached)

 

But in the last version, this code doesn t work anymore. i try to change vars in the foreach but still does not work.

 

Does anyone can help?

 

 {foreach from=$product.combinaisons item=combinaison name=homedeclinaisons}

   <a class="bt_tailles ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&id_product={$product.id_product}&id_product_attribute={$combinaison.id_product_attribute}&token={$static_token}&add" title="{l s='Add to cart' mod='homedeclinaisons'}">{$combinaison.attribute_name}</a>

 {/foreach}

post-188580-0-73763900-1312064164_thumb.png

Link to comment
Share on other sites

I find how to upgrade buttons code: (Working)

 

<a class="bt_tailles ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&id_product={$product.id_product}&id_product_attribute={$product.id_product_attribute}&token={$static_token}&add" title="{l s='Add to cart' mod='homedeclinaisons'}">{$product.id_product_attribute}</a>

 

But this part is still not working:

 

{foreach from=$product.combinaisons item=product name=homedeclinaisons}

 

I must replace from, item and name but i don't know by what...

 

Please help!

Link to comment
Share on other sites

Note from Smarty3

 

This foreach syntax does not accept any named attributes. This syntax is new to Smarty 3, however the Smarty 2.x syntax {foreach from=$myarray key="mykey" item="myitem"} is still supported.

 

So it seems not to be caused by smarty3.

 

Any idea for the good vars?

Link to comment
Share on other sites

  • 2 weeks later...

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