nBill Community nBill Home Page
23/May/2012, 12:17:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Click Here for the nBill home page, or take a tour.  
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Editing e-mail template doesn't work  (Read 96 times)
marcel073
Jr. Member
**
Offline Offline

Posts: 13


View Profile
« on: 24/January/2012, 09:50:50 AM »

Hi,

I edited the e-mail templates components/com_nbill/email_templates/invoice_email_mytheme_attach.php and invoice_email_mytheme.php.
I added some new definitions in email.nl_NL.php which I use in the e-mail templates.

Under Configuration -> Vendors -> Invoice E-mail Template I have selected the "invoice_email_mytheme"

However, when I create a new invoice and want to send it by e-mail the "old" e-mail template shows up. Not with the new definitions.

Any idea what goes wrong.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I added the following definitions in email.nl_NL.php
define("NBILL_EM_URL", "http://www.some_url.nl/contact");
define("NBILL_EM_AUTO", "Dit bericht is automatisch gegenereerd en derhalve niet persoonlijk ondertekend.");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I added the following lines in invoice_email_mytheme.php and invoice_email_mytheme_attach.php
<p><?php echo nbf_common::parse_translation($document->default_language, "email", 'NBILL_EM_URL'); ?></p>
<p><?php echo nbf_common::parse_translation($document->default_language, "email", 'NBILL_EM_AUTO'); ?></p>
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #1 on: 24/January/2012, 10:32:03 AM »

Are you sure the vendor of the invoice matches the vendor whose template you changed? Are you sure the template file you created is readable by the user PHP runs under? Is it possible you added your custom code to a part of the template which is not being output? Try adding something random like a full stop (period) right at the start of the template, or immediately after the company name (somewhere that you know is being output ok on the invoice), just to verify whether it is loading the correct template file.
Logged
marcel073
Jr. Member
**
Offline Offline

Posts: 13


View Profile
« Reply #2 on: 24/January/2012, 02:19:31 PM »

Are you sure the vendor of the invoice matches the vendor whose template you changed? -> Yes, I only have configured 1 vendor.

Are you sure the template file you created is readable by the user PHP runs under? -> I have PHP read rights for everyone

Is it possible you added your custom code to a part of the template which is not being output? Try adding something random like a full stop (period) right at the start of the template, or immediately after the company name (somewhere that you know is being output ok on the invoice), just to verify whether it is loading the correct template file. -> Very strange. I added a few periods to all e-mail templates but non are showing up in the e-mail?!? Is there another place I should be looking for the e-mail templates then: components/com_nbill/email_templates/... ?
Logged
marcel073
Jr. Member
**
Offline Offline

Posts: 13


View Profile
« Reply #3 on: 25/January/2012, 12:17:14 PM »

I found out if I select "Use HTML Template" when sending an invoice to a client I do see the manually adjusted e-mail template. When I don't use an HTML template I see the non adjusted e-mail template.

So my question is: what file do I have to edit to adjust the text version of the e-mail template?
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,563


View Profile
« Reply #4 on: 25/January/2012, 02:26:42 PM »

There is no template for text e-mails - they pick up their content from the language file. See http://www.nbill.co.uk/help/index.php?page=change-text-of-emails.html
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!