explodedk Posted May 13, 2014 Share Posted May 13, 2014 i got a problem on my webshop . when i add a function to a product it shows the function twice. if i add more than 1 function it only shows the last function twice.. see it here : http://billigedufte.dk/eau-de-toilette/3-versace-bright-crystal-30ml.html i've tried to illustrate it on the attachment here : and the code from the product.tpl {if isset($features) && $features} <!-- Data sheet --> <section class="page-product-box"> <h3 class="page-product-heading">{l s='Information om produktet'}</h3> <table class="table-data-sheet"> {foreach from=$features item=feature} <tr class="{cycle values="odd,even"}"> {if isset($feature.value)} <td>{$feature.name|escape:'html':'UTF-8'}</td> <td>{$feature.value|escape:'html':'UTF-8'}</td> {/if} </tr> {/foreach} </table> </section> <!--end Data sheet --> {/if} Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 problem is always related to last element? no matter how many and what features you have? Link to comment Share on other sites More sharing options...
explodedk Posted May 13, 2014 Author Share Posted May 13, 2014 yes - it is always the last element. if i only add 1 function, that one is dublicated. if i add another that one is. if i add 2+ the last one, and only the last one is getting dublicated. Link to comment Share on other sites More sharing options...
explodedk Posted May 14, 2014 Author Share Posted May 14, 2014 any idea Vekia (or others) Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2014 Share Posted May 14, 2014 use somewhere {$features|print_r} (outside the foreach loop) can you show what you see in output? Link to comment Share on other sites More sharing options...
explodedk Posted May 16, 2014 Author Share Posted May 16, 2014 (edited) use somewhere {$features|print_r} (outside the foreach loop) can you show what you see in output? the output is : Array ( [0] => Array ( [name] => Størrelse [value] => 90ml [id_feature] => 1 ) [1] => Array ( [name] => Mærke [value] => Gucci [id_feature] => 2 ) [2] => Array ( [name] => Kollektion [value] => Guilty [id_feature] => 3 ) [3] => Array ( [name] => Produkt Kategori [value] => Eau De Toilette [id_feature] => 4 ) [4] => Array ( [name] => Køn [value] => Mænd [id_feature] => 5 ) [5] => Array ( [id_product] => 4 [name] => Køn [value] => Mænd [id_feature] => 5 ) ) 1 Edited May 16, 2014 by explodedk (see edit history) Link to comment Share on other sites More sharing options...
explodedk Posted May 16, 2014 Author Share Posted May 16, 2014 (edited) it's not showing on all products. only on new products i add . no mather what category or feature it's added with/in Edited May 16, 2014 by explodedk (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2014 Share Posted May 16, 2014 i thought that the problem is related to tpl file but i see that in output this field is doubled, so the problem is probably somewhere in: a) php file database now you're saying that problem is related to only one product you changed something? Link to comment Share on other sites More sharing options...
explodedk Posted May 16, 2014 Author Share Posted May 16, 2014 No I corrected that part. It's not showing on my 3 first products but is showing on all new items I make... Link to comment Share on other sites More sharing options...
explodedk Posted May 19, 2014 Author Share Posted May 19, 2014 any idea what i could do Link to comment Share on other sites More sharing options...
explodedk Posted June 5, 2014 Author Share Posted June 5, 2014 Update in this case. The error is only when the product is NEW . if i disable "NEW" it doesn't show twice any idea? 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