News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Billing/shipping addresses show incorrect state on user account page

Started by kbishop, September 03, 2019, 21:33:08 PM

Previous topic - Next topic

kbishop

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).

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

kbishop