Tomtids Posted October 10, 2012 Share Posted October 10, 2012 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 More sharing options...
PrestaHeroes USA Posted October 10, 2012 Share Posted October 10, 2012 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 More sharing options...
Tomtids Posted October 11, 2012 Author Share Posted October 11, 2012 Thanks elpatron, I'm keen to learn the Prestashop way, so will look into the .tpl . Do you have any advise as to the best Prestashop documentation / tutorial sites please? T Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted October 11, 2012 Share Posted October 11, 2012 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 More sharing options...
Tomtids Posted October 15, 2012 Author Share Posted October 15, 2012 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 More sharing options...
PrestaHeroes USA Posted October 15, 2012 Share Posted October 15, 2012 without actually testing it may have to do with the file using .html extension. this works for .tpl file names and to be just honest I have not tried it with .html's. You can however see how the .html displays the country yes? You can place smarty code in the .html to react differently to the country. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now