Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Country Address Format


Guest

Recommended Posts

Posted

I've been using OS commerce for about a year now. I'm a total novice and do no programming. I'm just trying to use the basic functions to meet my needs. The default countries were too long and the USA was at the bottom of the list. We deleted most, but that was a poor choice. Questions:

  1. How do I restore the default list?
  2. How then do I get the US to the top of the list?
  3. What is the 'Address Format' function in the Locations--Countries section and what does it do?

Free shipping problems:

I'm offering customers free shipping on all orders over $100. I set that up in Modules--Order Total. When I try it on my shopping cart it works properly, but my last 10 customers have been charged for shipping. It doesn't make any sense and I don't even know where to begin.

 

Any help you can offer would be a big help.

 

Hamilton Collins

Sahara DryEar

  • 3 weeks later...
Posted
I've been using OS commerce for about a year now. I'm a total novice and do no programming. I'm just trying to use the basic functions to meet my needs. The default countries were too long and the USA was at the bottom of the list. We deleted most, but that was a poor choice. Questions:
  1. How do I restore the default list?
     
    *** Before doing this backup your database from admin section of your store. ***
    
    Just reinstall the tables. For that you will need access to the database, i am not sure what you are you using, if your hosting company provides you cpanel then it's easy. Just log in and go to mysql database and in the bottom there will be link to phpmyadmin. Click on it and it will open phpmyadmin for you. Select the database that you are using. On the top there will be tab with "SQL". Select that tab.
    
    For getting the table information, download the copy of oscommerce or if you have the one that you started with use that one. Navigate to catalog->install folder. There will be file named oscommerce.sql. Open that file in editor. If you dont have one, download crimson editor its free and works great. 
    
    Now copy the table create option for countires table. 
    
    
    DROP TABLE IF EXISTS countries;
    CREATE TABLE countries (
     countries_id int NOT NULL auto_increment,
     countries_name varchar(64) NOT NULL,
     countries_iso_code_2 char(2) NOT NULL,
     countries_iso_code_3 char(3) NOT NULL,
     address_format_id int NOT NULL,
     PRIMARY KEY (countries_id),
     KEY IDX_COUNTRIES_NAME (countries_name)
    );
    
    
    This will delete the countires table from database and create a new table. 
    Copy and paste in the RUN SQL box and press go. It might ask you if u want to delete table, click on yes.
    
    
    After this you need to add countries information. Search for line:
    
    INSERT INTO countries VALUES (1,'Afghanistan','AF','AFG','1');
    
    From this line copy till the end of countries table:
    
    INSERT INTO countries VALUES (239,'Zimbabwe','ZW','ZWE','1');
    
    Copy all the lines totaling in 239, and paste in RUN SQL box. This will add all the countires into database.
    
    If you dont want to display any country in drop down list, instead of deleting it from the database, in the admin section navigate to 
    Locations / Taxes -> countires 
    
    This will dispaly list of countires with information, there is heading "VISIBLE" under that there are two buttons. Red and Green. Green means country is visible and Red means invisible(not shown in dropdown list) Just click on Red button, that will prevent it from displaying on the site.


     
     
     

  2. How then do I get the US to the top of the list?
    Check this forum
    http://www.oscommerce.com/forums/index.php?showtopic=94671&st=0&p=375353entry375353
    
    Check this contribution
    http://www.oscommerce.com/community/contributions,2028


     

  3. What is the 'Address Format' function in the Locations--Countries section and what does it do?
     
    Address Format [1,2,3,4..] is the ID for the address_format table that is used to display address on the website. I guess it more of an effort to make address appear as they are used in the country. To check how address is listed in oscommerce open address_format table or in oscommerce.sql line 
    
    INSERT INTO address_format VALUES (1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country','$city / $country');
    
    1 is the id thats listed in countires section
    
    and corresponding field is how it displays address information
    
    $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country','$city / $country
    
    in here $cr tells php to add new line (next word is displayed on new line) and rest is self explanatory .


Free shipping problems:

I'm offering customers free shipping on all orders over $100. I set that up in Modules--Order Total. When I try it on my shopping cart it works properly, but my last 10 customers have been charged for shipping. It doesn't make any sense and I don't even know where to begin.

Check this contribution

http://www.oscommerce.com/community/contributions,146/category,2/search,free+shipping

 

Any help you can offer would be a big help.

 

Hamilton Collins

Sahara DryEar

Archived

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

×
×
  • Create New...