Prestashop 1.6 how to send shop logo in emails? - prestashop

In older version of prestashop (1.4) I would use <img src="{shop_logo}">
but in current version (1.6.1.4) when I use this syntax it automatically turn it to <img src="http://t.clicktoamerica.com/admin1/{shop_logo}">
(ie it adds the shop domain and admin path)
and the logo is not displayed.
What is the correct syntax to add a logo in emails ?
EDIT
The syntax <img src="{shop_logo}"> is correct however because of a bug the domain is added when editing with the TinyMce editor, therefore a simple by-pass is to edit the emails html files directly (with external editor)
The question remain - how to solve this bug?

In js/admin/tinymce.inc.js
find the line: relative_urls:false and change it to relative_urls:true

Related

How to add page number qweb odoo without div class header and footer

I would like create report in odoo but the page information not in header or footer. I'm using <span class="page"/> of <span class="topage"/>. It's work if that code inside <div class="header"/> or <div class="footer"/>. But I get tricky case, that is page number must show in table or anywhere except footer or header. Anyone can help me please?
Accessing the current page (page) and the number of pages (topage) outside of headers and footers is not yet available.
As commented by the wkhtmltopdf maintainer on june 2020
Although this is obviously good to have, I'm not sure how it can be implemented right now -- the focus right now is upgrading the browser engine (read the project status), this will come after/if it gets upgraded.
The feature will come after upgrading the engine browser
You can see that feature requests like global variable for page number are still open

What is the correct .tpl file to edit the footer links in Prestashop

I need to edit the footer links in my Prestashop template ( just to add a wrapper). That's the link list that comes afterthe block-contact. This is the block that shows links to special offers, product categories, best sales...and then comes another block of links related to CMS pages.
Do you know which files i have to edit?
Thanks
Well finally i got it, for anyone who had the same issue, here's the correct .tpl :
modules\ps_linklist\views\templates\hook\linkblock.tpl

Page not displayed on my website

I'm trying to put together my website but I'm experiencing a very weird behaviour. I have an html resource named y6.html in my www directory in the root directory of the website. It worked very fined until yesterday when suddenly when accessing it it sends me a void webpage with an empty head and an empty body (not a 404).
Also I realized after one point that I would change the css on the website but that the changes I made would be on the ftp server at the right place but the website would still display the old version I had not modified even after emptying the cache.
The page is : http://www.dronecontrast.com/y6.html
Any clue on what's causing this?
Thanks
This is an HTML error. Your <title> is not closed as usual. You must use </title> to close it.
</title> is missing. Add the slash and try again
Just looking through the page source of that web page, you have made an error with the title tag. On your closing tag you have missed your "/". Put that in and see if it works
Your HTML markup is wrong. Please check nesting of title,head and body inside your html tag. Please consider using a text editor like Notepad++ / Sublime Text and check whether the tags are closed and nested properly.
In your markup Title tag should be closed.

How to edit prestashop back office product listing page

I want to change the layout of prestashop back office product page.
So can anyone tell me which file to change so that I can modify this existing layout?
I don't know which page you want to edit exactly, but when you go to that page in your backoffice, like:
http://www.example.com/admin123/index.php?tab=AdminAttributesGroups
The admin123 is variable to your installation, but the ?tab=AdminAttributesGroups referes to the backoffice page you are on. These pages are located in /var/www/admin123/tabs in this case it's /var/www/admin123/tabs/AdminAttributesGroups.php
I found the solution.... Here is what I did
Added content.tpl in under adminxxyy/theme/theme_name/template/controller/products
Which showed me content of my content.tpl
Create a new module, register the hook and send that info via hook to content.tpl.
Use hook name in content.tpl like {hook h='displayProductMyWay' mod='blockcustom'}.

OpenERP 6.1 - Email template to default to html

