Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Customize Email & Invoce

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-15-2014, 08:09 AM
 
Mak Mak is offline
 

Newbie
  
Join Date: May 2014
Posts: 6
 

Default Customize Email & Invoce

Can someone share some insight on how to customize the email that is sent to the customer and how to modify the font and layout of the invoice...

Thanks in advance
__________________
X-Cart 5
Reply With Quote
  #2  
Old 05-16-2014, 05:52 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Customize Email & Invoce

Quote:
Originally Posted by Mak
Can someone share some insight on how to customize the email that is sent to the customer and how to modify the font and layout of the invoice...

Thanks in advance

You can use Custom Skins module in order to alter X-Cart 5 emails. Could you please let me know what exactly you want to change, so I would be able to suggest the exact steps.
Reply With Quote
  #3  
Old 05-16-2014, 07:13 AM
 
Mak Mak is offline
 

Newbie
  
Join Date: May 2014
Posts: 6
 

Default Re: Customize Email & Invoce

Thanks for the reply...

I have the custom skins module installed but don't see any way to edit emails.
Maybe I dont know how to use it.. Is there documentation?

Currently the emails come over with errors, here is an example:
Notice the html and = all over the place....

The font is also, all over the place..

Invoice #5
May 15, 2014, 12:17 Grand = total: $0.00
= <= /tr>
Item Price Qty Total
demo free=
Key: demofre= e1
SKU demo free
$0.00 1 $0.00
Subtotal:
$0.00
Grand total:
$0.00
=
__________________
X-Cart 5
Reply With Quote
  #4  
Old 05-20-2014, 03:35 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Customize Email & Invoce

One of our previous webinars is a documentation of Custom Skin module. It explains how you can use it: http://kb.x-cart.com/pages/viewpage.action?pageId=7504837

As for the errors you mentioned, could you please let me know what language you are using in your store? Besides that, could you please send me the copy of your invoice email to support@x-cart.com?

Thank you.
Reply With Quote
  #5  
Old 05-21-2014, 01:39 PM
 
Mak Mak is offline
 

Newbie
  
Join Date: May 2014
Posts: 6
 

Default Re: Customize Email & Invoce

English

Email Sent..
__________________
X-Cart 5
Reply With Quote
  #6  
Old 05-22-2014, 04:55 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Customize Email & Invoce

Thank you. Apparently, there is a problem with the server environment. I will reply to you via email.

Tony.

Last edited by tony_sologubov : 05-22-2014 at 04:58 AM.
Reply With Quote
  #7  
Old 03-30-2015, 08:22 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default Re: Customize Email & Invoce

Hi,
Did you every get to the bottom of this problem? I am having a similar issue ... email comes out with html code as text and messed up layout and fonts. I am using x-cat 5.1.11 and it is running on PHP 5.3 at the moment ....
... is it an issue to with phpmailer?

Thanks in advance ...

Jan
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote
  #8  
Old 04-03-2015, 03:21 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Customize Email & Invoce

Hello @JannieB,

We did not get to the root of the problem. However, could you please forward me a problem notification at sales@x-cart.com saying that this is for Tony Sologubov.

I would like to have a look at how exactly your notification is messed up.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #9  
Old 04-03-2015, 04:52 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default Re: Customize Email & Invoce

Hi Tony,

Thank you - I think I have fixed the problem now .....

When looking at the html output I noticed the lines were broken up, sometimes in the middle of an html tag which seemed to cause formatting problems. Also some rogue characters were introduced.

Rogue unprintable characters can be intoduced by UTF-8 files which have the UTF-8 BOM at the beginning. I don't know if they had, but I went through each template in Dreamweaver and re-saved them with UTF-8 and no BOM.

The line breaks were a result of the encoding (I think), looking in Xlite/View/Mailer.php the encoding was set to "quoted-printable" in the initMailFromConfig() function. The default used by PHP Mailer is 8-bit, so I just commented out this line

Code:
$this->mail->Encoding = 'quoted-printable';

in the var/run version of the Mailer.php file, so that it would use the default setting and to see if it made any difference. The email then came through correctly formatted.

So I have know add a decorated version of Mailer.php to my module as follows:

Code:
class Mailer extends \XLite\View\Mailer implements \XLite\Base\IDecorator { /** * Inner mailer initialization from DB configuration * * @return void */ protected function initMailFromConfig() { if (!isset($this->mail)) { // Initialize PHPMailer include_once LC_DIR_LIB . 'PHPMailer' . LC_DS . 'class.phpmailer.php'; $this->mail = new \PHPMailer(); // SMTP settings if (\XLite\Core\Config::getInstance()->Email->use_smtp) { $this->mail->Mailer = 'smtp'; $this->mail->Host = \XLite\Core\Config::getInstance()->Email->smtp_server_url; $this->mail->Port = \XLite\Core\Config::getInstance()->Email->smtp_server_port; if (\XLite\Core\Config::getInstance()->Email->use_smtp_auth) { $this->mail->SMTPAuth = true; $this->mail->Username = \XLite\Core\Config::getInstance()->Email->smtp_username; $this->mail->Password = \XLite\Core\Config::getInstance()->Email->smtp_password; } if (in_array(\XLite\Core\Config::getInstance()->Email->smtp_security, array('ssl', 'tls'))) { $this->mail->SMTPSecure = \XLite\Core\Config::getInstance()->Email->smtp_security; } } $this->mail->SMTPDebug = true; $this->mail->IsHTML(true); } } }

The weird thing is, that I am sure this wasn't happening before ... anyway it seems to be OK now, so now I just need to restyle all the emails to meet the designers brief ... oh joy!

Thanks,

Jan
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote

The following user thanks JannieB for this useful post:
Burpomatic (04-09-2015)
  #10  
Old 04-06-2015, 11:58 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Customize Email & Invoce

It would be interesting to see headers of your email, because I just googled the problem and people say that it might be related to Content-Type header being replaced with Content-type one (with type starts with small letter):
http://forums.sugarcrm.com/f3/email-encoded-quoted-printable-dont-display-correctly-49862/
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:33 AM.

   

 
X-Cart forums © 2001-2020