Jump to content

Change featured products to look exactly like product list


Recommended Posts

Just as the title says, I want to change the display of the featured products to look exactly like the product lists that occur further in the site.

 

Using version 1.4.5.1

 

Please tell me which files I need to edit.

 

Thanks

Link to comment
Share on other sites

Hello, you need to edit your CSS and maybe some HTML structure.

 

Create a new catalog called "homefeatured" in your theme catalog /themes/yourthemename/modules/ and copy a file called homefeatured.tpl from /modules/homefeatured/ to your newly created catalog. Then edit this file upon your needs.

 

In addition, you should find the right stylesheet coding in /themes/yourthemename/css/global.css

 

Do not forget to create backup files.

 

or you can just copy the main structure of products from your theme catalog category.tpl file to this newly created homefeatured.tpl

Link to comment
Share on other sites

Your answer is pretty vague. No offense but I am just not familiar enough with the file structure of prestashop.

 

I tried replacing homefeatured.tpl with one I modified. But when I reload the page there is NO change whatsoever.

 

I tried creating the folder

/themes/yourthemename/modules/css/homefeatured

and copying it there

 

Then I copied the file into

modules/homefeatured

 

Still no change.

 

I Even went and deleted most of the information in homefeatured.tpl

 

<div id="featured-products_block_center" class="block products_block">
<h4>{l s='Featured products' mod='homefeatured'}</h4>
{if isset($products) AND $products}
 <div class="block_content">
  {assign var='liHeight' value=342}
  {assign var='nbItemsPerLine' value=4}
  {assign var='nbLi' value=$products|@count}
  <ul style="height:{$ulHeight}px;">
  {foreach from=$products item=product name=homeFeaturedProducts}
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./product-list.tpl" products=$products}
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl"}
  {/foreach}
  </ul>
 </div>
{else}
 <p>{l s='No featured products' mod='homefeatured'}</p>
{/if}
</div>

 

This is all I have left in there

 

And still it loads as if there is NO change.

 

What files am I missing?

Link to comment
Share on other sites

I think you just did not recompile your Smarty. When developing you need to enable Froce compile in BackOffice Preferences -> Performance tab.

 

The simplest way to do this is to modify homefeatured.tpl in /modules/homefeatured/ and you see the changes. However, by doing this you will not be able to update this module in the future as it is changed and everything will disappear when updating. For that, you need to copy the file /modules/homefeatured/homefeatured.tpl to /themes/yourthemename/modules/homefeatured/homefeatured.tpl Maybe I was not clear in this part enough. And do all modifications in /themes/yourthemename/modules/homefeatured/homefeatured.tpl file. You should see the changes.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...