I am trying to send an email from the partner window using the Send Mail menu on the right hand panel.
For this I have created a template email from the configuration menu, left the body (Text) empty and filled the body (Rich/html) with:
<p>Some text in <b>bold</b></p>
When I run send mail from the partner form, the message body is desperately empty and it looks like it is defaulting the message body to the Body (Text) tab from the email template.
This is confirmed when I look at table email_template where the field subtype is always "Plain".
I tried to setup the Action window specific to my email template by setting the domain value to [('subtype','=','html')], but it doesn't change anything. I also added this code to most of the Action window domains that relate to email but it hasn't changed anything either.
Does anyone know how to default sending email in HTML format from OpenERP?
UPDATE: Has anyone got a sample of HTML code that works for them, meaning they receive correctly in their email client?
My issue is that if I leave the Plain Text empty within the template and have some html tags under the Rich/html, then I receive an email in format html, but it is always empty. Even the source is totally empty. I suppose there is something wrong with my html syntax. Maybe I need to double the "/" in a closing paragraph as it may be an escape character somewhere, somehow. I have tried a lots of different syntaxes but apparently not the right one.
So if someone out there had some html coding that works for them and they'd
be happy to share, thanks in advance!
UPDATE 2, I have created an html template email after a quick training on the internet. I have tested my bit of code with litmus and it shows exactly what I wanted to see. I then paste this exact same bit of code into OpenERP, send the email message to my email client, identical to the one on litmus, and it is totally empty. However, it says the format is HTML. There is definitely an issue somewhere but I can't point out where. It seems OpenERP doesn't send the html code. Has anyone ever had the same issue???
Here is the html basic code I have used for testing and that I pasted into OpenERP:
<html>
<body leftmargin="0" marginwidth="0" marginheight="0" offset="0">
<table width="100%" bgcolor="#cccccc" cellpading="10" cellspacing="10">
<tr valign="top" align="center">
<td>
<table width="500" bgcolor="#ffffff" cellpading="0" cellspacing="0">
<tr>
<td>
liusuhflsb
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Short answer: you can't do that in 6.1 without using third-party addons or custom code.
Long Answer:
OpenERP 6.1 does not provide a WYSIWYG/Rich Text editor out-of-the-box (OpenERP 7.0 introduces that)
As a result, in 6.1, only the plain text version of a template is used whenever the user can manually edit the email contents. Indeed it would be quite awkward to ask users to manually edit the source of the HTML version of the template when composing their email (no WYSIWYG).
It is the case when you're composing a new email based on a template, via the corresponding Send Mail side bar action, because you can modify the email before sending it.
One typical case where both the HTML/Rich Text and the plain text version of a template are used as expected is when an email template is bound to a Marketing Campaign step (via the marketing_campaign module) - because these emails are sent without any editing nor any manual user action.
UPDATE:
If that's what you're interested in, Marketing Campaigns will
always send both the plain-text and HTML version of your emails
automatically, and the recipients' mail software will display the
relevant one based on user preferences (for most people it will be the
HTML version). However you can not test the templates using the
Send Mail sidebar buttons, because that will keep only the plain-text version, as explained above. There are two recommended ways
to test those campaign emails:
Use the Preview button on the template and select a sample record to render the template for. This will let you double-check the
source of the HTML that will be produced.
Test-drive your campaign putting in "manual" mode: have a dummy record enter the campaign with your email address on it, then use the
Campaign Follow-up menu to make it manually advance through the campaign steps. This is really important to validate not only your
email templates but also the structure of your campaign. See also this
basic introduction to OpenERP Marketing Campaign, from OpenERP
Community Days 2012.
There are community modules that add WYSIWYG editing capabilities to OpenERP 6.1 (search for WYSIWYG on OpenERP Apps), but I don't think they were integrated with the email_template module in order to enable composing Rich Text directly. Doing it wouldn't be very hard though. If you're interested, start by reading the source code of the mail.compose.message wizard (both the original version of the mail module and the email.template extension), to see how the template fields are used and where.
If you're not familiar with OpenERP development, the developer documentation of OpenERP and the technical memento will be interesting starting points.
The e-mail message is sent with both contents: plain and html.
The e-mail client makes the decision to render either one, depending on it's capabilities. It it's html capable, it will use the HTML version, if not, the plain version will be rendered.
You should provide the two versions for the message in your template: plain and html.
This is over a year ago and I have given up on OpenErp because of this kind of flaws. I never got around to having OpenERP send me an automated email in HTML format, no matter what I tried. It always defaulted to text whichever email client I used. I would like to know if wome other people have managed receiving automated html email that related to a marketing campaign in OpenERP?