News:

Support the VirtueMart project and become a member

Main Menu

Order confirmation email template is broken in gmail

Started by arunkumarkoloth, June 28, 2012, 13:38:21 PM

Previous topic - Next topic

arunkumarkoloth

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..
:'( :'( :'( :'( :'( :'( :'( :'( :'(

jelly

I noticed this gmail problem too, so I will gladly follow this thread!


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Maxim Pishnyak

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.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

jenkinhill

#5
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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Maxim Pishnyak

#6
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.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

SergioBo

jenkinhill thanks you've been very clear and gentle  :)

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart