chrometweaks.org

iPage? This Virtual Directory does not allow contents to be listed.?

Click Here To View All Answers...


My 1st question is: iPage? This Virtual Directory does not allow contents to be listed.? Thanks for any comment. Another quick question... Hi there,.

I need to change some account-/registration-constants, but I cant find the file..

Could anyone tell me please where that file can be found?.

Another question:.

When I try to register an account in the shop, I have to enter a state/province..

1. Where are the lists for the states of each country?.

2. How can I disable the requirement of this field?.

Thanks..

Comments (48)

I would like to know the answer too. Anyone here know what is the answer. I'll do some investigation and get back to you if I find an useful answer. You should email the people at iPage as they probably could help you..

Comment #1

Hi there,.

First of all. Im not happy either with this forum because the search engine just doesn't make sense (and believe me I know how to query). I think there should be an FAQ or something and the search engine should be updated. But ohh well. Its free so I won't complain!.

Anyways .....If you want to just disable the field then in the Admin panel/ configuration / customer details you should disable the fields you don't want. They will not show in the account creation form ..

The countries are listed in a database. You could either delete them all or go to.

Http://forums.oscommerce.com/index.php?showtopic=88244&st;=10.

Where they explain what else you could do..

The other solution I used was to leave the whole table intact but use the default_country contribution..

Http://www.oscommerce.com/community/contri.../search,country.

What Im stuck now is that Netherlands is my default country but the user has to input his data first and get an error before the dropdown menu with states comes up. Really weird...

Comment #2

I can help with part of this... What I find puzzling is that the way the stock osC handles country/state is so lame, and generates so many complaints, but nobody has come up with a good solution. (At least in all my searching, I haven't found one.) I am working on one myself, but it involves JavaScript where I'm far from an expert, so I'm treading slowly..

Here's what I have so far that should at least be an improvement over stock. I show here changes for create_account.php. I haven't worked this in to the address book code yet..

First, find the line:.

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));.

At around line 252. Add after this:.

If (!isset($country)){$country = 223;}.

Replace 223 with the appropriate code for your country..

Next, replace the code that displays the state list (around line 415) with the following:.

<?php.

       $zones_array = array();.

        $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = "$country" order by zone_country_id DESC, zone_name");.

       while ($zones_values = tep_db_fetch_array($zones_query)) {.

         $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

       }.

       echo tep_draw_pull_down_menu('state', $zones_array);.

   if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">'ENTRY_STATE_TEXT;.

?>.

Last, replace the line that displays the country list with this:.

               <td class="main"><?php echo tep_get_country_list('country',$country)'&nbsp;'(tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">'ENTRY_COUNTRY_TEXT'</span>': ''); ?></td>.

The effect of this will be to cause the default country to appear preselected in the country list and to have that country's states show in the state list..

What I haven't got yet is a way to cleanly allow the user to change the country and have the state list change accordingly. There are two approaches one can take that I can think of:.

1) Load ALL the states in the zone table into an array and use JavaScript to filter out only the ones for the current country. Use an onChange action for the country to call a function that resets the state list in the browser..

2) Use an onChange action to "submit" the form in such a way that the check for missing fields is skipped and when the page refreshes, the new selected country is used for filling in the state list..

1 is the more traditional approach to this and is more natural to use, but I cringe somewhat at loading an array with all 181 or so zones. Maybe that isn't so bad....

2 seems cleaner, but is a bit jarring to the user (screen visibly refreshes) and is more complicated to code..

I will be working on this over the next few days and will see what I come up with. If any of you are JavaScript wizards, you could probably do it faster...

Comment #3

Ok, I have it working.. I took approach 2 - wasn't as hard as I thought. Getting the address book to work right took more effort, but that's done too. Stay tuned for my first Contribution!..

Comment #4

Hi there,.

I need to change some account-/registration-constants, but I cant find the file..

Could anyone tell me please where that file can be found?.

Another question:.

When I try to register an account in the shop, I have to enter a state/province..

1. Where are the lists for the states of each country?.

2. How can I disable the requirement of this field?.

Thanks..

Comment #5

Hellloooo?!?.

Everytime I'm posting a question into this forum I dont get any answer..

Why cant anyone answer such a simple question?..

Comment #6


This question was taken from a support group/message board and re-posted here so others can learn from it.