I want to show on the Frontend of OC 3 a different currency as default, different from the default currency set in Admin.
In 1.5.6.4 I used this extension https://www.opencart.com/index.php?rout ... n_id=10970
I understand there is another one, more complex, in OC 2.0 https://www.opencart.com/index.php?rout ... n_id=19640
But these vqmod extensions are not working in OC 3.0.2..
How can I update the extensions from above to work as a vqmod extension in OC 3 ?
Or how can I convert them to OCMOD ?
Or.. a third solution..?
In 1.5.6.4 I used this extension https://www.opencart.com/index.php?rout ... n_id=10970
I understand there is another one, more complex, in OC 2.0 https://www.opencart.com/index.php?rout ... n_id=19640
But these vqmod extensions are not working in OC 3.0.2..
How can I update the extensions from above to work as a vqmod extension in OC 3 ?
Or how can I convert them to OCMOD ?
Or.. a third solution..?
Last edited by infocondens on Fri Jan 26, 2018 7:47 am, edited 1 time in total.
Well, as OcMod for OC v.3.0.2.x, it would about look like this,
but I cannot test it, and therefore not know, if this Code:
will work in OC-3, as it comes, everything else matches OC-3 Code.
Good Luck!
Ernie
---
PS: I addressed this file:
catalog/controller/common/currency.php
and not this:
catalog/controller/api/currency.php
just to mention this too!
---
File name:
frontside_default_currency.ocmod.xml
---
---
but I cannot test it, and therefore not know, if this Code:
Code: Select all
elseif($this->currency->getCode() != "EUR") {
$this->currency->set("EUR");
Good Luck!
Ernie
---
PS: I addressed this file:
catalog/controller/common/currency.php
and not this:
catalog/controller/api/currency.php
just to mention this too!
---
File name:
frontside_default_currency.ocmod.xml
---
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name><![CDATA[frontside default currency]]></name>
<version><![CDATA[OC v.3.0.2.x]]></version>
<code><![CDATA[frontside_default_currency]]></code>
<author><![CDATA[Ernie - IP_CAM]]></author>
<file path="catalog/controller/common/currency.php">
<operation>
<search><![CDATA[$this->load->language('common/currency');]]></search>
<add position="before"><![CDATA[
elseif($this->currency->getCode() != "EUR") {
$this->currency->set("EUR");
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
if (isset($this->request->post['redirect'])) {
$this->response->redirect($this->request->post['redirect']);
} else {
$this->response->redirect($this->url->link('common/home'));
}
}
]]></add>
</operation>
</file>
</modification>
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
thanks for the answer and the effort !
I made a file with that name and that code.. how do I install it in OC 3 ? In Admin I can not upload an ocmod.xml file..
I made a file with that name and that code.. how do I install it in OC 3 ? In Admin I can not upload an ocmod.xml file..
Well, you should be able by use of the OC Modification Installer.
And if you use VqMod as well, then clean out the vqmod/vqcache/...
Section as well first, before clearing out the Browser Cache too, to make
sure, it will display the latest Code.
Good Luck!
Ernie
---
And if you use VqMod as well, then clean out the vqmod/vqcache/...
Section as well first, before clearing out the Browser Cache too, to make
sure, it will display the latest Code.
Good Luck!
Ernie
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
hi, IP_CAM,IP_CAM wrote: ↑Sat Jan 27, 2018 12:05 pmWell, you should be able by use of the OC Modification Installer.
And if you use VqMod as well, then clean out the vqmod/vqcache/...
Section as well first, before clearing out the Browser Cache too, to make
sure, it will display the latest Code.
Good Luck!
Ernie
---
I have tried transfer your xml file to Zip file and uploaded, but did show up in the Modification List after that, very strange. And nothing works. if it is possible that just show me the final currency.php and I can edit this file directly. Many thanks in advance!
Well, I have never played around with latest Version 3.0.3.2, but most likely,
the Mod shown above will not work, as it comes. Sorry, but I can't help on this.
Ernie
the Mod shown above will not work, as it comes. Sorry, but I can't help on this.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: gazih and 39 guests