VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: kbishop on September 03, 2019, 21:33:08 PM

Title: Billing/shipping addresses show incorrect state on user account page
Post by: kbishop on September 03, 2019, 21:33:08 PM
Issues when viewing existing billing/shipping address from the user account:
1. The state field shows "--" (empty) instead of the correct state. The drop down is populated with states, but the correct state is not selected.
2. The state field shows the state for a different address (sometimes this will be the state from the user's billing address, other times the state from one of the user's other shipping addresses) instead of the correct state.

The correct state is stored for the billing/shipping addresses, just displays incorrectly.

I've made the following changes and correct state is now showing for all billing/shipping addresses but hoping to either resolve the issue without making changes to the core unless this is indeed a bug.
1. templates/t3_bs3_blank/html/com_virtuemart/user/edit_address_userfields.php: A hidden element added to the address state field, holds the correct state to be selected from the drop down.
2. components/com_virtuemart/assets/js/vmsite.js: If the state has been provided by the template (as in above), then select the appropriate field value from the drop down once the options (states) have been populated for the selected country (United States or Canada).
Title: Re: Billing/shipping addresses show incorrect state on user account page
Post by: jenkinhill on September 03, 2019, 22:31:50 PM
See http://forum.virtuemart.net/index.php?topic=79800.0
Title: Re: Billing/shipping addresses show incorrect state on user account page
Post by: kbishop on September 03, 2019, 23:34:01 PM
VM 3.4.5.10063
Joomla 3.9.10
PHP 7.2.5