VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: hk on April 30, 2014, 17:16:22 PM

Title: Shopper's field reorder in mails
Post by: hk on April 30, 2014, 17:16:22 PM
Hi,

In VM, the Ordering of Shopper Fields is such that state_id is after country_id, i.e.
virtuemart_country_id - 38
virtuemart_state_id - 40

This helps the user while registration that he has to select Country and based on his selection the State names are filtered.

However, in the emails and in the invoices, I want to show the address as State name and then the Country name.
First_name Last_name
Address_1
Address_2
City Zip
State
Country


There is an older post http://forum.virtuemart.net/index.php?topic=115486.msg390088#msg390088 which shows how to customize the fields, however I'm not sure how do I change the order of the fields
Title: Re: Shopper's field reorder in mails
Post by: GJC Web Design on April 30, 2014, 19:21:43 PM
yes - it's the same file and section - but instead of using a foreach loop you would have to build your own sequence  or loop past the State and Country (with a continue) and echo them out at the bottom

something like

echo $this->userfields['fields']['state'].'<br />'.$this->userfields['country'];