When a customer receives a confirmation e-mail, the logo for the shop is way too big to even fit on the print out of the email. How can I adjust the size of it in the Email itself. I do not need to change it on the site and I have been browsing too many forums to find a close enough answer.
Simply edit the email template.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
When you changed the code in Catalog > View> theme> default> template> mail> order_add.twig and changed it from:
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none;" /></a>
to
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none;" height="150" width="350" /></a>
The issue I was running into was that there was <div style="width: 680px;"> before what is there by default which prevented any changes. Take that away/edit it and it works perfectly.
Thank you OSWorX
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none;" /></a>
to
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none;" height="150" width="350" /></a>
The issue I was running into was that there was <div style="width: 680px;"> before what is there by default which prevented any changes. Take that away/edit it and it works perfectly.
Thank you OSWorX
Glad to help ..
But if you want to have the emails also responsive, check the emails I have sent you right now.
Or this code should work also:
Where max-width should be the value you need.
But if you want to have the emails also responsive, check the emails I have sent you right now.
Or this code should work also:
Code: Select all
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none; max-width: 250px;" /></a>
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Would this work for 2.3.02 ? I'm pretty new to editing anything so would i simply replace the whole line with the code above ?OSWorX wrote: ↑Tue May 28, 2019 10:47 pmGlad to help ..
But if you want to have the emails also responsive, check the emails I have sent you right now.
Or this code should work also:Where max-width should be the value you need.Code: Select all
<a href="{{ store_url }}" title="{{ store_name }}"><img src="{{ logo }}" alt="{{ store_name }}" style="margin-bottom: 20px; border: none; max-width: 250px;" /></a>
p.s. your is the most helpful answer i've found in numerous post on the subject - Thank you
Well, not exactly.
For OpenCart Version prior 3.x you can use:
Code: Select all
<a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><img src="<?php echo $logo; ?>" alt="<?php echo $store_name; ?>" style="margin-bottom: 20px; border: none; max-width: 250px;" /></a>
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Thank you that what i should have said. And have already tried this and hasn't worked so maybe I've got something else e.g. invoice template interfering.OSWorX wrote: ↑Thu Mar 26, 2020 5:54 amWell, not exactly.
For OpenCart Version prior 3.x you can use:Code: Select all
<a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><img src="<?php echo $logo; ?>" alt="<?php echo $store_name; ?>" style="margin-bottom: 20px; border: none; max-width: 250px;" /></a>
Thank your for your quick response and help its most appreciated
Carolyn
You can contact whenever you want over my website https://osworx.net if you still have problems.
We will find then a solution (if small, maybe for free).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
The standard email template width was 600 pixels for desktops, 320px for vertical and 480px for horizontal view on mobile devices. The height was unlimited and depended on content length. A few years ago the 600px width was a must-use standard and had no alternatives. But the standards have changed.
Who is online
Users browsing this forum: davidmarkdavid34 and 265 guests