×

Notice

The forum is in read only mode, no posting is allowed. For support requests please login and use the Support -> Submit ticket menu.

× Only users that have bought a subscription can post here.

Format of address in emails

  • Posts: 1
  • Thank you received: 0

M L created the topic: Format of address in emails

Hi there,

Thanks for a great product.

Is there a way to format the Bill To address shown in the emails?

For example, the address in my emails reads like this:

Firstname
Lastname
Street Address
City
Country
State
Zipcode
email address

I would like it to display like this:

Firstname Lastname
Street Address
City State Zipcode
Country
email address

Was looking at editing the mail_html_shopperaddresses.php override file and tried adding

$addressBTOrder = array('first_name', 'last_name{br}', 'email{br}', 'company{br}','address_1{br}', 'address_2{br}', 'city{br}', 'county{br}', 'zip{br}', 'virtuemart_country_id{br}', 'phone_1{br}');

... Without success.

Any ideas?

Regards,
#1
  • Posts: 1428
  • Karma: 24
  • Thank you received: 384

Spyros Petrakis replied the topic: Format of address in emails

Hi,
the file is right but your array is wrong, try something like the following to create the array.
<?php
$fields = array();
foreach ($this->userfields['fields'] as $field) {
if (!empty($field['value'])) {
	$fields[$field['title']] = $field['value'];
  }
}?>

Then you can access the values like this:
echo $fields["First Name"] . ' ' .  $fields["Last Name"];
#2

Web Hosting

Business Info

  • Petrakis K. Spyridon
  • VAT Num. : EL052816594
  • Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
  • Address: 8 Glaukou str.
  • 201 32, Corinth, Greece

Get notified

about new templates, updates and freebies!