Post by hfxracing » Thu Mar 26, 2015 9:51 pm

I have a major issue with 2.0.1.1 I have CAD set as my default currency in all 3 places on my website plus I tried adding the CAD to the controller/payments/paypal express php file as well & dumped the cookies.

The problem I have if customer selects USD on checkout opencart is sending the order to paypal as USD. I want everything to be in CAD. How do I fix this? I only have a CAD paypal business account as well paypal did not automatically switch the customers payment it opened a USD balance account which I had to convert & lost some money on.

I really need some help on this. I switched from zen to this I hope I am not going to regret that decision.

Newbie

Posts

Joined
Thu Mar 26, 2015 9:24 pm

Post by Qphoria » Fri Mar 27, 2015 12:35 am

Since paypal technically supports USD, it will allow the order to go through as USD. This isn't something you control in the admin.

If you want to force a certain currency, you'll have to force the currency in the code. And it looks like there is a massive bug in the paypal code that forces ALL payments to be USD and then reformats the currency code.

So it is taking 10 CAD
converting it to USD (lets say 9)
Then formatting it as 9 CAD

What a mess.

For now, edit
catalog/controller/payment/pp_express.php

and find all places USD exists and change to CAD
That should at least fix your issue
Q

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hfxracing » Fri Mar 27, 2015 9:20 am

Yep tried that & now that I have a order on the site I cannot remove USD now that a order is attached to it. until it's fixed what about standard paypal does it have the bug too? I would switch to that until it's fixed.
Thanks for the reply BTW!

Newbie

Posts

Joined
Thu Mar 26, 2015 9:24 pm

Post by allenshea » Fri Mar 27, 2015 9:34 am

You can try this.

Code: Select all


	<file name="catalog/controller/checkout/confirm.php">
	<operation>
	<search position="after">
	<![CDATA[
	$this->load->model('extension/extension');
	]]></search>
	<add>
	<![CDATA[
			if (isset($this->session->data['shipping_method']['code']) && strpos($this->session->data['payment_method']['code'], 'pp_express') !== false) {
			$this->currency->set('CAD');
			}
	]]></add>
	</operation>
	</file>

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by hfxracing » Fri Mar 27, 2015 9:12 pm

allenshea wrote:You can try this.

Code: Select all


	<file name="catalog/controller/checkout/confirm.php">
	<operation>
	<search position="after">
	<![CDATA[
	$this->load->model('extension/extension');
	]]></search>
	<add>
	<![CDATA[
			if (isset($this->session->data['shipping_method']['code']) && strpos($this->session->data['payment_method']['code'], 'pp_express') !== false) {
			$this->currency->set('CAD');
			}
	]]></add>
	</operation>
	</file>
Thank you but this is not going to work as the current file does not contain any of this code to replace & you have not said if it goes before or after something. If you tell me where it goes I will be happy to try it.

Newbie

Posts

Joined
Thu Mar 26, 2015 9:24 pm

Post by allenshea » Sat Mar 28, 2015 7:28 am

hfxracing wrote:
allenshea wrote:You can try this.

Code: Select all


	<file name="catalog/controller/checkout/confirm.php">
	<operation>
	<search position="after">
	<![CDATA[
	$this->load->model('extension/extension');
	]]></search>
	<add>
	<![CDATA[
			if (isset($this->session->data['shipping_method']['code']) && strpos($this->session->data['payment_method']['code'], 'pp_express') !== false) {
			$this->currency->set('CAD');
			}
	]]></add>
	</operation>
	</file>
Thank you but this is not going to work as the current file does not contain any of this code to replace & you have not said if it goes before or after something. If you tell me where it goes I will be happy to try it.


File name:
catalog/controller/checkout/confirm.php
Find:
$this->load->model('extension/extension');
After add:
if (isset($this->session->data['shipping_method']['code']) && strpos($this->session->data['payment_method']['code'], 'pp_express') !== false) {
$this->currency->set('CAD');
}

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by hfxracing » Mon Mar 30, 2015 10:56 pm

I wanted to let you know this worked perfectly thank you for the help!

Newbie

Posts

Joined
Thu Mar 26, 2015 9:24 pm

Post by delian » Sat Jul 04, 2015 2:06 am

do you know how to force PayPal Express checkout in EUR . OC version 1.5.6.4.

Thank you in advance

Newbie

Posts

Joined
Fri Aug 02, 2013 11:10 pm

Post by Qphoria » Sun Jul 05, 2015 11:49 pm

Search the catalog/controller/payment/pp_express.php file for
'USD'

change it to:
'EUR'

But it really should be fixed in the core. There is no reason that should be hardcoded to USD in the first place.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 16 guests