osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

weird problem when customer creates account

This is a discussion on weird problem when customer creates account within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hi I have installed all the uk counties as zones, and set the default country to UK (222), however, when ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-19-2005, 08:09 AM
Active Member
 
Join Date: May 2004
Location: somewhere above colchester uk
Posts: 147
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
battleaxe
Default weird problem when customer creates account

Hi

I have installed all the uk counties as zones, and set the default country to UK (222), however, when i try to create a new customer account the field for Sate (which is my County field) is a plain text box. However, if I make a mistake in the form and it refreshes, the State field then becomes the drop down box that I want with all my counties in it as it should be.

Beneath is the code pertaining to 'state' in create_account_tpl.php - can anyone see what is wrong, cos I have spent all day on this and for the life of me cant find it.

Quote:
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?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 ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
ps I have tried the code from here http://forums.oscommerce.com/index.p...53879&st=0 and it works fine, but only really works if you only ship to one country

cheers for any help
Kim
__________________
Google says be nice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 02-19-2005, 11:56 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,481
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: weird problem when customer creates account

This is an annoying bug that has been in osCommerce for a long time. This mod fixes it:

http://www.oscommerce.com/community/...,country+state
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 02-19-2005, 01:45 PM
Active Member
 
Join Date: May 2004
Location: somewhere above colchester uk
Posts: 147
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
battleaxe
Default RE: weird problem when customer creates account

Cheers Michael


I have done as you suggested (don't I always) and I have made a clean install of the country and state mod and I now have it working. I installed the latest edition with all the extra stuff in the javascript file.

There is a nice dropdown box now for 'state'

However, i am still coming up with another problem: When I change country, the page does not refresh the state drop down box. For example, my default is united kingdom, and if I change the country using the dropdown box from that to (for instance) the USA, the zones in the 'state' dropdown box remain UK counties and not US states.

I have 2 form_check.js.php files (presumably cos MAX uses BTS) and I have added the new code (as per the mod) to both of them. I use the latest firefox, but have tested in IE6 also and the problem is the same, no refresh of 'states' dropdown box. Bit of a setback if someone outside the UK wants to use it!

Any help or suggestions would be greatly appreciated.

Cheers
kim
__________________
Google says be nice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 02-19-2005, 02:12 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,481
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: weird problem when customer creates account

You need to specifically add this to your main_page.tpl.php file in the <head> section:

Code:
<?php require('includes/javascript/form_check.js.php'); ?>
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 02-20-2005, 03:42 AM
Active Member
 
Join Date: May 2004
Location: somewhere above colchester uk
Posts: 147
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
battleaxe
Default RE: weird problem when customer creates account

Cheers Michael

I so much wanted to say whoopeee, thats cracked it but.... I tried it in head under the following code
<?php if ($javascript) { require(DIR_WS_JAVASCRIPT . $javascript); }?> and then at the top of the head section, but no change, either in IE6 or Firefox.

I know there was an issue with Javascript with the XP sp2 upgrade, but I have checked it on a machine that escaped that upgrade, and it still doesnt refresh at all
__________________
Google says be nice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 02-20-2005, 09:06 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,481
Thanks: 73
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: weird problem when customer creates account

Put it above <?php if ($javascript) { require(DIR_WS_JAVASCRIPT . $javascript); }?> and it will work. If not, make sure you have correctly added the function to includes/javascript/form_check.js.php

I have it working in the dev version of osCMax and that is the exact issue I had. It will work for you eventually. Basically, the problem is that your template is loading form_check.js.php or trying to, but it cannot find the page refresh function.

I suggest debugging in Firefox. Load the page, try to change the country and then open the Firefox Javscript console. You will see an error telling you what the issue is.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 02-20-2005, 01:26 PM
Active Member
 
Join Date: May 2004
Location: somewhere above colchester uk
Posts: 147
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
battleaxe
Default RE: weird problem when customer creates account

Thanks Michael, whoopee, sorted.

The problems were that :-because of BTS, some of the new code had to go in template files instead of the create_account.php... in fact the instructions for modding that file for MAX should indicate 3 files...mainpage.tpl.php, create_account.tpl.php and create_account.php. Maybe I should add a readme file for MS2 MAX so that people here can mod for this contribution more easily. Although if people are paying attention, if they pull up those files in Dreamweaver they can do it with a Find - Replace function, so long as they check on each file.

thanks loads
Kim
__________________
Google says be nice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Email not sent after new customer account is created. Dumb_Question osCMax v2 Installation issues 7 12-16-2005 04:37 PM
Weird problem Walter osCommerce 2.2 Modification Help 0 06-14-2004 04:43 PM
customer account requirements cutxpaste osCommerce 2.2 Modification Help 3 11-07-2003 08:51 PM
Weird problem >>> editing some products and categor Anonymous osCMax v1.7 Discussion 0 10-27-2003 11:21 AM


All times are GMT -8. The time now is 07:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax