News:

Support the VirtueMart project and become a member

Main Menu

Override INVOICE and ORDERS

Started by padalec, July 22, 2014, 12:28:44 PM

Previous topic - Next topic

padalec

I need to modify emails (orders) which the shopper gets in the email inbox.

I copied the files from /components/com_virtuemart/views/invoice  to /templates/"mytemplate"/html/com_virtuemart/invoice

This didn't worked. So I googled and I found this topic: http://forum.virtuemart.net/index.php?topic=99506.0

which tells me to modify the line 180 in /components/com_virtuemart/helpers/shopfunctionsf.php (line 180):

Code: [Select]
      //Todo, do we need that? refering to http://forum.virtuemart.net/index.php?topic=96318.msg317277#msg317277
      //TK 20120309 LOYTEC patch next line: we do not need the template loaded - because of LIFO, the default user template is overwritten.
      //$view->addTemplatePath(JPATH_VM_SITE.'/views/'.$viewName.'/tmpl');


I did so, but now when I change order status in backend  it says:

500 - An error has occurred.
Layout mail_html not found

Any ideas?

I am on VirtueMart 2.6.6, Joomla 2.5.22, PHP 5.3

padalec


Milbo

I must first know whats going on here, lol.

Actually for me sounds you had whatever error and try to fix it with a 2 year old fix. I cannot believe that we have still the problem.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

padalec

I just need to make my own order templates for my shoppers ...

Milbo

Yes, so use vm2.6.7 and do not override something.

The real reason is maybe completly different. when you have an invoice, the old one is taken and not created new. Take the link, which you use to create the pdf and just remove the &format=pdf, then you adjust it easier then before.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

Quote from: padalec on July 22, 2014, 12:28:44 PM
I need to modify emails (orders) which the shopper gets in the email inbox.
Do you want to add or remove some information or do you just want some different text? If you just want different text, then you can probably use a simple Joomla language override.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

StefanSTS

Quote from: padalec on July 22, 2014, 12:28:44 PM
I copied the files from /components/com_virtuemart/views/invoice  to /templates/"mytemplate"/html/com_virtuemart/invoice

Or did you copy

from /components/com_virtuemart/views/invoice/tmpl  to /templates/"mytemplate"/html/com_virtuemart/invoice , which would be the way to do it.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

padalec

Quote from: jjk on July 28, 2014, 10:03:08 AM
Quote from: padalec on July 22, 2014, 12:28:44 PM
I need to modify emails (orders) which the shopper gets in the email inbox.
Do you want to add or remove some information or do you just want some different text? If you just want different text, then you can probably use a simple Joomla language override.

Yes i want to add more info and to style a little bit the email shoppers recieve in the inbox. I just want to know hoe to do this in order to retain my modifications after virtuemart updates.

Thank you

capewellmj


StefanSTS

Quote from: padalec on July 22, 2014, 12:28:44 PM
Yes i want to add more info and to style a little bit the email shoppers recieve in the inbox. I just want to know hoe to do this in order to retain my modifications after virtuemart updates.

Just edit the invoice.php and mail.html.php and put it in the invoice folder. Do not use the folder tmpl in your override folder and everything works find. You might want to change some more files that are called from invoice.php and mail.html.php like invoice_items.php or mail.html_pricelist.php. Just serch for something like echo $this->loadTemplate('order');, called from invoice.php, it will load the file invoice_order.php. Following this pattern you will find the files to edit.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.