2

I am trying to change the layout ( css/html structure) of Virtuemart 2 order verification emails. Problem is that I have to make a fake purchase each and every time I do a change in the 10 different files (located @ components/com_virtuemart/views/invoice/order/tmpl) that create this email template.

The closest "preview" I got was this direct access url "http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=invoice&format=html&tmpl=component&virtuemart_order_id=1401"

But again it loads Joomla's head/body elements not the actual email template.

So how can I have a "preview" of how the template looks like with my new changes BEFORE make an actual test purchase? Is this possible?

George D.
  • 1,630
  • 4
  • 23
  • 41

1 Answers1

2
  1. You shouldn't change the core files otherwise the next update of VirtueMart (of which there are many) will erase your changes.

  2. You should use Joomla!'s template overrides which VM2 supports that way you can update as needed to new versions without loosing your changes. See this article on docs.joomla.org on "How to override the output from the Joomla! core" and this one on template overrides.

3. You need to add the &format=raw at the end of the link to retrieve just the output of the component with out the template/html body wrapped around it. Of course that relies on the component as well.

I was going to suggest using raw, but looking at the current VM2 it doesn't properly support the format=raw option. Looking at the mail layout in the invoice view it not structured to return it the way you expect, it actually generates a HTML version by default with a matching text only version.

The best I could come up given those two options

  1. Return a close equivalent of the HTML email
    http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=mail&virtuemart_order_id=1401&tmpl=component
  2. Return the text version, albeit wrapped in the html page... you may have to view the source to see your invoice text.
    http://shop.craigphillips.biz/index.php?option=com_virtuemart&view=invoice&layout=mail_raw&virtuemart_order_id=4&tmpl=component
Craig
  • 9,335
  • 2
  • 34
  • 38
  • 1.true, 2.true. 3. If you check my url I have "&tmpl=component". – George D. Feb 16 '13 at 15:51
  • Ahhh sorry that should have been `&format=raw`, but on checking VM2 I see it doesn't support raw properly (at least in this instance) see my updated answer for close matches. – Craig Feb 17 '13 at 09:29