News:

Looking for documentation? Take a look on our wiki

Main Menu

Template override not working for order emails

Started by Jason Farmer, October 24, 2012, 13:26:54 PM

Previous topic - Next topic

Jason Farmer

Created a new file .../templates/<default template>/html/com_virtuemart/invoices/mail_html_shopper.php

but its not getting picked up... so had to change core file in .../components/com_virtuemart/views/invoices/tmpl/ :(

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

bytelord

Hi,

the right path should be /templates/<your_joomla_template>/html/com_virtuemart/invoices/mail_html_shopper.php

vm and joomla versions?

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Jason Farmer

Quote from: bytelord on October 24, 2012, 15:34:41 PM
Hi,

the right path should be /templates/<your_joomla_template>/html/com_virtuemart/invoices/mail_html_shopper.php

vm and joomla versions?

Regards

I have the right path - same as the one you posted.
vm & joomla versions as per signature : vm 2.012b J 2.5.6

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

bytelord

Hello,

You said <default template> for that reason i said <your_joomla_template>, working for me, have you select other template override from the vm backend configuration?

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Jason Farmer

Ah I see , thank you for the clarification.

Yes, I have several vm template overrides are working, just this one that isn't.

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

bytelord

Hi,

This one is when customers confirm the order ... am i right?
So that template will be used when customer confirm the order (order status  Confirmed by shopper - U).

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Jason Farmer

Its used when the order is set to confirmed C in the admin area...
and that's probably where I'm going wrong. I'll create a template override on the admin side.

Thank you.

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

Jason Farmer

Hmm, no thats not it, the same template is used for both cases.

[tr][td][/td][td]
Development[/td][td]Production[/td][/tr]
[tr][td]VirtueMart   [/td][td]
2.0.12b
[/td][td]
1.1.3
[/td][/tr]
[tr][td]Joomla!   [/td][td]
2.5.6
[/td][td]
1.5.14
[/td][/tr]
[tr][td]Mysql  [/td][td]
5.5.8
[/td][td]
5.0.51
[/td][/tr]
[tr][td]PhP   [/td][td]
5.3.5
[/td][td]
5.2.4
[/td][/tr]
[/table]

bytelord

ok, give me some time to take a better look
Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

almoravit

Hi,
I have a similar problem (maybe the same) with VM 2.0.12f and Joomla!v2.5.7
All template overrides are working perfectly except the pdf attached in email when an order is confirmed, which instead of using the overrided files is using the component files. However, when I use the create invoice button in backend it uses the overrided files as it is supposed to do.
By the moment I will try this temporary patch https://forum.virtuemart.net/index.php?topic=100543.0
Regards!

PRO

the order emails used to be sent from another file in earlier versions of vmart 2.0

Make sure those OLD files are not still there


almoravit

Quote from: PRO on November 01, 2012, 22:18:26 PM
the order emails used to be sent from another file in earlier versions of vmart 2.0

Make sure those OLD files are not still there
Hi PRO,
Which files should I check for?
Thanks in advance.

bytelord

Hello,

mail_html_shopper.php is used and is for the customer orders ... i test it and works just fine. So there is no issue with that.
the other you could check is from the backend if you have configured your mail send as html or raw... because if raw enabled then the file is mail_raw_shopper.php

I think you placed on the wrong place ... i have to say it again, the right path is /templates/<your_joomla_template_you_use>/html/com_virtuemart/invoices/mail_html_shopper.php

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

almoravit

#13
Hi bytelord,

first thanks for your help :)
Email is set to HTML.
I have the issue with invoice*.php, but only when the order status is changed to any state which will send the email. In that case the attached PDF is created using the /components/com_virtuemart/views/invoice files instead of being created using /templates/the_template_I_use/html/com_virtuemart/invoice files.
Curiosly if I push the 'Invoice' button on the backend orders list (under the big printer icon) the override is working perfectly.

Again, thanks!

bytelord

Hi,

When you click the pdf button from the be the url is /index.php?option=com_virtuemart&view=invoice&layout=invoice&format=pdf&tmpl=component&virtuemart_order_id=9&order_number=xxxxxxx&order_pass=xxxxxx
So, the PDF view is been regenerated for an existing order...but

When order is been placed for first time and status changed to the preferred status that send the pdf invoice, pdf generation take place ... when you resend that mails ... just resend the file located under {safe_path}\{vmfiles}\invoices\xxxx.pdf
So, if you make your changes inside your template and try to "play" with an already existing order just resend the file under {safe_path}\{vmfiles}\invoices\xxxx.pdf ... so there is no regeneation ... try to place a new order or delete the file for testing purposes in a testing installation to be regenerated.

Not sure if am right, but please test.

Regarsd
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!