gonebdg - webindoshop.com Posted April 11, 2010 Share Posted April 11, 2010 Prestashop v.1.2.5I've Post this issue in Bug Tracker :http://www.prestashop.com/bug_tracker/view/4130/My Country Indonesia, have a lot of province (33 area) and City + Regency + Sub.District (about 5449 area)This all 5449 area is use by our Shipping carrier JNE, in determining shipping costs.Curently in my Production site http://webindoshop.com , I use scenario-1 for this shipping cost. Zones = Default Zones + (City + Regency + Sub.District) = more than 5449 zones areaCountry = Default Country + (City + Regency + Sub.District) = more than = 5449 area States = Only Default StatesThis Configuration (scenario-1), is bring some difficulty to my visitor for registering in my website, because they have to choose/scrolling country to select more than 5449 before they find suitable area that macth with they're residence/address.Because of this reason, i developed new configuration about Zones, Country and States call scenario-2.Zones = Default Zones + (City + Regency + Sub.District) = more than 5449 zones area Country = Default Country + Province (33 new area)States Default States + (City + Regency + Sub.District) = more than 5449 zones area This scenario-2 seems to be working well ... I test in my localhost, register a new user account = Done ! (States show up base on selected Country)But when i test to updating/modifying address tat already created during registration, also when i test to create new address in my user account, Strange Behavior shoing up in My Prestashop :ahhh: States won't showing up if i select contry that have several states, and block categories module (in left colum) doesn't show the categories ...So the updating or creating new address process can't be Created ! Because 1 required filed (states) can't be selected ...I guess, this problem came because the number of States (more than 5449 states). So i reduce the number of Zones also States area to only 900 area in my shipping configuration. Testing again And everything is Ok ! Is that Prestashop v.1.2.5 doesn't support Unlimited States yet ?!?! Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted April 13, 2010 Author Share Posted April 13, 2010 According to Developer answer ... in http://www.prestashop.com/bug_tracker/view/4130/I’ve done check my state database. There is No forbiden character found, but i’m realize now that “States Field Name” can only have 32 Character.So I check again all my states database and truncating all data that have more than 32 charater.But the problem persist I wonder, if there is something wrong with my database, why can i creating address when register(create new account process) but can’t modify it or creating new address after registered ?!?!I know that the blockcategories problem is because javascript error. But why the problem just came up when i modify or creating new address and not in register process ?!?!So what is the problem here ?Please give me suggestion Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted April 13, 2010 Author Share Posted April 13, 2010 YES ! YES ! YES ! ......... I Finally found what the problem is ....Here the authentication.tpl script line-4 to line-17 :PAY ATTENTION TO // LOOK [at] HERE! \\ MARKING [removed] // <![CDATA[ idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}false{/if}; countries = new Array(); {foreach from=$countries item='country'} {if isset($country.states)} countries[{$country.id_country|intval}] = new Array(); {foreach from=$country.states item='state' name='states'} countries[{$country.id_country|intval}]['{$state.id_state|intval}'] = '{$state.name|escape:'htmlall':'UTF-8'}'; // LOOK [at] HERE ! \\ {/foreach} {/if} {/foreach} //]]> [removed] And Here the address.tpl script line-7 to line-23 :PAY ATTENTION TO // LOOK [at] HERE! \\ MARKING [removed] // <![CDATA[ idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}false{/if}; countries = new Array(); {foreach from=$countries item='country'} {if isset($country.states)} countries[{$country.id_country|intval}] = new Array(); {foreach from=$country.states item='state' name='states'} countries[{$country.id_country|intval}]['{$state.id_state|intval}'] = '{$state.name}'; // LOOK [at] HERE !\\ {/foreach} {/if} {/foreach} $(function(){ldelim} $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}]').attr('selected', 'selected'); {rdelim}); //]]> [removed] Change the code inside address.tpl : '{$state.name}'; With code, Exactly the same as authentication.tpl : '{$state.name|escape:'htmlall':'UTF-8'}'; And The Problem Solved !I'll check again to make sure if all the problem about this topic is really ... really Solved Link to comment Share on other sites More sharing options...
JFOC Posted April 29, 2010 Share Posted April 29, 2010 kok bisa gitu ya perlu pake UTF-8 ? emanngya unicode ya ?disini kasusnya tidak bisa edit dengan pesan error 'city is required' sebelum diubah jadi utf-8 field city nya tidak muncul... Link to comment Share on other sites More sharing options...
belladict Posted April 21, 2011 Share Posted April 21, 2011 Can province be shown as a drop down menu?So it'll be like this Choose Country --> Choose Province --> Choose Stateand the page doesn't need to load all 5000 delivery area at a time...Is it possible? Link to comment Share on other sites More sharing options...
jhonzz007 Posted December 19, 2011 Share Posted December 19, 2011 yup.. I have same question with belladict.. Is it possible to make like this? Choose Country : (Field is drop down menu) --- Then we choose --- Choose Province : (Field is drop down menu) --- Then we choose --- Choose State : (Field is drop down menu) --- Then we choose --- is it Possible? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now