Jump to content

Use different email templates for specific countries


Recommended Posts

My clients shop requires that we use slightly different email templates based on the delivery country (UK, US or Rest of the World)...

 

I'm new to Prestashop and I can't figure out if its a localisation thing? The site isn't currently offered in multiple languages - only in English.

 

Any advise on where to look / any support resources that might be useful would be much appreciated.

 

Cheers!

 

Tom

Link to comment
Share on other sites

typically your .tpl is passed the country as part of the customer address...also there may or may not be other variable assigned to smarty array..that would prove useful...

 

probably nothing more than a small hack to your mail/en .tpl file....if you do not know how to do this I'd suggest posting in the 'paid' section to get your .tpl customized...

Link to comment
Share on other sites

Probably the easiest way to go about it is to place {debug} in your .tpl file, (force smarty compile from you back office)This should give you a pop up with all the variables that were passed to your tpl file.

see here: http://matthewmorek.com/blog/2011/12/how-to-debug-prestashop-themes-and-modules-with-smarty/

 

Then you could make the appropriate coding changes within the actual .tpl file (for mails this will be your html file.)

 

Personally I'd look at changing changing the name of the mail file based on country rather than having to put if/eif code. This would be done at the actual calling routine which passes the name of the .tpf/.html file.

 

suerte!

 

more stuff: this is 1.5 but there is also 1.4 guide

http://doc.prestashop.com/display/PS15/Developer+Guide

Link to comment
Share on other sites

Thanks for your help so far elpatron.

 

I've done as you suggest and added {debug} to the two HTML email templates I am looking to edit, but unfortunately i just get emails with {debug} written in rather than any parsed information. In advanced parameters -> Performance in the back office I have set both:

Template cache to force compile

and latterly - just in case

Debug console to 'always open console' but I get no joy. I've even tried forcing the setting in the config file as per this discussion -

http://www.prestashop.com/forums/topic/175406-solved-smarty-force-compile-not-working/

 

I must be missing something obvious here!

 

( FYI I am using PrestaShop™ 1.5.0.17)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...