Jump to content

Recommended Posts

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 by jorgeferpas (see edit history)
Link to comment
Share on other sites

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

×
×
  • Create New...