VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: arunkumarkoloth on June 28, 2012, 13:38:21 PM

Title: Order confirmation email template is broken in gmail
Post by: arunkumarkoloth on June 28, 2012, 13:38:21 PM
Hi, Everyone

When i purchase a product i got a order confirmation email, my email is in gmail in my hotmail the layout is working perfectly how can i fix it?

Please help me..
:'( :'( :'( :'( :'( :'( :'( :'( :'(
Title: Re: Order confirmation email template is broken in gmail
Post by: jelly on July 05, 2012, 15:36:45 PM
I noticed this gmail problem too, so I will gladly follow this thread!
Title: Re: Order confirmation email template is broken in gmail
Post by: SergioBo on July 23, 2013, 18:21:20 PM
....??
Title: Re: Order confirmation email template is broken in gmail
Post by: jenkinhill on July 23, 2013, 18:30:24 PM
Use inline css: https://forum.virtuemart.net/index.php?topic=111656.msg375243#msg375243
Title: Re: Order confirmation email template is broken in gmail
Post by: Maxim Pishnyak on July 23, 2013, 21:32:19 PM
Quote from: SergioBo on July 23, 2013, 18:21:20 PM
....??
I don't understand clearly your question maybe. Could only see some dots there only

BUT

as for
Quote from: SergioBo on July 23, 2013, 19:22:34 PM
I have not figured out how
It's very simple.

You need to find file that responds for layout of email.

Edit it following typical rules of "inline css".

I'm sure google could tell you everything about this useful technique.
Title: Re: Order confirmation email template is broken in gmail
Post by: jenkinhill on July 24, 2013, 15:10:17 PM
The solution was posted in another thread you wrote in.

"I fixed the issue by taking all css rules written in .../invoice/mail_html.php and rewriting them inline in html tags. "

So start with the file components/com_virtuemart/views/invoice/tmpl/mail_html.php and look at the css styles defined there - you don't have to use those styles if you want to use something different. You can also see that this file includes other template files in that directory. So
echo $this->loadTemplate('header');
loads this:  mail_html_header.php

In that header template (mail_html_header.php) is this code for outputting the shopper name:
<tr>
      <td colspan="2">
         <strong><?php echo JText::sprintf ('COM_VIRTUEMART_MAIL_SHOPPER_NAME', $this->orderDetails['details']['BT']->title . ' ' . $this->orderDetails['details']['BT']->first_name . ' ' . $this->orderDetails['details']['BT']->last_name); ?></strong><br/>
      </td>
   </tr>

To add a style to this, eg to add a blue colour to the font (eg #110db3):
<tr>
      <td colspan="2">
         <span style="color:#110db3;"><strong><?php echo JText::sprintf ('COM_VIRTUEMART_MAIL_SHOPPER_NAME', $this->orderDetails['details']['BT']->title . ' ' . $this->orderDetails['details']['BT']->first_name . ' ' . $this->orderDetails['details']['BT']->last_name); ?></strong></span><br/>
      </td>
   </tr>

That has added an inline style.  For a tutorial on this see  http://www.w3schools.com/html/html_css.asp

You should use the edited files as template overrides. See  http://docs.virtuemart.net/tutorials/33-templating-layouts.html and http://www.ostraining.com/blog/joomla/overrides
Title: Re: Order confirmation email template is broken in gmail
Post by: Maxim Pishnyak on July 24, 2013, 16:50:25 PM
Quote from: SergioBo on July 23, 2013, 23:16:42 PM
is very serious that the email does not appear well in gmail and none of you has clarified the discussion.
It's very serious that you even didn't try to learn even basic details about inline css.

You know without using css techniques it's pointless to pretend to be a web site builder nowadays.
Quote from: SergioBo on July 23, 2013, 23:16:42 PM
unfortunately I can not make people read css from gmail.
Leave those people alone please.

YOU could test customized by YOU emails from your web shop in YOUR gmail.

You know gmail is not far from google search by the way. On the distance of ONE click I could say.

Unfortunately you even didn't think that you could use Joomla article editor to test html code (with some custom inline css in it) of your email template.

And do this even without the help of gmail.

Regards.
Title: Re: Order confirmation email template is broken in gmail
Post by: SergioBo on July 24, 2013, 18:06:06 PM
jenkinhill thanks you've been very clear and gentle  :)
Title: Re: Order confirmation email template is broken in gmail
Post by: Maxim Pishnyak on July 24, 2013, 18:24:42 PM
You're welcome.