Jump to content

[SOLVED] Add product feature attribute in Home Featured products


Recommended Posts

I am looking forward adding the piece of code in Home Featured that allows to use a product feature.

For example: {$features[5].value|escape:'htmlall':'UTF-8'}

 

Where is that piece of code that makes this possible?

 

Working under Prestashop 1.4.7

 

Best regards,

Edited by Herland (see edit history)
Link to comment
Share on other sites

To make things simple, you can sdirectly add it to modules/homefeatured/homefeatured.tpl. Somewhere between line 43 and 55. To do a cleaner thing, copy that file into your theme folder/modules/homefeatured (create the structure if doesn't exist, if the file already exist edit that one)

 

Of course, you'll need to force re-compile after the changes :)

Link to comment
Share on other sites

To make things simple, you can sdirectly add it to modules/homefeatured/homefeatured.tpl. Somewhere between line 43 and 55. To do a cleaner thing, copy that file into your theme folder/modules/homefeatured (create the structure if doesn't exist, if the file already exist edit that one)

 

Of course, you'll need to force re-compile after the changes :)

 

 

Voyage Mékong-Sapa tour randonnée-Voyage Laos

Grande, c'est ce que je dois savoir, je vous remercie pour le partage de ce sujet.

Edited by anhtu88 (see edit history)
Link to comment
Share on other sites

SOLVED. The code is used in product-list.tpl but can as well be used in Homefeatured

 

{foreach from=$product.features item=feature name=features}		
	 {if $feature.name == 'Release Date'}
	 {$feature.name|escape:'htmlall':'UTF-8'}:
		  {$feature.value|escape:'htmlall':'UTF-8'}

    {/if}
   {if $feature.name == 'Studio'}
   {$feature.name|escape:'htmlall':'UTF-8'}:
	    {$feature.value|escape:'htmlall':'UTF-8'}

   {/if}
   {foreachelse}
   Awaiting Release Details...
   {/foreach}

 

http://www.prestashop.com/forums/topic/33188-solved-product%E2%80%99s-features/

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
×
×
  • Create New...