Jump to content

State in not showing after refreshing page during "one page guest checkout"


Recommended Posts

Hello,

 

I just found a bug on one page guest chekout:

 

After you fill in all required vields you can click save and view the list of payment methods.

But if you don't pay immediately after saving information and and refresh the checkout page or go to another page and then come back to checkout, you can see that all data is saved except the state.

The state field is reset every time you refresh the page.

 

However, if you place an order in this case, your previous state selection will be applied. I mean it doesn't actually affect the order process, but I think it should be better if all data was displayed correctly even after page refresh.

 

This bug is present in fresh installed PS 1.5.3.1

However it was not present in fresh installed PS 1.5.3.0

Edited by Amazzing (see edit history)
Link to comment
Share on other sites

  • 6 months later...

in case somebody has the same issue, this is how I fixed it:

 

go to order-opc-new-account.tpl and add this JS

 

<script type="text/javascript">
 var newstateid = "{$delivery->id_state}";
 {literal}
 $(document).ready(function(){				 
  $('#id_state').val(newstateid);	
 });   
 {/literal}
</script>

 

I added it right after <select name="id_state" id="id_state"> <option value="0">-</option> </select>

 

But it has to work, wherever you place it

 

If there is an easier workaround, you can share it here :)

Link to comment
Share on other sites

×
×
  • Create New...