Quite a few people have asked for this, so here we go...
eg.
As low as ё199 each!
1) In products.php
AND include/search.php
Before...
Code:
$smarty->assign("products",$products);
Insert...
Code:
##########################################
# Display Lowest Wholesale Prices Start
if (!empty($products) && !empty($active_modules["Wholesale_Trading"]))
foreach($products as $i=>$p) {
$productid=$p["productid"];
include $xcart_dir."/modules/Wholesale_Trading/product.php";
if ($wresult)
$products[$i]["wholesale"] = $wresult;
}
$smarty->assign("product_wholesale", "");
$smarty->assign("products_wholesale", $products_wholesale);
# Display Lowest Wholesale Prices End
##########################################
2) In featured_products.php
Before...
Code:
$smarty->assign("f_products",$products);
Insert...
Code:
##########################################
# Display Lowest Wholesale Prices Start
if (!empty($featured_products) && !empty($active_modules["Wholesale_Trading"]))
foreach($featured_products as $i=>$p) {
$productid=$p["productid"];
include $xcart_dir."/modules/Wholesale_Trading/product.php";
if ($wresult)
$products[$i]["wholesale"] = $wresult;
}
$smarty->assign("product_wholesale", "");
$smarty->assign("products_wholesale", $products_wholesale);
# Display Lowest Wholesale Prices End
##########################################
3) Create a new file...
skin1/customer/main/
products_prices.tpl
Code:
{* Display Lowest Wholesale Prices Start *}
{if $product_wholesale ne ""}
{section name=wi loop=$product_wholesale}
{if $smarty.section.wi.last}{$lng.lbl_as_low_as} {include file="currency.tpl" value=$product_wholesale[wi].taxed_price} {$lng.lbl_each}!{/if}
{/section}
{/if}
{* Display Lowest Wholesale Prices End *}
4) If displaying products in columns...
In skin1/customer/main/products_t.tpl
Insert...
Code:
{* Display Lowest Wholesale Prices Start *}
{include file="customer/main/products_prices.tpl" product_wholesale=$products[product].wholesale}
{* Display Lowest Wholesale Prices End *}
Otherwise add the above code to skin1/customer/main/products.tpl
5) Add two new language labels with this SQL patch...
Code:
INSERT INTO xcart_languages SET code='US', name='lbl_as_low_as', value='As low as', topic='Labels';
INSERT INTO xcart_languages SET code='US', name='lbl_each', value='each', topic='Labels';
6) Run cleanup.php
Made for v4.1.x but should work in v4.0.x also.
