Hi,
Is there a way I can add a percentage to the Euro exchnage rate to cover banking charges?
Thanks.
Is there a way I can add a percentage to the Euro exchnage rate to cover banking charges?
Thanks.
In file /admin/model/localisation/currency.php
search for
replace it with
There 1.02 gives a 2% extra margin on the currency.
search for
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value . "', date_modified = NOW() WHERE code = '" . $this->db->escape($currency) . "'");
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value * 1.02 . "', date_modified = NOW() WHERE code = '" . $this->db->escape($currency) . "'");
this doesn't work with 1.5.2.1ridax wrote:In file /admin/model/localisation/currency.php
search for
replace it withCode: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value . "', date_modified = NOW() WHERE code = '" . $this->db->escape($currency) . "'");
There 1.02 gives a 2% extra margin on the currency.Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value * 1.02 . "', date_modified = NOW() WHERE code = '" . $this->db->escape($currency) . "'");
any other way? any paid extension that can do this?
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value * 1.02 . "', date_modified = NOW() WHERE code = '" . $this->db->escape($currency) . "'");
Code: Select all
$this->db->query("UPDATE `" . DB_PREFIX . "currency` SET `value` = '" . (float)$value * 1.02 . "', `date_modified` = NOW() WHERE `code` = '" . $this->db->escape($currency) . "'");
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Can anyone update the above for 1.5.4+ the code im looking at is different:
Cant seem to get the above to work by straightlight
Code: Select all
$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '1.00000', date_modified = '" . $this->db->escape(date('Y-m-d H:i:s')) . "' WHERE code = '" . $this->db->escape($this->config->get('config_currency')) . "'");
So far i have this
line 133 in admin/model/localisation/currency.php
But just can not get it to work!
Tried clearing the system cache file for the currency too
line 133 in admin/model/localisation/currency.php
Code: Select all
if ((float)$value) {
$this->db->query("UPDATE " . DB_PREFIX . "currency` SET `value` = '" . (float)$value * 1.03 . "', `date_modified` = '" . $this->db->escape(date('Y-m-d H:i:s')) . "' WHERE code = '" . $this->db->escape($currency) . "'");
}
}
Tried clearing the system cache file for the currency too
Please clarify get it to work! .But just can not get it to work!
Code: Select all
if ((float)$value) {
$this->db->query("UPDATE " . DB_PREFIX . "currency` SET `value` = '" . (float)$value * 1.03 . "', `date_modified` = '" . $this->db->escape(date('Y-m-d H:i:s')) . "' WHERE code = '" . $this->db->escape($currency) . "'");
}
}
Code: Select all
if (is_float($value)) {
$this->db->query("UPDATE " . DB_PREFIX . "currency` SET `value` = '" . (float)$value * 1.03 . "', `date_modified` = NOW() WHERE `code` = '" . $this->db->escape($currency) . "'");
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks for the reply!
Well what i mean is i apply the code above, the new one you just posted, but the the increase on the currency does not happen.
Do i have to wait for the currency to update automatically for it to then add the extra?
Well what i mean is i apply the code above, the new one you just posted, but the the increase on the currency does not happen.
Do i have to wait for the currency to update automatically for it to then add the extra?
Update to above, i have tried everything to get the above code to work, but it just seems that it has no affect on the price of a product when you switch to a different currency other than the default currency.
I am guessing 1.03 would add 3% extra to the price in the currency selected, other than the default currency?
I am guessing 1.03 would add 3% extra to the price in the currency selected, other than the default currency?
Regards
Chris
Yes.I am guessing 1.03 would add 3% extra to the price in the currency selected, other than the default currency?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks for clarifying!
I'm not sure what to do on this, the code change above seems to have no affect on the prices of products when a different currency is chosen, is there anything else I should be doing?
I'm not sure what to do on this, the code change above seems to have no affect on the prices of products when a different currency is chosen, is there anything else I should be doing?
So i finally got it working!
Silly mistake, but for anyone who is doing this on a test system, you will need to unlock it if you have set a htaccess password server side.
Seemed to be blocking the update
Thanks massively again to straightlight
Silly mistake, but for anyone who is doing this on a test system, you will need to unlock it if you have set a htaccess password server side.
Seemed to be blocking the update
Thanks massively again to straightlight
I have returned, it still does seem that even though the currency is updating IT IS NOT adding the 3% i have applied above.
It is not applying the extra on top of the exchange rate when it updates
It is not applying the extra on top of the exchange rate when it updates
Regards
Chris
Who is online
Users browsing this forum: No registered users and 319 guests