chrometweaks.org

Is iPage.com good place for Asp.net hosting?

Click Here To View All Answers...


First off, Is iPage.com good place for Asp.net hosting? Hoping for any response. Another question on my mind: I have searched this forum as many ways as I can think of, and haven't been able to find the answer to a question that I'd think was common..

I have 2.2-MS2, almost entirely stock (at the moment.) In the places where a customer's address is asked for, such as create_account.php, I get just a standard text entry field for State rather than a pulldown list for the states in the country zone (US in this case)..

I see that this page looks for variables such as ACCOUNT_STATE, but these are not defined anywhere I can find. There is a configuration item for what looks to be this value in admin, and I have it set to true, but this makes no difference, nor does adding an explicit definition in application_top.php..

The code here clearly is looking to see if the zone has states, but I don't understand enough about PHP nor MySQL to figure out why it doesn't want to build the pulldown. The Zones configuration properly shows the zones for the US..

In the admin panel, My Store, Country is set to United States and Zone is set to New Hampshire. But I'd think that customers would be able to select their own country and then state. I wouldn't mind if it assumed US (since for my store, I won't be accepting non-US orders), but I need to understand how this is supposed to work and get the pulldown there..

What have I missed? Thanks for any help you can provde..

Steve..

Comments (12)

The answer is Yes, however you might wanna make sure and wait for someone else here to confirm it as I am not completely sure. Better yet, why don't you call the iPage guys because they can give you an answer better...

Comment #1

Matt,.

Your state pulldown list works great in osC 2.2 MS2.

Catalog/create_account.php.

And.

In.

Catalog/includes/modules/Order_Info_Check.php used by the Purchase Without Account contribution..

Thanks a lot!.

EricK..

Comment #2

Does anyone know how I can make it so only customers from the US can place an order? I can't figure out where or how to make the changes. I am using MS1.

Thanks.

Mike..

Comment #3

Backup first (in case you need to undo this). Then delete the countries that you don't want. There is an admin interface for this in MS2 that I think was in MS1..

Hth,.

Matt..

Comment #4

Matt,.

I join Erik in thanking you for your assistance. The code changes for the create_account.php file work flawlessly. By any chance have you also added a states pull down selection for the checkout_shipping_address.php & address_book_process.php files? The code in each of these two are almost identical, but different enough from the create_account.php script to be a bit confusing to someone just beginning to climb the learning hill (or mountain)..

Steve..

Comment #5

Matt,.

I must be missing something because your mod suggestion only worked partially for me..

I've reviewed your code and I just don't understand something. You suggest the following....

> /*      } else {.

448c449.

<     } else {.

> /*    } else {.

450c451.

<     }.

>     }*/.

What I don't understand is that there are TWO ".

/*.

" and only ONE ".

*/.

". It seems that one of those ".

/*.

" never gets closed appropriately..

After making the changes you suggest the new user registration screens work great (I get the drop-down list of states). The new user gets added to the database. The problem that I encounter is when I attempt to log. I enter the email address and password, and even though the user is in the database, after selecting "Sign In" I get bounced back (taken back) to the same Sign In screen. I never get logged in..

Am I correct in assuming that the unclosed ".

/*.

" might be causing the problem?.

-jp..

Comment #6

I doubt it, but you could leave off the second one and see if it helps. I don't really remember why things were commented out in that section...one of them might have been redundant. It's also possible that it relied on the comments treating /* /* */ the same as /* */, i.e. /* in comments are ignored usually (that's configurable in C, not sure about PHP). I could give a better guess with a copy of the modified code from 445 to 451..

If you use the forgotten password module, can you log in with the password you get then? If that password does not work, then I would think that the problem lies in the login.php page somewhere. Have you made any other mods recently?.

Hth,.

Matt..

Comment #7

Not surprisingly I got a little lost yet again. The additional files which I needed to change were in fact catalog/includes/modules/checkout_new_address.php and.

Catalog/includes/modules/address_book_details.php.

I ended up mixing together parts from posts made by Matt aka iiinetworks and.

Jason aka webguy. Credit goes solely to them. Thanks..

If anyone is interesested here are the changes I made to add a states pull down selection for the Update Address Book Entry, New Address Book Entry, & Delivery Information pages. (I suspect that there is a more elegant way to pull this off, but this seems to work.).

In catalog/includes/modules/checkout_new_address.php I replaced:.

<?php.

   if ($process == true) {.

     if ($entry_state_has_zones == true) {.

       $zones_array = array();.

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '"(int)$country"' order by 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);.

     } else {.

       echo tep_draw_input_field('state');.

     }.

   } else {.

     echo tep_draw_input_field('state');.

   }.

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

?>.

   </td>.

 </tr>.

<?php.

With:.

<?php.

   //    if ($process == true) {.

     //      if ($entry_state_has_zones == true) {.

       $zones_array[] = array('id' => '', 'text' => 'Please Select');.

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

       //'"(int)$country"' order by 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, 'Please Select');.

     /*      } else {.

       echo tep_draw_input_field('state');.

     }.

   /*    } else {.

     echo tep_draw_input_field('state');.

   }*/.

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

?>.

               </td>.

             </tr>.

<?php.

And in catalog/includes/modules/address_book_details.php I replaced:.

<?php.

   if ($process == true) {.

     if ($entry_state_has_zones == true) {.

       $zones_array = array();.

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '"(int)$country"' order by 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);.

     } else {.

       echo tep_draw_input_field('state');.

     }.

   } else {.

     echo tep_draw_input_field('state', tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));.

   }.

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

