Post by Johnathan » Fri Jul 07, 2017 1:12 am

PayPal Express doesn't show the shipping price for each shipping option until you select it. These edits should fix that:

Code: Select all

IN:
/catalog/controller/payment/pp_express.php  (2.0-2.2)
/catalog/controller/extension/payment/pp_express.php  (2.3)

BEFORE:
$data['code'] = $this->session->data['shipping_method']['code'];

ADD:
$data['currency'] = $this->session->data['currency'];
$data['currency_library'] = $this->currency;

Code: Select all

IN:
/catalog/view/theme/default/template/payment/pp_express_confirm.tpl  (2.0-2.2)
/catalog/view/theme/default/template/extension/payment/pp_express_confirm.tpl  (2.3)

REPLACE:
<?php echo $quote['title']; ?> </label>

WITH:
<?php echo $quote['title'] . ' - ' . $currency_library->format($quote['cost'], $currency); ?> </label>

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by jamesalex » Thu Jan 31, 2019 12:50 am

This is perfect if it's in USD, but how do you get it to display the appropriate currency format?

Some of my customers are from UK, some are from US. I have an extension that displays the correct prices to their country. But with your above modification, it's displaying it as dollars regardless as to where they're from.

New member

Posts

Joined
Thu Apr 19, 2012 9:03 pm

Post by Johnathan » Thu Jan 31, 2019 2:13 am

I've adjusted the code so it should work with whatever currency the customer has chosen. I haven't tested it, so let me know if there are issues with it.

On a related note, I've just released an extension called PayPal Standard Improvements, which breaks the shipping cost in the PayPal Standard page into its own line item. It's not related to PayPal Express, but I thought I'd mention it here in case others looking at that issue find this topic.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by jamesalex » Thu Jan 31, 2019 7:44 pm

On initial viewing it's looking good. Well done and thank you for your speedy response and solution!

New member

Posts

Joined
Thu Apr 19, 2012 9:03 pm
Who is online

Users browsing this forum: No registered users and 2 guests