Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin-Configuration-My store How to add zones? FROZEN: osCommerce Online Merchant v2.3.4.1 CE


fantomen

Recommended Posts

My information: 
Installed version FROZEN: osCommerce Online Merchant v2.3.4.1 CE

Server OS:    Linux 4.15.0-45-generic    
HTTP Server:    Apache/2.4.29 (Ubuntu)
PHP Version:    7.2.10-0ubuntu0.18.04.1 (Zend: 3.2.0)
Database:    MySQL 5.7.25-0ubuntu0.18.04.2

My Question:
In admin panel:   Admin-Configuration-My store  
How do I add zones to Sweden?

 

1193278018_Howtoaddzones.thumb.jpg.8c52b393db6a816b277ddaad69d4ee5f.jpg

 

Link to comment
Share on other sites

Thank you very much for your help and advices.

Is this contribution just to install into my Database:    MySQL 5.7.25-0ubuntu0.18.04.2 ?
https://apps.oscommerce.com/p4ci4&swedish-zones

How to insert this when using PHPMYADMIN?

INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'C','Uppsala');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'D','Södermanland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'E','Östergötland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'F','Jönköping');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'G','Kronoberg');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'H','Kalmar');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'I','Gotland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'K','Blekinge');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'M','Skåne');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'N','Halland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'O','Västra Götaland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'S','Värmland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'T','Örebro');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'U','Västmanland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'W','Dalarna');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'X','Gävleborg');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'Y','Västernorrland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'Z','Jämtland');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AC','Västerbotten');
INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'BD','Norrbotten');

How to insert above into the database?
Please see enclosed picture of my PHPMYADMIN.

1875407045_Howtoinsertzonespicture1.thumb.jpg.dabea7040c9e7d4a897747501cb7515d.jpg
 

Link to comment
Share on other sites

This will make changes to you db so please backup before you do anything. I do not use this so make sure it is what you need.

When you go to phpAdmin you will see a SQL tap click this and enter the code into it it will run the script and add the changes.

image.thumb.png.5528c16b0473ed81d239980e4745cba2.png

 

Link to comment
Share on other sites

I also tried to click in the tabell to the left on zones and then I pasted this code  and hit the go button and now I received a new error message.
Please see enclosed picture.


How_to_insert_zones_picture3.thumb.jpg.5c6d23f4f8233fb4af0d2ec24a9dafae.jpg

 

Error

SQL query:

 

INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')

 

MySQL said: Documentation

#1366 - Incorrect integer value: '' for column 'zone_id' at row 1

Link to comment
Share on other sites

I have tried with only 1 line: 

INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm');

 

Error

SQL query:

 

INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')

 

MySQL said: Documentation

#1366 - Incorrect integer value: '' for column 'zone_id' at row 1
Link to comment
Share on other sites

Do one of two things:

  1. Omit 'zone_id' and '' from the two lists, or
  2. Replace '' with null

One of them should work. zone_id is autoincrement, so omitting it or giving null should increment it to the next value.

Link to comment
Share on other sites

I tried changed this line:

INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')

To this line: 
INSERT INTO zones (null, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')

And I get this error message:
 

Error

SQL query:

 

INSERT INTO zones (null, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')

 

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 'null, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm')' at line 1

 


 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...