Post by Xellz » Sat Mar 24, 2012 5:47 pm

I want to force only default currency checkout and ignore what was selected in shop. Before 1.5.2 this was rather easy and straightforward, but now this controller file became more complicated and i'm not sure how to do this without breaking functionality.

Japanese green tea


New member

Posts

Joined
Fri Feb 11, 2011 8:55 pm

Post by Qphoria » Sat Mar 24, 2012 11:17 pm

it hasn't really changed. You make the change in the same place.. right under this line:

Code: Select all

protected function index() {
add:

Code: Select all

$this->currency->set('USD');

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xellz » Sat Apr 07, 2012 9:40 pm

Today was ready to update to 1.5.2 together with latest fixes, but noticed this actually not working.
What is happening, currency is changed in shop only. I.e. paypal still receives currency selected in shop and not the hardcoded one. But once i hit return or complete payment currency in shop is changed to hardcoded.

I don't really get why this is happening.

edit:
But this solution made me realize another way how to make it work :)

After this line:

Code: Select all

$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
I simple added this:

Code: Select all

$order_info['currency_code'] = 'JPY';

Japanese green tea


New member

Posts

Joined
Fri Feb 11, 2011 8:55 pm
Who is online

Users browsing this forum: No registered users and 23 guests