Post by matte2k » Sun Sep 16, 2012 6:43 am

My logo in the header is transparent so it can blend together with the background.
And for that it doesn't really work to have it in the confirmation emails.

in order.tpl i find this row:

Code: Select all

<div id="container"><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><img src="<?php echo $logo; ?>" alt="<?php echo $store_name; ?>" id="logo" /></a>
I guess maybe I can change something there but to what?

my alternative logo for email confirmations is placed in: image/data/Loggor/logga_liten.png

Thanks!


edit: I run 1.5.1.3

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by pprmkr » Sun Sep 16, 2012 1:48 pm

Change:

Code: Select all

<img src="<?php echo $logo; ?>"
Into:

Code: Select all

<img src="<?php echo HTTP_IMAGE; ?>image/data/Loggor/logga_liten.png"

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by matte2k » Sun Sep 16, 2012 8:06 pm

Doesn't seem to work! :(
Skärmavbild 2012-09-16 kl. 14.04.34.png

Skärmavbild 2012-09-16 kl. 14.04.34.png (70.64 KiB) Viewed 9096 times

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
<style type="text/css">
body {
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
}
body, td, th, input, textarea, select, a {
	font-size: 12px;
}
p {
	margin-top: 0px;
	margin-bottom: 20px;
}
a, a:visited, a b {
	color: #378DC1;
	text-decoration: underline;
	cursor: pointer;
}
a:hover {
	text-decoration: none;
}
a img {
	border: none;
}
#container {
	width: 680px;
}
#logo {
	margin-bottom: 20px;
}
table.list {
	border-collapse: collapse;
	width: 100%;
	border-top: 1px solid #DDDDDD;
	border-left: 1px solid #DDDDDD;
	margin-bottom: 20px;
}
table.list td {
	border-right: 1px solid #DDDDDD;
	border-bottom: 1px solid #DDDDDD;
}
table.list thead td {
	background-color: #EFEFEF;
	padding: 0px 5px;
}
table.list thead td a, .list thead td {
	text-decoration: none;
	color: #222222;
	font-weight: bold;
}
table.list tbody td a {
	text-decoration: underline;
}
table.list tbody td {
	vertical-align: top;
	padding: 0px 5px;
}
table.list .left {
	text-align: left;
	padding: 7px;
}
table.list .right {
	text-align: right;
	padding: 7px;
}
table.list .center {
	text-align: center;
	padding: 7px;
}
</style>
</head>
<body>
<div id="container"><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><img src="<?php echo HTTP_IMAGE; ?>image/data/Loggor/logga_liten.png" alt="<?php echo $store_name; ?>" id="logo" /></a>
  <p><?php echo $text_greeting; ?></p>
  <?php if ($customer_id) { ?>
  <p><?php echo $text_link; ?></p>
  <p><a href="<?php echo $link; ?>"><?php echo $link; ?></a></p>
  <?php } ?>
  <?php if ($download) { ?>
  <p><?php echo $text_download; ?></p>
  <p><a href="<?php echo $download; ?>"><?php echo $download; ?></a></p>
  <?php } ?>
  <table class="list">
    <thead>
      <tr>
        <td class="left" colspan="2"><?php echo $text_order_detail; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><b><?php echo $text_order_id; ?></b> <?php echo $order_id; ?><br />
          <b><?php echo $text_date_added; ?></b> <?php echo $date_added; ?><br />
          <b><?php echo $text_payment_method; ?></b> <?php echo $payment_method; ?><br />
          <?php if ($shipping_method) { ?>
          <b><?php echo $text_shipping_method; ?></b> <?php echo $shipping_method; ?>
          <?php } ?></td>
        <td class="left"><b><?php echo $text_email; ?></b> <?php echo $email; ?><br />
          <b><?php echo $text_telephone; ?></b> <?php echo $telephone; ?><br />
          <b><?php echo $text_ip; ?></b> <?php echo $ip; ?><br /></td>
      </tr>
    </tbody>
  </table>
  <?php if ($comment) { ?>
    <table class="list">
    <thead>
      <tr>
        <td class="left"><?php echo $text_instruction; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo $comment; ?></td>
      </tr>
    </tbody>
  </table>
  <?php } ?>
  <table class="list">
    <thead>
      <tr>
        <td class="left"><?php echo $text_payment_address; ?></td>
        <?php if ($shipping_address) { ?>
        <td class="left"><?php echo $text_shipping_address; ?></td>
        <?php } ?>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo $payment_address; ?></td>
        <?php if ($shipping_address) { ?>
        <td class="left"><?php echo $shipping_address; ?></td>
        <?php } ?>
      </tr>
    </tbody>
  </table>
  <table class="list">
    <thead>
      <tr>
        <td class="left"><?php echo $text_product; ?></td>
        <td class="left"><?php echo $text_model; ?></td>
        <td class="right"><?php echo $text_quantity; ?></td>
        <td class="right"><?php echo $text_price; ?></td>
        <td class="right"><?php echo $text_total; ?></td>
      </tr>
    </thead>
    <tbody>
      <?php foreach ($products as $product) { ?>
      <tr>
        <td class="left"><?php echo $product['name']; ?>
          <?php foreach ($product['option'] as $option) { ?>
          <br />
          &nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
          <?php } ?></td>
        <td class="left"><?php echo $product['model']; ?></td>
        <td class="right"><?php echo $product['quantity']; ?></td>
        <td class="right"><?php echo $product['price']; ?></td>
        <td class="right"><?php echo $product['total']; ?></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php foreach ($totals as $total) { ?>
      <tr>
        <td colspan="4" class="right"><b><?php echo $total['title']; ?>:</b></td>
        <td class="right"><?php echo $total['text']; ?></td>
      </tr>
      <?php } ?>
    </tfoot>
  </table>
  <p><?php echo $text_footer; ?></p>
  <p><?php echo $text_powered; ?></p>
</div>
</body>
</html>

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by matte2k » Sun Sep 16, 2012 8:22 pm

Seems like the correct code should be:

Code: Select all

<img src="<?php echo HTTP_IMAGE; ?>/data/Loggor/logga_liten.png" 
without the image catalog... cause that created double catalogues: image/image/data/Loggor.....

Active Member

Posts

Joined
Thu Mar 01, 2012 7:07 pm

Post by wazaus » Thu Oct 31, 2013 11:48 am

Hi,

(Version I am running: 1.5.6)

I am looking to solve the same issue however on the latest version of opencart the order.tpl file is different.

The only similar section I can find is:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
</head>
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;">
<div style="width: 680px;"><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;" /></a>
Specifically:

Code: Select all

title="<?php echo $store_name; ?>"><img src="<?php echo $logo; ?>" alt="<?php echo $store_name; ?>"
But adding the code below obviously with reference to my alternative image doesn't work. Can any one list instructions for this for opencart version 1.5.6
matte2k wrote:Seems like the correct code should be:

Code: Select all

<img src="<?php echo HTTP_IMAGE; ?>/data/Loggor/logga_liten.png" 
without the image catalog... cause that created double catalogues: image/image/data/Loggor.....
Thanks

Waz

Newbie

Posts

Joined
Thu Oct 31, 2013 11:43 am

Post by vtoshev » Mon Nov 18, 2013 8:28 am

Hi all,

I have the same problem as Waz above - I am using 1.5.5.1 and tried altering the img src in every possible way but nothing seems to work. My logo file for the confirmation email is less than 239px and 100px as suggested in this topic http://forum.opencart.com/viewtopic.php?f=20&t=49129
I am modifying the order.tpl file. If anyone has any ideas please share.

Thanks

Newbie

Posts

Joined
Wed May 01, 2013 8:03 pm

Post by pprmkr » Mon Nov 18, 2013 9:09 pm

Attached file tested on 1.5.4, 1.5.5 and 1.5.6

Extra setting in System - Settings - Image
Choose logo to use in order mail.
When no image selected default logo is used.

Attachments

copy to /vqmod/xml


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by wazaus » Tue Nov 19, 2013 10:37 am

pprmkr wrote:Attached file tested on 1.5.4, 1.5.5 and 1.5.6

Extra setting in System - Settings - Image
Choose logo to use in order mail.
When no image selected default logo is used.
Hey pprmk,

I just uploaded your file but there is no extra option under System > Settings > Image tab...

Anything else I can try?

Thank you very much for your help so far.

Newbie

Posts

Joined
Thu Oct 31, 2013 11:43 am

Post by pprmkr » Tue Nov 19, 2013 1:25 pm

System - Settings : Edit your store - Tab Image
maillogo.png

maillogo.png (20.42 KiB) Viewed 8503 times


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by wazaus » Tue Nov 19, 2013 1:43 pm

Hey pprmkr,

Yep thats were I went. I dropped the xml file in vqmod/xml directory. But I am not seeing the Mail Logo attribute :$

Not sure what else to try? Any cache to clear or something?

Happy to screen share or something to work it out with you :D

Newbie

Posts

Joined
Thu Oct 31, 2013 11:43 am

Post by pprmkr » Tue Nov 19, 2013 1:49 pm

Check vqmod/logs for errors.

These files must be original:
admin/controller/setting/setting.php
admin/controller/setting/store.php
admin/view/template/setting/setting.tpl
admin/view/template/setting/store_form.tpl
catalog/model/checkout/order.php

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by wazaus » Wed Nov 20, 2013 9:40 am

I checked a couple of the logs but can't find any reference to seperate_logo_for_ordermail.xml

I checked all the files you listed and they all have the same date as last edited so I don't think they have been changed.

Any other suggestions?

Newbie

Posts

Joined
Thu Oct 31, 2013 11:43 am

Post by pprmkr » Wed Nov 20, 2013 1:55 pm

Check /vqmod/vqcache/vq2-admin_controller_setting_setting.php

Starting at line 706 you should read:

Code: Select all

		if (isset($this->request->post['config_maillogo'])) {
			$this->data['config_maillogo'] = $this->request->post['config_maillogo'];
		} else {
			$this->data['config_maillogo'] = $this->config->get('config_maillogo');			
		}
		
		if ($this->config->get('config_maillogo') && file_exists(DIR_IMAGE . $this->config->get('config_maillogo')) && is_file(DIR_IMAGE . $this->config->get('config_maillogo'))) {
			$this->data['maillogo'] = $this->model_tool_image->resize($this->config->get('config_maillogo'), 100, 100);		
		} else {
			$this->data['maillogo'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
		}
And /vqmod/vqcache/vq2-admin_view_template_setting_setting.tpl
Starting at line 614:

Code: Select all

            <tr>
              <td><?php echo $entry_maillogo; ?></td>
              <td><div class="image"><img src="<?php echo $maillogo; ?>" alt="" id="thumb-maillogo" />
                  <input type="hidden" name="config_maillogo" value="<?php echo $config_maillogo; ?>" id="maillogo" />
                  <br />
                  <a onclick="image_upload('maillogo', 'thumb-maillogo');"><?php echo $text_browse; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('#thumb-maillogo').attr('src', '<?php echo $no_image; ?>'); $('#maillogo').attr('value', '');"><?php echo $text_clear; ?></a></div></td>
            </tr>

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by wazaus » Thu Nov 21, 2013 12:18 pm

PPRMKR!!!

Problem solved!

I went looking for the files you specified only to find a single file of 0 bytes called vq2-C

I had trouble with this showing up prior and deleted it to solver the issue. This time I just renamed it vq2-C.bak

Logged into the backend and bam! Mail Logo option appears :D

Thank you sooo much for your help I really appreciate the time it took to reply and help me out mate.

I'm curious... Do you know what this damn vq2-C file is that shows up?

Waz

Newbie

Posts

Joined
Thu Oct 31, 2013 11:43 am

Post by pprmkr » Thu Nov 21, 2013 4:17 pm

Sorry, I don't know, but sounds like error writing file.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by nytevizion » Thu Dec 05, 2013 5:45 am

Thanks PPMKR.

I was just about to do this myself and thought I would check the forums.
This saved me a good hour or more of screwing around since I am an amateur at coding.

Works perfectly.
Thanks again.

New member

Posts

Joined
Fri Jun 29, 2012 1:49 am

Post by heovang » Tue Dec 17, 2013 1:22 am

Any chance for a solution ?

Notice: Undefined variable: entry_maillogo in /home/folder/public_html/admin/view/template/setting/setting.tpl on line 617

Newbie

Posts

Joined
Fri Oct 05, 2012 10:52 pm

Post by pprmkr » Tue Dec 17, 2013 1:29 am

heovang wrote:/admin/view/template/setting/setting.tpl on line 617
In this case vQmod could not alter setting.tpl, otherwise the error should mention: /vqmod/vqcache/vq2-admin_view_template_setting_setting.tpl

Did you make changes to setting.tpl ?
Check vqmod/logs for errors.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by stonerisefarm » Wed Jul 09, 2014 1:57 am

pprmkr wrote:Attached file tested on 1.5.4, 1.5.5 and 1.5.6

Extra setting in System - Settings - Image
Choose logo to use in order mail.
When no image selected default logo is used.
Thank you so much pprmkr, this is awesome!

Newbie

Posts

Joined
Tue Nov 16, 2010 10:44 am

Post by emanfrost » Tue Aug 18, 2015 8:23 am

I'm also having trouble with the XML file. I'm using Opencart 2.0.3.1

If it doesn't work with that version, does anyone have a different solution. The edit at the beginning of this thread did not work for me.

Here is my vqmod log file (edited out some stuff)

---------- Date: 2015-08-17 21:36:53 ~ IP : xxxxx ----------
REQUEST URI : /admin/index.php?route=setting/setting&token=625c8cbc420a02102782149d4b164ef6
MOD DETAILS:
modFile : /home/xxxxx/public_html/vqmod/xml/seperate_logo_for_ordermail.xml
id : Seperate logo for order mail
version : 1
vqmver : 2
author : Roelie @ PprMkr

File Name : admin/controller/setting/setting.php(0)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): $this->data['entry_logo']
MOD DETAILS:
modFile : /home/xxxxx/public_html/vqmod/xml/shopme_product_tabs_admin.xml
id : Additional Product Tabs
version : 1.0.3
vqmver : 2.2.1
author : Godfrey Livinstone

File Name : admin/model/catalog/product.php(2)
VQModObject::applyMod - SEARCH NOT FOUND (SKIPPED): $data = array_merge($data, array('product_attribute' => $this->getProductAttributes($product_id)));

----------------------------------------------------------------------


---------- Date: 2015-08-17 21:51:07 ~ IP : xxxxx ----------
REQUEST URI : /admin/index.php?route=setting/store&token=625c8cbc420a02102782149d4b164ef6
MOD DETAILS:
modFile : /home/xxxxx/public_html/vqmod/xml/seperate_logo_for_ordermail.xml
id : Seperate logo for order mail
version : 1
vqmver : 2
author : Roelie @ PprMkr

File Name : admin/controller/setting/store.php(0)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): $this->data['entry_logo']
----------------------------------------------------------------------


---------- Date: 2015-08-17 21:59:19 ~ IP : xxxxx ----------
REQUEST URI : /index.php?route=checkout/confirm
MOD DETAILS:
modFile : /home/xxxxx/public_html/vqmod/xml/seperate_logo_for_ordermail.xml
id : Seperate logo for order mail
version : 1
vqmver : 2
author : Roelie @ PprMkr

File Name : catalog/model/checkout/order.php(1)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): $template->data['logo']
----------------------------------------------------------------------

Newbie

Posts

Joined
Sun Aug 09, 2015 3:00 am
Who is online

Users browsing this forum: No registered users and 26 guests