?></td>.

         </tr>.

<?php.

With:.

<?php.

   //    if ($process == true) {.

     //      if ($entry_state_has_zones == true) {.

       $zones_array[] = array('id' => '', 'text' => 'Please Select');.

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

       //'"(int)$country"' order by zone_name");.

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

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

       }.

     if (tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) == "") {.

Echo tep_draw_pull_down_menu('state', $zones_array, 'Please Select');.

} else {.

     echo tep_draw_pull_down_menu('state', $zones_array, tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));.

}.

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

?>.

             </td>.

           </tr>.

<?php.

Hope this helps someone...

Comment #8

Matt, I have to extend my apologies. Although I haven't taken time to go back and evaluate your code revisions it seems that something else is causing the issue that I described earlier....

I've been noticing some problems that are specifically related to accessing my osCommerce iPage site via MSIE. It seems to be a caching issue, but I'm not quite certain. I had returned the login file back to "normal" after encountering the problem that I described earlier. When I tried to log in with MSIE v5.50 I encountered the same, quirky problem described earlier. However, on the exact same PC, when using Mozilla 1.5, the problem was non-existent. I was able to log in normally.



Sure wish I had a handle on this. Kinda bad having to tell my clients... you must use Mozilla or a recent version of MSIE in order to assure a quality shopping experience..

Hey, thanks for the mod! I'll re-install it and will report back to the Forum..

This post has been edited by.

VideoDude.

: 23 December 2003, 22:39..

Comment #9

I ended up writing my own contribution to do this right:.

Country-State Selector..

Comment #10

Great contrib, I'm installing it as we speak..

1 thing, the install instructs aren't copy/paste friendly in the way they are written. If it's just me or my machine, let me know. But I've had to copy/paste and manually add my line feeds..

Great contrib though, I'll let you know if I have any problems with it.....

Comment #11

Theres an error in this contrib. When you go into account info then into your address book then hit edit on one of your address book entries you get an.

Parse error: parse error, unexpected '}' in /www/f/fmabdulky/htdocs/catalog/address_book_process.php on line 205.

I then tried taking out the } and then whenever you edit or delete an address book entry, it creates a new entry with a " , " as the only entry...

Comment #12

I know about the install instructs issue - discovered that minutes after I posted! I will fix that today., though as an alternative you can copy the code out of the supplied files..

Ryanf, I don't get that on my site, which I edited following the install instructions. What do you have between lines 195 and 210?.

I suggest moving discussion of this contribution to.

Http://forums.oscomm...showtopic=88987..

Comment #13


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