chartalex Posted July 30, 2011 Share Posted July 30, 2011 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} Link to comment Share on other sites More sharing options...
chartalex Posted July 30, 2011 Author Share Posted July 30, 2011 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 More sharing options...
Richard S Posted August 1, 2011 Share Posted August 1, 2011 There might be problems with Smarty3. You can either use Smarty 2 until PS 1.5 which will come on September/November, or rewrite some sentences to Smarty 3 as their are not compatible with Smarty 2. You might use the documentation: http://www.smarty.net/documentation Link to comment Share on other sites More sharing options...
chartalex Posted August 1, 2011 Author Share Posted August 1, 2011 Thanks a lot Richard! I am going to try to understand this smarty3. Do you know in which file the vars/functions are declared for product-list? Because it looks like the hierarchy changed a lot between 1.2.5 and 1.4... Link to comment Share on other sites More sharing options...
chartalex Posted August 1, 2011 Author Share Posted August 1, 2011 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 More sharing options...
chartalex Posted August 13, 2011 Author Share Posted August 13, 2011 Up! Someone who know well PS can help on this ?? Link to comment Share on other sites More sharing options...
Richard S Posted August 16, 2011 Share Posted August 16, 2011 The problem is definitely in your theme or core modifications. No one could help without seeing the code and etc. Up! Someone who know well PS can help on this ?? 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