Post by PA Beauty Graphics » Fri May 17, 2019 4:16 am

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.


Posts

Joined
Fri Mar 22, 2019 3:13 am

Post by OSWorX » Fri May 17, 2019 4:56 am

Simply edit the email template.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PA Beauty Graphics » Fri May 24, 2019 11:25 pm

In OpenCart 3x, how do you edit the template to shrink that size?


Posts

Joined
Fri Mar 22, 2019 3:13 am

Post by PA Beauty Graphics » Tue May 28, 2019 10:01 pm

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


Posts

Joined
Fri Mar 22, 2019 3:13 am

Post by OSWorX » Tue May 28, 2019 10:47 pm

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:

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>
Where max-width should be the value you need.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by NZSD » Thu Mar 26, 2020 4:31 am

OSWorX wrote:
Tue May 28, 2019 10:47 pm
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:

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>
Where max-width should be the value you need.
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 ?
p.s. your is the most helpful answer i've found in numerous post on the subject - Thank you

User avatar
Newbie

Posts

Joined
Tue Jan 09, 2018 9:54 am


Post by OSWorX » Thu Mar 26, 2020 5:54 am

NZSD wrote:
Thu Mar 26, 2020 4:31 am
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 ?
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>

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by NZSD » Thu Mar 26, 2020 7:36 am

OSWorX wrote:
Thu Mar 26, 2020 5:54 am
NZSD wrote:
Thu Mar 26, 2020 4:31 am
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 ?
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>
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.
Thank your for your quick response and help its most appreciated :)
Carolyn

User avatar
Newbie

Posts

Joined
Tue Jan 09, 2018 9:54 am


Post by OSWorX » Thu Mar 26, 2020 3:06 pm

NZSD wrote:
Thu Mar 26, 2020 7:36 am
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.
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).

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by aniriai » Sat Mar 28, 2020 6:59 pm

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.

Newbie

Posts

Joined
Sat Mar 28, 2020 6:56 pm
Who is online

Users browsing this forum: No registered users and 8 guests