| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Multiple Currencies Mod Complete (v4.1.2) | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#31
|
|||||||||
|
|||||||||
![]() Quote:
Go to your patch/upgrade in the admin section and in the bottom box type in: Code:
Also it works on 4.1.9 as well. And the admin/configuration.php code that puts the rate into the xcart_currencies using the command UPDATE xcart_currencies SET rate='$val' WHERE code='$code' does not work with the euro (as per the instructions) as the code for euro is EUR not euro. So when you modify the table for xcart_config and you want the Euro currency you must use: Code:
Now if you use the above insert code, please go into your admin section and change the currency value ('1.35572') and save it, then change it back and save it so that the configuration.php script updates the xcart_currencies, then you will find this new update in the drop down box on your web site. The code only looks for rates defined in the xcart_currencies table > 0 and by inserting the currency conversion value like the above code the configuration.php file has not been run to update the xcart_currencies rate value, so it wont show on your web site. Also make sure that the currency symbol is only 3 characters long, like USD, EUR, GBP, CAD, HKD, TND etc. Anyway you can see a working copy at http://www.elmaallem.com
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#32
|
|||||||||
|
|||||||||
![]() Quote:
You have to edit the xcart_currencies table and change the SYMBOL from $ to CAD $ Here is the code for the Patch / Upgrade in your admin section, you place this code in the bottom SQL query(ies): section. Code:
You can see this at http://www.elmaallem.com site.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#33
|
|||||||||
|
|||||||||
![]() This file attached is the code for x-cart 4.1.9 and for a GBP (UK site) which also includes all the files and patches (plus a read me text file) which i will also display below.
A special thanks to koaloa for a very nice mod. Go to Admin > General Settings and remove the default alternative currency code. Copy from (muti_currency_mod.zip) or belowthe following code. skin1/customer/top_menu.tpl (File included in muti_currency_mod.zip) Code:
modules/Multiple_Currency/config.php (File included in muti_currency_mod.zip) Code:
skin1/customer/main/alter_currency_value.tpl (File included in muti_currency_mod.zip) Code:
skin1/customer/main/show_currency_options.tpl (File included in muti_currency_mod.zip) Code:
modules/Multiple_Currency/func.php (File included in muti_currency_mod.zip) Code:
Edit your copy of admin/configuration.php see below. Note: This file copies the currency rates from the Admin config table to the currencies table on opening or clicking save. You may not want to copy the full admin/configuration.php (File included in muti_currency_mod.zip), so if this is the case search for: Code:
And then AFTER this put in the following code: Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#34
|
|||||||||
|
|||||||||
![]() CONTINUED FROM ABOVE POST DUE TO FORUM POST SIZE RESTRICTIONS.
The Patch file in this zip file (Attachment 708) will do the below automatically for you. Modify the table xcart_currencies by adding a field called 'rate', setting it as 'double' and making sure the default value is set to zero. Code:
Modify the table xcart_config by adding entries including your default currency eg: Code:
If you need to delete a currency i.e. you no longer want to show that currency you can run this code in your patch / upgrade section for the code you want to delete, for example HKD: Code:
You need to run these SQL commands: Code:
THE FULL PATCH FILE CODE THATS INCLUDED IN THE ATTACHEMENT AND ABOVE Code:
I wanted to show that AUD $ and CAD $ and HKD $ was not the same as USD $ so the 3 above update patches is to change the symbol from $ too ??? $ Go into the Admin > Modules area. 'Multiple_Currency' should be listed and ticked. Click 'Configure' to set your exchange rates, your default currency in this case GBP should be set to 1. The above files have been tested at http://www.shishapipe.net/shopcart/home.php (Because of the way the site is designed I do not use the skin1/customer/top_menu.tpl so I placed my code in the head.tpl)
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#35
|
|||||||||
|
|||||||||
![]() What i did notice about this mod, is it works fine on the home.php page but if you go to a product and then change the currency you get an access denied.
Here is an example, go to http://www.shishapipe.net/shopcart/product.php?productid=16818&cat=0&page=1 and then change the currency, you then get: Access denied ! You are not allowed to access that resource! Error ID: 33 Now i know why to a certain point. I am not using the skin1/customer/top_menu.tpl Instead I have the code in the skin1/head.tpl file which is: Code:
I know the code works fine when looking at a product and using the skin1/customer/top_menu.tpl so the above posting is correct but with my site having just a few modifications i need this code in the head.tpl. Has anyone any ideas what i need to change to get it to work in the head.tpl file when looking at a product ?
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#36
|
|||||||
|
|||||||
![]() is there any way to change show a particular payment method with each currency selected.
for example: there are two payment methods. 1) credit card for gbp 2) credit card for US$ default is 1 and when US$ is selected and customer reaches choose payment method it only show credit card for US$. regards Junaid
__________________
xcart 4.18 on linux |
|||||||
#37
|
|||||||||
|
|||||||||
![]() I've got this mod working on 4.1.11, but my problem is a price not showing up when the USD is selected. The other currencies seem to work, but not the USD when selected.
__________________
X-Cart Gold Version 4.1.12 Add-on: X-SpecialOffers Add-on: X-Magnifier Add-on: X-AOM (Advanced Order Management) PHP Version: 5.2.6 MySQL Version: 5.0.85-community Apache: 2.2.10 |
|||||||||
#38
|
|||||||
|
|||||||
![]() Great mode, thanks for sharing. I have a small problem. I’m trying to make it work for v4.2 and for some reason as soon as I’m going to next page it display only default currency. I think its a cookie problem. Is anyone know how can I fix it?
__________________
Tanya x-cart version: 4.1.7 4.1.9. 4.2 |
|||||||
#39
|
|||||||
|
|||||||
![]() I cannot get this to work in 4.10.
![]()
__________________
X-Cart DB Version: 5 |
|||||||
#40
|
|||||||
|
|||||||
![]() Hi, ShishaPipeUK
Our Primary currency is set to one Credit card payment method .. All we want is to link alt currency for customers opting to pay using Paypal (in USD -"$")... Is it possible? Thanks to all in advance !! |
|||||||
|
|||
X-Cart forums © 2001-2020
|