I am trying to show the best price on the product page. I found some code from another topic to make this work , but it is not working with usercurrency. This is a plugin that will detect your IP country and change the currency. Im working with USD (default) and CAD.
Here is what i did
edit
includes\modules\YOUR_TEMPLATE\product_listing.php
find:
PHP Code:
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;
and replace with:
PHP Code:
//bof As low as price//
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000);
$lc_price = '$'.number_format($lc_price, 2);
$lc_align = 'right';
if ( zen_get_products_discount_price_qty((int)$listing->fields['products_id'],20000) != zen_get_products_actual_price((int)$listing->fields['products_id'])){
//Change the next line to your own text/formatting requirements
$lc_text='<span style="color: gray; font-weight: normal;">Price as low as:<br />' . $lc_price . '';
}else{
$lc_text = $lc_price.'<br />';
}
//eof As low as prise//
First picture is before any code changes , note price is shown in CAD (which is correct for my IP)
Second pciture is with the code change , but price is shown in USD (not right). I must be missing some coding for this to work with this plugin.
Bookmarks