BrockleyJohn Posted February 14, 2011 Share Posted February 14, 2011 It's a quick-and-dirty adaptation for a virgin install that converts the sample data into UK versions. Background ========== Intended for use with a newly installed osCommerce store, either from download or through cpanel, fantastico etc It will change the installed US currency & tax to UK versions by updating them, so that the sample data still works. It sets up a tax zone for all Europe. Doesn't install counties so the field remains free text. Address pages are changed to move postcode above country. Language files have UK date formats, county instead of state. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
craggers Posted February 14, 2011 Share Posted February 14, 2011 It's a quick-and-dirty adaptation for a virgin install that converts the sample data into UK versions. Background ========== Intended for use with a newly installed osCommerce store, either from download or through cpanel, fantastico etc It will change the installed US currency & tax to UK versions by updating them, so that the sample data still works. It sets up a tax zone for all Europe. Doesn't install counties so the field remains free text. Address pages are changed to move postcode above country. Language files have UK date formats, county instead of state. Haven't installed the 2.3.1 yet, will it be easier if I overwrite those files onto the server and install it ? Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted February 15, 2011 Author Share Posted February 15, 2011 (edited) Haven't installed the 2.3.1 yet, will it be easier if I overwrite those files onto the server and install it ? You can overwrite the php files anytime, it won't make a difference, but you'll have to run the sql after you've run the install. If you want to run the sql as part of the install, it needs adding to the end of catalog/install/oscommerce.sql I'll upload a new version of the addon including this edited sql too, but I'll have to test it first. Edited February 15, 2011 by JohnAtYM Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted February 16, 2011 Author Share Posted February 16, 2011 Version 1.1 now available; now there are two implementation methods: - you can overwrite the files downloaded for osc 2.3.1 and then just run an install - if the store's ready-loaded (eg. from hosting panels), you can update it to be UK-based Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
acewoodturner Posted March 9, 2011 Share Posted March 9, 2011 Hi there, I am totally new to OSC and using version 2.3.1 I installed this 2 or 3 days ago before finding out that I can do a UK version which would suit me a lot since I am in Scotland. I dont know how to run an sql file and I am not sure about some of the things to update from US to UK version. This morning I copied my UK files into the osc folder and then downloaded my uplooad of osc from a few days ago. I then uploaded my changed osc and sucessfully configured it again only to find it was the US version still. Anyone like to give me some pointers as to what I have done and how to correct them in as basic a format as possible. I have no doubt in about 6 months time or so I will look back on this steep learning curve and laugh about my trials and tribulations of getting it to work but in the meantime I will keep plugging away with the assistance of this brilliant forum! Cheers mike Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted March 9, 2011 Author Share Posted March 9, 2011 Hi there, I am totally new to OSC and using version 2.3.1 I installed this 2 or 3 days ago before finding out that I can do a UK version which would suit me a lot since I am in Scotland. I dont know how to run an sql file and I am not sure about some of the things to update from US to UK version. This morning I copied my UK files into the osc folder and then downloaded my uplooad of osc from a few days ago. I then uploaded my changed osc and sucessfully configured it again only to find it was the US version still. Anyone like to give me some pointers as to what I have done and how to correct them in as basic a format as possible. I have no doubt in about 6 months time or so I will look back on this steep learning curve and laugh about my trials and tribulations of getting it to work but in the meantime I will keep plugging away with the assistance of this brilliant forum! Cheers mike Here's a tip you may find useful if you're going to be adding add-ons; keep a copy of your original files, and any changes you make to them so it's easy to go back to how it was before. If you've plenty of diskspace you can just copy the whole site, or you can just keep accumulations of the changed files, which is quicker if you have to upload them. Now for your problem. First, it sounds like you might have downloaded the files from your web site over the top of the UK files, which would replace them with the standard ones. You can tell by comparing the file sizes, or go into create an account and see where postcode comes in the order of fields. If you have to, copy the files again and upload again - this will give you UK date format, county instead of state, Town / County / Postcode order in the account address pages, but the store will still think it's in Florida and the prices will still be in dollars and euros. The sql isn't totally essential; you can add the GBP currency and change all the store settings manually if you have to. But it's certainly quicker if you can run it. Your hosting almost certainly gives you a way to do it, and for many add-ons it'll be essential for installing them so it's worth finding out how. If you have cpanel, it's probably got a tool called phpAdmin which you can use to 'import' the whole file. Alternatively, there might be forms to 'run a query' and you can copy and paste from the sql file into here (probably in one go). If it's still not obvious, I suggest checking your hosting FAQ before calling their support. If you happen to end up with a funny character instead of a pound sign (eg. a white question mark in a black diamond), you had a problem with the "character set". Just go to osc admin / localization / currencies and edit GBP to replace it with the proper sign. Incidentally, if you have a browser that's looking at the website while you run the sql, you'll find that when you browse afterwards all the prices go to zero. This is just because it's confused by the changes, closing and reopening it or switching currency to euros and back will sort it out. HTH Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Guest Posted April 4, 2011 Share Posted April 4, 2011 hi I run your SQL in phpmyadmin and got below error. What to do next? Thanks Error SQL query: UPDATE currencies SET title ='UK Pound', code='GBP',symbol_left='? WHERE currencies_id = 1; UPDATE configuration SET configuration_value='222' WHERE configuration_key = 'SHIPPING_ORIGIN_COUNTRY'; UPDATE configuration SET configuration_value='222' WHERE configuration_key = 'STORE_COUNTRY'; UPDATE configuration SET configuration_value='0' WHERE configuration_key = 'STORE_ZONE'; UPDATE configuration SET configuration_value='GBP' WHERE configuration_key = 'DEFAULT_CURRENCY'; UPDATE tax_rates SET tax_rate=20.0000, tax_description='VAT (20%)' WHERE tax_rates_id=1; UPDATE geo_zones SET geo_zone_name='European Countries', geo_zone_description='EU VAT zone' WHERE geo_zone_id = 1; INSERT INTO address_format VALUES (NULL, '$firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country','$city / $country'); UPDATE countries SET address_format_id = last_insert_id() WHERE countries_id = 222; DELETE FROM zones_to_geo_zones WHERE geo_zone_id =1; INSERT INTO zones_to_geo_zones (association_[...] MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '222' WHERE configuration_key = 'SHIPPING_ORIGIN_COUNTRY'; UPDATE configuration ' at line 1 Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 5, 2011 Author Share Posted April 5, 2011 hi I run your SQL in phpmyadmin and got below error. What to do next? Thanks It may be as a result of a character set problem in the first statement. Try rerunning the rest of the statements, starting with just the one where the error came, ie. UPDATE configuration SET configuration_value='222' WHERE configuration_key = 'SHIPPING_ORIGIN_COUNTRY'; Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2011 Share Posted April 5, 2011 Is it should be Symbol_left='£' Not Symbol_left='? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 5, 2011 Share Posted April 5, 2011 I think u missed a ' after the question mark? Can I use £ in SQL so I don't need to go into admin to change the currency symbol from '?' To £ ? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Share Posted April 6, 2011 HI As I suspected that you missed a ' mark in your SQL to cause the error I had. Please take this note into your next update. For the mean time, I'd like to paste the correct SQL here in case other ppl had same problem. Just be aware that I changed GBP symbol from '?' in your original file to '£', so I don't need to go back to admin -> localisation -> currency -> to change the ? to £. # UK Additions to the database followSET NAMES latin1; UPDATE currencies SET title ='UK Pound', code='GBP',symbol_left='£' WHERE currencies_id = 1; UPDATE configuration SET configuration_value='222' WHERE configuration_key = 'SHIPPING_ORIGIN_COUNTRY'; UPDATE configuration SET configuration_value='222' WHERE configuration_key = 'STORE_COUNTRY'; UPDATE configuration SET configuration_value='0' WHERE configuration_key = 'STORE_ZONE'; UPDATE configuration SET configuration_value='GBP' WHERE configuration_key = 'DEFAULT_CURRENCY'; UPDATE tax_rates SET tax_rate=20.0000, tax_description='VAT (20%)' WHERE tax_rates_id=1; UPDATE geo_zones SET geo_zone_name='European Countries', geo_zone_description='EU VAT zone' WHERE geo_zone_id = 1; INSERT INTO address_format VALUES (NULL, '$firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country','$city / $country'); UPDATE countries SET address_format_id = last_insert_id() WHERE countries_id = 222; DELETE FROM zones_to_geo_zones WHERE geo_zone_id =1; INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (32, 117, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (31, 105, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (30, 103, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (29, 98, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (28, 97, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (27, 84, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (25, 81, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (24, 73, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (23, 72, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (22, 67, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (21, 57, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (20, 56, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (19, 55, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (18, 21, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (17, 14, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (33, 123, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (34, 124, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (35, 132, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (36, 150, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (37, 160, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (38, 170, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (46, 171, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (47, 189, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (48, 190, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (49, 195, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (50, 203, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (51, 204, 0, 1, NULL, now()); INSERT INTO zones_to_geo_zones (association_id, zone_country_id, zone_id, geo_zone_id, last_modified, date_added) VALUES (52, 222, 0, 1, NULL, now()); Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 6, 2011 Author Share Posted April 6, 2011 (edited) HI As I suspected that you missed a ' mark in your SQL to cause the error I had. Please take this note into your next update. For the mean time, I'd like to paste the correct SQL here in case other ppl had same problem. Just be aware that I changed GBP symbol from '?' in your original file to '£', so I don't need to go back to admin -> localisation -> currency -> to change the ? to £. The original file contains '£' Most likely you used Import in phpAdmin with the wrong character set (as then the £ can be interpreted as a carriage return and you lose one quote). If, however, the zip file you downloaded doesn't contain '£', then it's surprising that it's not been mentioned before as you're not the first to download and use it. Edited April 6, 2011 by JohnAtYM Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Share Posted April 6, 2011 (edited) The original file contains '£' Most likely you used Import in phpAdmin with the wrong character set (as then the £ can be interpreted as a carriage return and you lose one quote). If, however, the zip file you downloaded doesn't contain '£', then it's surprising that it's not been mentioned before as you're not the first to download and use it. I copy and pasted SQL in myphpadmin, not by importing the sql file. As you said the orginal was '£', I double checked downloads for v1.0 and v1.1 , both downloads shows only '? not '£'. I use Notepad++ unless there is something wrong with the character encoding? Anyway...your addon is working on my site after fixed this lil issue, thanks. Edited April 6, 2011 by dontlike2pay Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 19, 2011 Author Share Posted April 19, 2011 I copy and pasted SQL in myphpadmin, not by importing the sql file. As you said the orginal was '£', I double checked downloads for v1.0 and v1.1 , both downloads shows only '? not '£'. I use Notepad++ unless there is something wrong with the character encoding? Anyway...your addon is working on my site after fixed this lil issue, thanks. I can't figure where your encoding gets changed - when I download the add-on it comes out with a £. Anyway, I've moved it to the end so if it fails it doesn't destroy anything else. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 19, 2011 Author Share Posted April 19, 2011 (in a PM)I am a little confused I have just installed your contribution UK Quick Localisation 1.2 and the instructions were very clear and easy. I ran the sql and used Latin1 as you suggested and when I look at the dummy site before commencing working and adding other contributions I have discovered instead of a '£' I have a diamond with '?' instead. How can this be rectified to the correct symbol? Yes, that sometimes happens whatever you do to try and avoid it. It's easy to resolve - sign in to your admin tool, then in the menus go to Localization / Currencies, click on UK Pound and then Edit it and type in the £ sign. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Roger_White Posted May 1, 2011 Share Posted May 1, 2011 Thought I would just like to mention that I have uploaded this add-on, reading the instructions provided word for word and it works a treat. Thank you. :thumbsup: Quote Link to comment Share on other sites More sharing options...
Andy H Posted July 28, 2011 Share Posted July 28, 2011 The installation seems to have gone pretty smoothly. Thanks. I'd already added Pounds Sterling GBP as a currency, and set it as the default. I ended up with two set as default - the update adds UK Pound GBP. Once I figured out which to delete, it worked fine. I couldn't delete it while it was marked as default so I had to set Euro as the default temporarily. One small thing though. Is it possible to set United Kingdom as the default country in the drop down list of countries? I can't see a way of doing it via the admin system. I expect that most customers will be in the UK so it would save them having to select it when they register. Quote Link to comment Share on other sites More sharing options...
Andy H Posted July 29, 2011 Share Posted July 29, 2011 I was wondering for a few minutes what had happened to the County field. I see the admin system still refers to it as State. I'd turned that off but I've now turned it back on and it shows as County/State in the user registration form. I guess that makes sense. People might want to export to the US. Quote Link to comment Share on other sites More sharing options...
Calamero Posted October 8, 2011 Share Posted October 8, 2011 I applied this Add-on to an already installed OsCommerce v2.3.1 installation and it worked perfectly out of the box. Here a few points that may be helpful to others. 1. Since this add-on only updates 5 files I compared each file with my store files and manually updated ensuring that I did not overwrite any changes I had made myself. This was very straightforward and probably pedantic on my part. Other folks may simply upload the five files with no issue. 2. I changed the currency to Euro and made it the default as well as deleting Sterling from the store admin panel before updating the sql database. 3. To "Run the update_to_UK_after_install.sql file into your oscommerce database": - log into phpMyadmin - select your store database - Import the update_to_UK_after_install.sql file whereupon check that 40 queries were successfully executed which correlates with the number of queries in the .sql file. 4. I then changed the currency back to Pounds Sterling and removed Euro. At this point the add-on as intended has been successfully applied. Since my store targets the UK only, I did not what "County/State:" to appear in the address field when a customer creates a new account so in addition I altered /catalog/includes/languages/english.php to reference "County" only; i.e. change the following 3 lines from define('ENTRY_STATE', 'County/State:'); define('ENTRY_STATE_ERROR', 'Your County/State must contain a minimum of ' . ENTRY_STATE_MIN_LENGTH . ' characters.'); define('ENTRY_STATE_ERROR_SELECT', 'Please select a county/state from the County/State pull down menu.'); to: define('ENTRY_STATE', 'County:'); define('ENTRY_STATE_ERROR', 'Your County must contain a minimum of ' . ENTRY_STATE_MIN_LENGTH . ' characters.'); define('ENTRY_STATE_ERROR_SELECT', 'Please select a county from the County pull down menu.'); I hope this helps others when applying this great add-on. Quote Link to comment Share on other sites More sharing options...
medalto Posted May 18, 2014 Share Posted May 18, 2014 ive just tried this with 2.3.3.4 As downloded it fails - Im very new to oscommerce and I think theyve removed the social media links removing line 771 in the SQL INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_SOCIAL_BOOKMARKS_INSTALLED', 'sb_email.php;sb_facebook.php;sb_twitter.php;sb_google_buzz.php;sb_digg.php', 'List of social bookmark module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now()); gets the thing to install and run. I tihnk it will need a bit more tweaking though - some of the address entry field arent quite right Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.