Knowledgebase: On Sale
How do I add the On Sale discounts to the Related or Upselling products on my main product display page?
Posted by - NA - on 01 December 2010 10:15 AM
/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 //




skin1/modules/Upselling_Products/related_products.tpl

Find this code near line 21:


{$lng.lbl_our_price}: {include file="currency.tpl" value=$product_links[cat_num].price}


CHANGE it to:


{$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}
{* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}
{include file="modules/On_Sale/onsale_img_display.tpl" onsale=$product_links[cat_num].onsale}{/if}{* END On Sale :: alteredcart.com *}




skin1/modules/Recommended_Products/recommends.tpl

Find this code near line 21:


{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].taxed_price}


CHANGE it to:


{$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}
{* On Sale :: alteredcart.com *}{if $active_modules.On_Sale}
{include file="modules/On_Sale/onsale_img_display.tpl" onsale=$recommends[num].onsale}{/if}{* END On Sale :: alteredcart.com *}



Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: