VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: amymattian on November 30, 2015, 16:11:29 PM

Title: Email Confirmation layout problems with column width
Post by: amymattian on November 30, 2015, 16:11:29 PM
Hi,
I've tried searching from the forum, but could not find any clear answer how to edit the confirmation templates (or even where those are).

We are using J3.5 and V3.0.9.

Problem is that the confirmation email template seems to partly put some fields on 2 separate lines. I think it is due to the short words like "Vero" ("Tax"), which in Finnish has 4 letters. If the tax is for example "3.85 €" this would require 6 letters. In this case the " €" goes to the second line. This kind of behaviour causes many fields to be on 2 lines due to short words.

I think this is more of a development issue than individual templatating issue, this why I put the info here rather than to templating category. I think this requires changes in the core-virtuemart and not so that each user must do those changes to each individual shop. I hope this will be taken into consideration in the future development of Virtuemart.

One option would be to have the emails same way editable as the header and footer parts are in the Shop/Shop/Emails page.

I would also take off the currency-sign from all but the last sum (it is mostly the currency sign that does not fit).

I would also make the fields to have a minimum letters and not to go according to the title-letters.

Hope these can be taken into consideration and some changes to be done in the future editions of VM.

Can someone tell me where to find instructions:
1) where are the currect emaiil-templates (note am not a coder so...)
2) are there instructions how to do the editing of those files/themes?

(http://www.homeopaatti.com/virtuemart3-default-order-confirmation-invoice.png)

- Anne
Title: Re: Email Confirmation layout problems with column width
Post by: SnakeFFM on November 30, 2015, 17:39:57 PM
Hi Anne,

in order to do that you need to use template overrides... as far as I can see the views are mostly located in: 1) components/com_virtuemart/views/invoice

Whereas you have to use overrides for several files.

Overrides follow known joomla procedures... however, I think there are several other threads and eben an extension (below $10) to customize everything...

Title: Re: Email Confirmation layout problems with column width
Post by: jenkinhill on November 30, 2015, 23:39:50 PM
Assuming you are using the default VirtueMart templates the file that displays the product table is components/com_virtuemart/views/invoice/tmpl/invoice_items.php

This is a table that has the column widths defined in the template as a percentage of the total table width, and the table is set to display at 100% of the available viewing container.  In your example the first cloumn is SKU which should be 5% os the total width and next the Product Name column should be 38% of the total width, which is not how yours is displaying.  I think the title words are pulling the table wdths, so if you use language overrides for the wider columns, especially Tuotetunnus, for a shorter word or abbreviation then that may make a difference.  The constant for that is COM_VIRTUEMART_ORDER_PRINT_SKU.    http://forum.virtuemart.net/index.php?topic=113895.0

This assumes that you are not already using template overrides.

For security reasons you should now be using VM3.0.12
Title: Re: Email Confirmation layout problems with column width
Post by: GJC Web Design on November 30, 2015, 23:48:42 PM
you should also add white-space: nowrap; to the css affecting the table cells or what is in them to prevent the currency symbol wrapping

or have a look here.  Spyros has done it all for you..  https://www.virtuemarttemplates.eu/virtuemart-templates/virtuemart-order-emails.html