Jump to content

[TIPS & TRICKS] How to show old and discount prices on homefeatured page


Recommended Posts

The upgrade from 1.5.5.0 to 1.5.6.0 overwrites this 'feature' and I only group the coding in one thread. All the suggestions, by different coding experts are posted in threads all over this forum and other outside forums.

 

Thought it will be easier for other members to make the changes if they want this feature to show in their shops.

 

(I do not take credit for these changes) I could not find a category to post this in and if the mods want to move it, please do so.

 

(Bookmark this thread for future reference)

 

Go to themes/YOUR THEME/modules/homefeatured/homefeatured.tpl

 

Find this code:

{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if 

Add the following code above or beneath the above code (it's up to you)

{if ((isset($product.on_sale) && $product.on_sale) || (isset($product.reduction) && $product.reduction)) && $product.price_without_reduction > $product.price && $product.show_price AND !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
			<p class="price_container"><span class="old_price_home">
			  {convertPrice price=$product.price_without_reduction}
			</span></p>{else}<div style="height:21px;"></div>{/if}

-----------------------------------------------------------------------------------------------------------------------------------

 

Go to themes/YOUR THEME/css/global.css

 

Add the following code at the bottom of the file:

.old_price_home {  text-decoration: line-through;  font-size: 14px;  font-family: Verdana, Arial, Helvetica, Sans-Serif;  color: #5d717e;  }

-----------------------------------------------------------------------------------------------------------------------------------

 

If you see your second line of products overlap your prices of the top line of products...

 

Go to modules/homefeatured/homefeatured.css

 

Find this code and just change 240px to 260px

#featured-products_block_center li {
	margin-right:10px;
	padding:10px 0;
	width:126px;
	height:240px

 Hope this will help other members to make the changes easier. :)

Edited by sanax (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 4 months later...
×
×
  • Create New...