Code: Select all
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
}
Code: Select all
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
if (isset($store_info['config_logo']) && is_file(DIR_IMAGE . $store_info['config_logo'])) {
$store_logo = $this->model_tool_image->resize($store_info['config_logo'], 100, 100);
} else {
$store_logo = $this->model_tool_image->resize('no_image.png', 100, 100);
}
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
if ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
$store_logo = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
} else {
$store_logo = $this->model_tool_image->resize('no_image.png', 100, 100);
}
}
Code: Select all
'store_logo' => $store_logo,
Code: Select all
<div class="pull-right"><img src="<?php echo $order['store_logo']; ?>" alt="<?php echo $order['store_name']; ?>" /></div>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Lines 1957-1970
Code: Select all
if ($order_info) {
$store_info = $this->model_setting_setting->getSetting('config', $order_info['store_id']);
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
}
Code: Select all
// Make sure there is a shipping method
if ($order_info && $order_info['shipping_code']) {
$store_info = $this->model_setting_setting->getSetting('config', $order_info['store_id']);
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
}
Code: Select all
$data['orders'][] = array(
'order_id' => $order_id,
'invoice_no' => $invoice_no,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'store_address' => nl2br($store_address),
'store_email' => $store_email,
'store_telephone' => $store_telephone,
'store_fax' => $store_fax,
'email' => $order_info['email'],
'telephone' => $order_info['telephone'],
'shipping_address' => $shipping_address,
'shipping_method' => $order_info['shipping_method'],
'product' => $product_data,
'comment' => nl2br($order_info['comment'])
In your case the following can be found at lines 1960 to 1970 (for the invoice) and at lines 2202 to 2212 (for the shipping docket):
Code: Select all
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
}
Code: Select all
if ($store_info) {
$store_address = $store_info['config_address'];
$store_email = $store_info['config_email'];
$store_telephone = $store_info['config_telephone'];
$store_fax = $store_info['config_fax'];
if (isset($store_info['config_logo']) && is_file(DIR_IMAGE . $store_info['config_logo'])) {
$store_logo = $this->model_tool_image->resize($store_info['config_logo'], 100, 100);
} else {
$store_logo = $this->model_tool_image->resize('no_image.png', 100, 100);
}
} else {
$store_address = $this->config->get('config_address');
$store_email = $this->config->get('config_email');
$store_telephone = $this->config->get('config_telephone');
$store_fax = $this->config->get('config_fax');
if ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
$store_logo = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
} else {
$store_logo = $this->model_tool_image->resize('no_image.png', 100, 100);
}
}
Code: Select all
$data['orders'][] = array(
'order_id' => $order_id,
'invoice_no' => $invoice_no,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
'store_address' => nl2br($store_address),
'store_email' => $store_email,
'store_telephone' => $store_telephone,
'store_fax' => $store_fax,
'email' => $order_info['email'],
'telephone' => $order_info['telephone'],
'shipping_address' => $shipping_address,
'shipping_method' => $order_info['shipping_method'],
'product' => $product_data,
'comment' => nl2br($order_info['comment'])
);
Code: Select all
'store_logo' => $store_logo,
Code: Select all
'store_fax' => $store_fax,
Then insert at line 17 in both admin/view/template/sale/order_invoice.tpl and admin/view/template/sale/order_shipping.tpl:
Code: Select all
<div class="pull-right"><img src="<?php echo $order['store_logo']; ?>" alt="<?php echo $order['store_name']; ?>" /></div>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Read the first post in this thread!ranu70 wrote:Hi ,
I am using opencart 1.5.4 version and want to add logo in my invoice how can i do this ...?
Thanking you...!
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Users browsing this forum: No registered users and 4 guests