Post by testie » Wed Feb 14, 2018 12:14 am

I used to be able to change currency through URL.

Example: http://opencart/?currency=USD

But it seems like this was removed in an update? I would greatly appreciate if there was an fix for this :) I found one extension for this but it's for an older version of Opencart.

My site is: http://bersau.se

Running Version 3.0.2.0
Last edited by testie on Wed Mar 14, 2018 7:11 am, edited 1 time in total.

Newbie

Posts

Joined
Mon May 11, 2015 6:42 am

Post by testie » Wed Feb 21, 2018 9:39 pm

Bump ;)

Newbie

Posts

Joined
Mon May 11, 2015 6:42 am

Post by uksitebuilder » Wed Feb 21, 2018 10:17 pm

Not an option in OC default unless you have or had an extension that did this for you.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by testie » Sun Mar 11, 2018 7:16 am

Hm I'm pretty sure I have all extensions that I used on previous version of OC. And I find a lot of posts on the forum when people are suggesting the /?currency= trick. And I can't find any extension for it for 3.0.2.0

I found a post where you uploaded a .xml fix for this but I can't install it, probably because it's and old version :)?
viewtopic.php?t=181974

Newbie

Posts

Joined
Mon May 11, 2015 6:42 am

Post by testie » Wed Mar 14, 2018 7:18 am

This was a total shot in the dark but it worked, can't tell you how happy I am :P

Found this post how to change language via URL:
viewtopic.php?f=190&t=143696#p556676

And just switched the lang & language attributes to "currency" and it worked!

So here is the solution for you who might stumble upon this post if you need to solve this problem:

Insert code below after the line 4 in the file catalog\controller\common\language.php

Code: Select all

if (isset($this->request->get['currency'])) {
 
    $this->session->data['currency'] = $this->request->get['currency'];
 
    $this->response->redirect($this->url->link('common/home'));
}

Newbie

Posts

Joined
Mon May 11, 2015 6:42 am

Post by IP_CAM » Wed Mar 14, 2018 11:48 am

Well done, and it saved me from looking around for this again,
after I've installed it in a TestShop, but many Moon's ago...
I now installed both Routines, because one never know's,
it may one day be of use ... ;)
Thanks, Ernie
---
Image

Attachments

currency_linking_oc1565.jpg

currency_linking_oc1565.jpg (24.66 KiB) Viewed 336 times


For Sale: Top URL's, including an OpenCart V-Pro Installation, similar to:
http://www.bigmax.ch - http://www.ipcam.li - http://www.jti.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 11 guests