Author Topic: Customising the admin order confirmation email  (Read 2750 times)

jimleeder123

  • Jr. Member
  • **
  • Posts: 207
    • My Website
  • VirtueMart Version: 3.0.12
Customising the admin order confirmation email
« on: February 20, 2015, 12:31:12 pm »
My company prints out the admin order confirmation email for clients so they can easily see the orders coming in.

When attributes have been set to their default values, we want them to not be displayed on the e-mail.

For example - an attribute "Extra Toppings" would have the values - "none", "Peppers", "Cheese", "Pepperoni".      So this attribute would not be displayed on the e-mail if the customer left it set as default.

Is this possible to implement? I imagine its a bit of PHP doing an if statement. Can someone point me to the right file AND/OR let me know/help me do it.

Thanks in advance.

Using Joomla 1.5 and VM1. Not going to upgrade to next Joomla/VM as we're having problems with the VM3 e-mails as it is on a different website.
Web Developer and blogger

Joomla 3.4.8  (2.5 on some)
VM 3.0.12
PHP 5.6 (5.4 on websites with Joomla 2.5)

http://jimleeder.co.uk

jimleeder123

  • Jr. Member
  • **
  • Posts: 207
    • My Website
  • VirtueMart Version: 3.0.12
Re: Customising the admin order confirmation email
« Reply #1 on: February 20, 2015, 17:07:54 pm »
My colleague and I worked this out. You edit the ps_product file in administrator - components - com_virtuemart - classes. You do a string replace for the attributes you want affected at the end of the "getDescriptionWithTax" function.

For example, if you want "Remove Topping" to not be shown when its selected at its default value - "none" in this case - then you replace the string "Remove Topping: none" with "" using PHP.

This is useful if you print out the e-mail and need it to be cleaner, and only show the attributes if they have a default value set other than the default value.
Web Developer and blogger

Joomla 3.4.8  (2.5 on some)
VM 3.0.12
PHP 5.6 (5.4 on websites with Joomla 2.5)

http://jimleeder.co.uk