VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: sfinx on October 01, 2013, 23:07:14 PM

Title: Order confirmation emails
Post by: sfinx on October 01, 2013, 23:07:14 PM
Hi

Hopefully someone will be able to help me with my problem. I need separate emails for different  order statuses. For example:
1.) when user orders -he gets email with account details, order details + thank you note
2.) When order is shipped I would like only info that Order was shipped
and so one...

As far as I can see at the moment the same email is sent over and over again, only Subject of email is changed (comfirmed order on..., shiped....)

I guess I could load different files into main order template, but I dont know hot to make php code to work. Something like if -order status "shipped" load this template....

My versions:
Joomla 2.5 VM 2.0.22C

Is that possible. Please help
Title: Re: Order confirmation emails
Post by: Maxim Pishnyak on October 03, 2013, 15:37:25 PM
Quote from: sfinx on October 01, 2013, 23:07:14 PM
Subject of email is changed (comfirmed order on..., shiped....)
So you could use a php condition IF for switching to a correct layout in your main order template.
Title: Re: Order confirmation emails
Post by: sfinx on October 04, 2013, 12:37:23 PM
Yes I figured that could work, but I dont know how to write that code. I am new in php. I only understand HTML and CSS... So I would basically need someone who is willing to help me write it. I will be able to make separate email templates my self, by copying original and editing, but to make a link if order is lets say comfirmed thats a mistery to me.

The same logic would be than applyed with payment methods. I will have 2 options for payment and I would like different emails for each.

thanx
Title: Re: Order confirmation emails
Post by: Maxim Pishnyak on October 06, 2013, 12:35:06 PM
I wouldn't recommend something really complicated. There are plenty IF statements in VM template files. Check used syntax and make some probes. Don't forget to post here what you will get.
Title: Re: Order confirmation emails
Post by: sfinx on October 06, 2013, 19:05:53 PM
If anyone will need this in future. I managed to find similar solution here forum http://forum.virtuemart.net/index.php?topic=116355.0 (http://forum.virtuemart.net/index.php?topic=116355.0) (I cant belive I overlooked that)
I made some adjustments - posted in upper link (not very elegant ones, but it is working).
So check it out if you need this.