Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Show best price ... with Usercurrency plugin installed?

Show best price ... with Usercurrency plugin installed?

Views: 2,163

Results 1 to 2 of 2
10 Jan 2016, 5:38 PM
#1
bikespot avatar

bikespot

New Zenner

Join Date:
Aug 2015
Location:
Canada
Posts:
6
Plugin Contributions:
0

Show best price ... with Usercurrency plugin installed?

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:

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:

//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)
Attachment 15945
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.
Attachment 15944

11 Mar 2016, 8:33 PM
#2
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Show best price ... with Usercurrency plugin installed?

bikespot:

I am trying to show the best price on the product page. I found some code from another topic to make this work
Can you provide a link to that code you found?