How do I add the On Sale discounts to the Related or Upselling products on my main product display page?

By: Bill Brewer
Created: May 07, 2009 2:13 PM
Last Modified: Oct 05, 2012 11:09 AM
1 Rating | 0 Comments
/modules/Upselling_Products/related_products.php

Find this code near line 49:

if (!empty($product_links))     $smarty->assign("product_links",$product_links);
Immediately BEFORE insert this code:

// On Sale :: www.alteredcart.com // if ($active_modules['On_Sale']){     $products = $product_links;     require $xcart_dir."/modules/On_Sale/onsale_products.php";     $product_links = $products; } // End On Sale //
/recommends.php

Find this code near line 76:

if (!empty($recommends))     $smarty->assign("recommends", $recommends);
Immediately BEFORE insert this code:

// On Sale :: www.alteredcart.com // if ($active_modules['On_Sale']){     $products = $recommends;     require $xcart_dir."/modules/On_Sale/onsale_products.php";     $recommends = $products; } // End On Sale //
<skin_dir>/modules/Upselling_Products/related_products.tpl

Find this code near line 21:

<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$product_links[cat_num].price}</font>
CHANGE it to:

<font class="ProductPrice">{$lng.lbl_our_price}: {* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}{include file="modules/On_Sale/onsale_currency.tpl" price=$product_links[cat_num].original_price}{/if}{* END On Sale :: alteredcart.com *} {include file="currency.tpl" value=$product_links[cat_num].taxed_price}</font> {* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}<br />{include file="modules/On_Sale/onsale_img_display.tpl" onsale=$product_links[cat_num].onsale}{/if}{* END On Sale :: alteredcart.com *}
<skin_dir>/modules/Recommended_Products/recommends.tpl

Find this code near line 21:

<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].taxed_price}</font>
CHANGE it to:

<font class="ProductPrice">{$lng.lbl_our_price}: {* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}{include file="modules/On_Sale/onsale_currency.tpl" price=$recommends[num].original_price}{/if}{* END On Sale :: alteredcart.com *} {include file="currency.tpl" value=$recommends[num].taxed_price}</font> {* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}<br />{include file="modules/On_Sale/onsale_img_display.tpl" onsale=$recommends[num].onsale}{/if}{* END On Sale :: alteredcart.com *}

Still Have Questions?

If you are unable to find a solution in the knowledgebase please open a support ticket for a personal response from the support desk.

Related Articles

Rate or comment on this article

Rate This Article (Select a star)

Excellent

+ Add Comment

You must be logged in to add a comment.