Supertex Posted February 2, 2016 Share Posted February 2, 2016 I've noticed the account creation page initially allows a text box for the state, and then if there was an error on submission, switches to a drop down. I've seen several customers that for whatever reason, end up creating another account...and apparently try to use the same email address. When the page refreshes, telling them that email is already in use, it has already taken the country designation into account, and populated the 'State' drop-down. The problem is, the customer doesn't realize this - and of course the state selection is defaulted to whatever is atop the list, so they proceed on without making the proper selection. Next thing you know we have a ton of accounts with Alabama (for the US case) incorrectly defined at their state...shipping modules cant match the ZIP to the state...and then the emails begin. Seems to me a good way to remedy this would be for the default selection to be blank, as it would require action from the user before the form could be submitted. I know there are mods that default the state field to a drop down, and/or 'remember' the field's contents upon a page refresh. Those may well remedy the issue, but how difficult would it be to add the blank to the top of the drop down state list? And would that cause any issues anywhere else? osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
MrPhil Posted February 2, 2016 Share Posted February 2, 2016 How about code to prompt "Select your state"? I understand that there is an HTML5 attribute to put a prompt message in such a place. You could also force a "state" with that text at the top of the list, and reject it if the customer doesn't make a selection. That could be done not only on the server, but also in Javascript. Anyway, a prompt would be far better than a blank (or a default state). Maybe it would be more fruitful to attack why some customers are trying to create a second account. Perhaps they forgot they had an account already, or forgot the password? Something in the error message about the email address being duplicated might advise them how to deal with forgotten accounts/passwords. Link to comment Share on other sites More sharing options...
burt Posted February 2, 2016 Share Posted February 2, 2016 How it is done in the country dropdown. Apply exact same concept to the states dropdown aka $zones_array Link to comment Share on other sites More sharing options...
Supertex Posted February 2, 2016 Author Share Posted February 2, 2016 @@burt That's where I was headed, but I was looking at the html_output file. Changing the create_account.php did the trick: if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $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, $zones_array[$zone_id]['id']); } else { echo tep_draw_input_field('state'); } } else { echo tep_draw_input_field('state'); } @@MrPhil ...You could also force a "state" with that text at the top of the list, and reject it if the customer doesn't make a selection.... That's exactly what I was after. The state field is subject to minimum values (2), so it cannot be left blank. Having the blank at the top of the drop down by default enforces that requirement. If they DO enter a state correctly, then this line will make it persistent, even after a page refresh converts the text field to the drop down: echo tep_draw_pull_down_menu('state', $zones_array, $zones_array[$zone_id]['id']) I found that in another post, but had to make one small change in order for it to work with the 'blank', else it would give TN when TX had been entered. Originally it was: echo tep_draw_pull_down_menu('state', $zones_array, $zones_array[$zone_id - 1]['id']) Problem solved, as far as I can tell. Thank you both, very much. osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.