3

The customer ordered a product and received an email.

http://img197.imageshack.us/i/emptyfieldsemail.png/

But there are optional fields and I want to remove them from email body if they are not filled by the user. If the company name is not filled in then I dont want to show them in the email but i cant find the place to edit.

In the components
/components/com_virtuemart/themes/theme048/templates/order_emails
I found some templates but cant figure out where to edit those empty fields

wallace740
  • 1,380
  • 5
  • 19
  • 36

1 Answers1

1

You can change the template in the administrator/components/com_virtuemart/html/templates/order_emails/email_english.html "Remember the language at the end of the file email_your_language.html , the filename with the default language of your Virtuemart Installation is usually the file that needs to be edited."

The email template is populated with content from the administrator/components/com_virtuemart/classes/ps_checkout.php file using the method function email_receipt(). The email_receipt() function defines placeholders in the template and the values of them are being assigned by using the function str_replace.

I hope this information helps

Elitmiar
  • 35,072
  • 73
  • 180
  • 229
  • There is no templates/order_emails folder in /administrator/components/com_virtuemart/html [link]http://img714.imageshack.us/i/notemplates.png/ in the ps_checkout.php I could not find the place to remove the label Company Name – wallace740 Mar 15 '11 at 10:43
  • 2
    @wallace740 - Try the following - In components/com_virtuemart/themes/default/templates/order_emails/confirmation_email.tpl.php I think between line 21 and 35 try removing lines to see if it solves your problem – Elitmiar Mar 16 '11 at 08:08
  • I removed lines but then it stops sending emails. I think the problem is from line 86(begin shipto) there is a foreach statement. I dont want to show each statement, I want to check whether foreach( $shippingfields as $field && [if shippingfields is not empty] ). I think I must write an if statement there while calling the shipping fields – wallace740 Mar 16 '11 at 08:39