jorgeferpas Posted February 4, 2013 Share Posted February 4, 2013 (edited) Hi everyone, after hours of reading and trying to understand lots of code lines and make my own tries without any result, finally I have decided to share my problem with the community. The problem is the following: In my site, product features are VERY important, and I want them to show in almost any list of products, including blocknewproducts (got it!), homefeatured (got it too!), and blockbestsellers (here is the problem!). As you can see, the problem comes when I want to show product features on blockbestsellers. As far as I've seen, blocknewproducts and homefeatured get their product properties via Product.php, and blockbestsellers gets its product properties via ProductSale.php. In a very ridiculous way (I had to try it), I copy/pasted the code where Product.php gets the product features to ProductSale.php in override/classes. Something inside me told me it wouldn't work, but I did it anyway to be sure. Definitely I am not a PHP expert yet and I need some help with this. Maybe I am wrong and these .php files have nothing to do with this, I am not 100% sure of that. I didn't mention it yet, but I think it's clearly understood I copy/pasted the code who shows the feature products in the .tpl files. Well, that's all. If someone can help me with this I would appreciate it very much. Regards! Edited February 12, 2013 by jorgeferpas (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted February 4, 2013 Share Posted February 4, 2013 Do you have an accessible link to your Front Office- NewProducts, to see what you need exactly? Otherwise a pic showing what you need. What PS version do you use? Link to comment Share on other sites More sharing options...
jorgeferpas Posted February 4, 2013 Author Share Posted February 4, 2013 Hi, what I need is the module 'blockbestsellers' to show some product features just like does 'blocknewproducts'. You can see it in the following picture: http://i49.tinypic.com/jq15sm.jpg The thing is that this code works in blocknewproducts.tpl, but doesn't in blockbestsellers.tpl: {if $newproduct.features} {foreach from=$newproduct.features item=feature name=features} {if $feature.id_feature == 1}<a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}"><p class="brand">{$feature.value}</p>{/if} {if $feature.id_feature == 2}<p class="model">{$feature.value}</p></a>{/if} {if $feature.id_feature == 7}<p class="extra">{$feature.value}</p>{/if} {if $feature.id_feature == 5}<p class="extra">{$feature.value}</p>{/if} {if $feature.id_feature == 4}<p class="extra">{$feature.value}</p>{/if} {/foreach} {/if} Clearly I have replaced '$newproduct.features' with '$product.features'. I know the problem is not in the .tpl file because features are shown correctly on homefeatured.tpl too. Any idea? I still keep thinking that the file I have to modify is ProductSale.tpl in override/classes, but I don't know how to do it. But I'm not sure of that, so I will accept any idea. Thanks Another thing: how can I upload a photo to this forum? Link to comment Share on other sites More sharing options...
jorgeferpas Posted February 4, 2013 Author Share Posted February 4, 2013 I forgot to tell you, but I am using Prestashop 1.5.3 (fresh install, not upgrading). Anyway, in the tags you can see it. Link to comment Share on other sites More sharing options...
Recommended Posts