| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Multiple Currencies Mod Complete (v4.1.2) | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Multiple Currencies Mod Complete (v4.1.2)
Well after a good day or two plugging away I've finally finished a little mod that will allow the customer to select which alternate currency they want prices displayed in. They can choose a currency code using a drop-down list and then the current page will refresh and display the alternate price next to the regular price. The selected currency is also stored as a cookie so subsequent pages remember which currencies to display.
I've also added a simple admin configuration area that lets you change the rates manually. This is a fairly basic mod in that it does NOT get the latest rates from any bank (I tried at one point but it seems most want to charge fees, etc, etc). It does NOT let you log in as an administrator and add unlimited currency codes & rates (I started to do this but realized my client could probably care less and I don't really have another day to throw around). I think you guys know how it is. Right now to add another currency code it involves adding an entry to a table and a couple lines of PHP code to a file. Easy as pie, well for an engineer that is, just not something my mother could do. Another thing this mod does NOT do is charge the user in a foreign currency. This ONLY displays alternate currencies so the user can see product prices and cart prices in BOTH default and user-selected alternate currencies. BTW, I have this running on X-Cart 4.1.2 Gold and have done my testing on Firefox 1.5.04 and IE 6. Also, here are a few screenshots. The main home page with the drop-down list: http://hurai.dreamhosters.com/images/xcart/home-select.jpg The admin configuration page: http://hurai.dreamhosters.com/images/xcart/admin.jpg UPDATE: you'll need to run the following commands through the database to add text labels to the language table. INSERT INTO `xcart_languages` VALUES ('US', 'lbl_currencies', 'Currencies', 'Labels'); INSERT INTO `xcart_languages` VALUES ('US', 'option_title_Multiple_Currency', 'Multiple Currencies Options', 'Labels'); And then one more query to add the custom module to X-Cart: INSERT INTO `xcart_modules` VALUES (74, 'Multiple_Currency', 'Enables users to select different currencies to be displayed.', 'Y'); Once you do this, go into the Administrator - Modules area and make sure you see it there and make sure it IS enabled. I've put this mod on my website for you to download here. Password is: koaconsulting.com
__________________
X-Cart Gold v4.1.2 (running on a unix server) |
|||||||
#2
|
|||||||
|
|||||||
Looks like a good mod...but the Completed Mods forum is for posting Completed Code only. Let me know when you have the code posted and I'll move it back to that forum.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
multiple currencies
Hi koaloa,
I would like to try your multiple currencies package, can I download it somewhere ? Thanks. |
|||||||
#4
|
|||||||||
|
|||||||||
Very good, can you share the code ?
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#5
|
|||||||
|
|||||||
Please take a look at my original post as I've put a download link to a zipfile with the mod with install instructions. Hope you like it.
Hurai
__________________
X-Cart Gold v4.1.2 (running on a unix server) |
|||||||
#6
|
|||||||||
|
|||||||||
Thanx, very well explained, Im going to try it out to see how it works.
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#7
|
|||||||
|
|||||||
In my General Settings, I get an arrow and no text. Is there a missing language variable?
Modified the tpl's - added a field in the currencies table, but nothing shows up.... - Mike
__________________
4.1.9 |
|||||||
#8
|
|||||||
|
|||||||
Hey Mike,
Sorry about that. I thought I was being so diligent explaining everything and documenting each item I changed. I've updated my post above to reflect two more language additions I made. You need to run these commands on the table: INSERT INTO `xcart_languages` VALUES ('US', 'lbl_currencies', 'Currencies', 'Labels'); INSERT INTO `xcart_languages` VALUES ('US', 'option_title_Multiple_Currency', 'Multiple Currencies Options', 'Labels'); Or you can just enter these values into the administrator - language section of X-Cart: lbl_currencies - 'Currencies' option_title_Multiple_Currency - 'Multiple Currencies Options' Remember to wipe out your cache if these don't show up right away, I learned that the hard way (after hitting refresh about 30 times and then browsing the forums). Let me know how it goes, it's actually pretty neat once it all works.
__________________
X-Cart Gold v4.1.2 (running on a unix server) |
|||||||
#9
|
|||||||
|
|||||||
Half way there. I see a form action for shop.php in the tpl, is that your own page? I can't get any options to show up though.... there might be something else missing here?
Thanks, Mike
__________________
4.1.9 |
|||||||
#10
|
|||||||
|
|||||||
Ah, I may have found the culprit. You need to run this mySQL query to add the custom module to X-Cart:
INSERT INTO `xcart_modules` VALUES (74, 'Multiple_Currency', 'Enables users to select different currencies to be displayed.', 'Y'); Once you do this, go into the Administrator - Modules area and make sure you see it there and make sure it IS enabled. Sorry for the run-around. I think you're close!
__________________
X-Cart Gold v4.1.2 (running on a unix server) |
|||||||
|
|||
X-Cart forums © 2001-2020
|