I need help about sku.
I searched the forum but not found everything I need, I hope that someone is willing to help.
I set the sku and logo just on invoice.
Now i want show sku on admin order page, customer order history page and on email invoice, also on email invoce need show logo.
Need tell you, logo can see from customer page order on site and when send order , i have pdf email invoice, whaen i send invoice from them, logo not show like on invoice from admin (pdf), not from standard print invoice.
My English is not very good, I hope that you understand me how long it takes to get you help me.
Need some instruction for that. Thank you!
Well, you're not the only One, others would also need InstructionsNeed some instruction for that
first, on what you use on OC Version, Theme, and Extensions,
in order to know, what you're talking about in the first Place.
It's like, hey Doc, I need some Medicine, it hurts bad ...
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
I forgot for information.
Use 3.0.2.0 version, theme is So Revo 3.
Extensions for invoice is email print pdf dompdf version 3, that is wich i use now for invoice, other 3-4 extension have nothing to do with invoices.
Invoice sku and logo i work with codes only.
Just tell me what you want to know.
Well, you already mentioned your technical Stuff, and I assume,Just tell me what you want to know.
that the pdf dompdf version 3 is not compatible with your
SO Theme Extension. Or something else, not even directly
related with invoicing. It can be anything, and anywhere ...
But as I mentioned, you either need support from the Theme
Extension Creator, or then from one of the Extension Creators,
possibly related to the Error(s).
And/or you could check your Error Files (OcMod + System Log), to
find out in detail, where it fails, and then publish the Error infos here,
to possibly get some helpful info on this. But I cannot assist, since
I don't use or know the Version you use.
Good Luck!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
You need to set SKU when you set other product data for example Product name, Quantity, Price, etc
You find this data setting in respective Controllers.
For Example: If you want to do any changes in Order section then you need to visit admin > controller > sale > order.php
Note : If you are doing any changes in core Opencart file you need to do it by ocmod file. Put all your code in ocmod file & install that file, changes will be applied to core file. You can find your modification file in storage > modification > (path where changes applied)
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
pdf invoice file
admin/view/template/extension/sale/print_email_invoice.twig
that is only one file for pdf on admin and hi give buttons on order page for admin and on order page for customers.
Code: Select all
<!DOCTYPE html>
<html dir="{{ direction }}" lang="{{ lang }}">
<head>
<meta charset="UTF-8" />
<title>{{ title }}</title>
<base href="{{ base }}" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link href="view/javascript/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="view/javascript/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="view/javascript/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<style>
body {
background: #FFFFFF;
}
@import url('https://fonts.googleapis.com/css?family=Open+Sans&subset=latin-ext');
body, a, small, td, th, input, select, textarea, option, optgroup {
font-family: DejaVu sans, sans-serif;
font-size: 12px;
color: #000000;
}
h1 {
text-transform: uppercase;font-family: DejaVu Sans, sans-serif;
color: #CCCCCC;
text-align: right;
font-size: 24px;
font-weight: normal;
padding-bottom: 5px;
margin-top: 0px;
margin-bottom: 15px;
border-bottom: 1px solid #CDDDDD;
}
.div2 {
float: left;
display: inline-block;
}
.div3 {
float: right;
display: inline-block;
padding: 5px;
}
</style>
{% for order in orders %}
<table style="width: 100%;margin-bottom: 0px;border-bottom:1px solid green;">
<tr>
<td>
{% if order.store_url %}
<a href="{{ order.order_store_url }}" title="{{ order.order_store_name }}"><img src="{{ order.order_store_logo }}" alt="{{ order.order_store_name }}" style="width:150px;margin-bottom: 0px; border: none;" /></a>
{% elseif store_url %}
<a href="{{ order.order_store_url }}" title="{{ order.order_store_name }}"><img src="{{ order.order_store_logo }}" alt="{{ order.order_store_name }}" style="width:150px;margin-bottom: 0px; border: none;" /></a>
{% endif %}
</td>
<td>
<h1 style="font-size:18px;">{{ text_invoice }}</h1>
</td>
</tr>
</table>
<table>
<tr>
<td>
<b>I{{ order.store_name }}</b><br>
{{ order.store_address }},
{{ text_telephone }},
{{ order.store_telephone }},
{% if order.store_fax %}
{{ text_fax }} {{ order.store_fax }},
{% endif %}
{{ order.store_email }}<br />
{{ order.store_url }}
</td>
</tr>
</table>
<table style="width: 100%;margin-bottom: 20px;">
<tr>
<td>
{{ order.store_name }}<br />
{{ order.store_address }}<br />
{{ text_telephone }} {{ order.store_telephone }}<br />
{% if order.store_fax %}
{{ text_fax }} {{ order.store_fax }}<br />
{% endif %}
{{ order.store_email }}<br />
{{ order.store_url }}
</td>
<td align="right" valign="top">
<table>
<tr>
<td><b>{{ text_date_added }}</b></td>
<td>{{ order.date_added }}</td>
</tr>
{% if order.invoice_no %}
<tr>
<td><b>{{ text_invoice_no }}</b></td>
<td>{{ order.invoice_no }}</td>
</tr>
{% endif %}
<tr>
<td><b>{{ text_order_id }}</b></td>
<td>{{ order.order_id }}</td>
</tr>
<tr>
<td><b>{{ text_payment_method }}</b></td>
<td>{{ order.payment_method }}</td>
</tr>
{% if order.shipping_method %}
<tr>
<td><b>{{ text_shipping_method }}</b></td>
<td>{{ order.shipping_method }}</td>
</tr>
{% endif %}
</table>
</td>
</tr>
</table>
<table style="border-collapse: collapse;width: 100%;margin-bottom: 20px;border-top: 1px solid #CDDDDD;border-right: 1px solid #CDDDDD;">
<tr style="background: #E7EFEF;">
<td style="width:50%;border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;vertical-align: text-bottom;"><b>{{ text_payment_address }}</b></td>
<td style="width:50%;border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;vertical-align: text-bottom;"><b>{{ text_shipping_address }}</b></td>
</tr>
<tr>
<td style="width:50%;border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;vertical-align: text-bottom;">
{{ order.payment_address }}<br/>
{{ order.email }}<br/>
{{ order.telephone }}
{% if order.payment_company_id %}
<br/><br/>
{{ text_company_id }} {{ order.payment_company_id }}
{% endif %}
{% if order.payment_tax_id %}
<br/>
{{ text_tax_id }} {{ order.payment_tax_id }}
{% endif %}
</td>
<td style="width:50%;border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;vertical-align: text-bottom;">{{ order.shipping_address }}</td>
</tr>
</table>
<table style="border-collapse: collapse;width: 100%;margin-bottom: 20px;border-top: 1px solid #CDDDDD;border-right: 1px solid #CDDDDD;">
<tr style="background: #E7EFEF;">
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;"><b>{{ column_product }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;"><b>{{ column_model }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;"><b>{{ column_sku }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right"><b>{{ column_quantity }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right"><b>{{ column_price }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right"><b>{{ column_total }}</b></td>
</tr>
{% for product in order.product %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;">
{{ product.name }}
{% for option in product.option %}
<br />
<small> - {{ option.name }}: {{ option.value }}</small>
{% endfor %}
</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;">{{ product.model }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;">{{ product.sku }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ product.quantity }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ product.price }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ product.total }}</td>
</tr>
{% endfor %}
{% for voucher in order.voucher %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="left">{{ voucher.description }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="left"></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">1</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ voucher.amount }}</td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ voucher.amount }}</td>
</tr>
{% endfor %}
{% for total in order.total %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right" colspan="5"><b>{{ total.title }}:</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ total.text }}</td>
</tr>
{% endfor %}
{% if deposit_layaway %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right" colspan="5"><b>Layaway Deposit:</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ deposit_layaway }}</td>
</tr>
{% for layaway in layaways %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right" colspan="5"><b>{{ layaway.date_added }} - {{ layaway.description }}</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ layaway.amount }}</td>
</tr>
{% endfor %}
<tr>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right" colspan="5"><b>Layaway Balance:</b></td>
<td style="border-left: 1px solid #CDDDDD;border-bottom: 1px solid #CDDDDD;padding: 5px;" align="right">{{ layaway_balance }}</td>
</tr>
{% endif %}
</table>
{% if order.comment %}
<table class="comment">
<tr style="background: #E7EFEF;">
<td><b>{{ column_comment }}</b></td>
</tr>
<tr>
<td>{{ order.comment }} </td>
</tr>
</table>
<br>
ljgh djkfgh sdfjgh sldkfjgh lsdkjf ghlskdjfh glskdjf ghlskdjf ghsldkfj gh
{% endif %}
{% endfor %}
{% if this_email is not defined %}
<script type="text/javascript">
$(document).ready(function() {
window.print("about:blank");
document.write(htmlPage);
window.close();
});
</script>
{% endif %}
</body>
</html>
admin/view/template/sale/order_invoice.twig
Code: Select all
<!DOCTYPE html>
<html dir="{{ direction }}" lang="{{ lang }}">
<head>
<meta charset="UTF-8" />
<title>{{ title }}</title>
<base href="{{ base }}" />
<link href="view/javascript/bootstrap/css/bootstrap.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="view/javascript/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="view/javascript/bootstrap/js/bootstrap.min.js"></script>
<link href="view/javascript/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
<link type="text/css" href="view/stylesheet/stylesheet.css" rel="stylesheet" media="all" />
</head>
<body>
<div class="container">
{% for order in orders %}
{% if order.store_url %}
<a href="{{ order.order_store_url }}" title="{{ order.order_store_name }}"><img src="{{ order.order_store_logo }}" alt="{{ order.order_store_name }}" style="width:150px;margin-bottom: 0px; border: none;" /></a>
{% elseif store_url %}
<a href="{{ order.order_store_url }}" title="{{ order.order_store_name }}"><img src="{{ order.order_store_logo }}" alt="{{ order.order_store_name }}" style="width:150px;margin-bottom: 0px; border: none;" /></a>
{% endif %}
<div style="page-break-after: always;">
<h1>{{ text_invoice }} #{{ order.order_id }}</h1>
<table class="table table-bordered">
<thead>
<tr>
<td colspan="2">{{ text_order_detail }}</td>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 50%;"><address>
<strong>{{ order.store_name }}</strong><br />
{{ order.store_address }}
</address>
<b>{{ text_telephone }}</b> {{ order.store_telephone }}<br />
{% if order.store_fax %}
<b>{{ text_fax }}</b> {{ order.store_fax }}<br />
{% endif %}
<b>{{ text_email }}</b> {{ order.store_email }}<br />
<b>{{ text_website }}</b> <a href="{{ order.store_url }}">{{ order.store_url }}</a></td>
<td style="width: 50%;"><b>{{ text_date_added }}</b> {{ order.date_added }}<br />
{% if order.invoice_no %}
<b>{{ text_invoice_no }}</b> {{ order.invoice_no }}<br />
{% endif %}
<b>{{ text_order_id }}</b> {{ order.order_id }}<br />
<b>{{ text_payment_method }}</b> {{ order.payment_method }}<br />
{% if order.shipping_method %}
<b>{{ text_shipping_method }}</b> {{ order.shipping_method }}<br />
{% endif %}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead>
<tr>
<td style="width: 50%;"><b>{{ text_payment_address }}</b></td>
<td style="width: 50%;"><b>{{ text_shipping_address }}</b></td>
</tr>
</thead>
<tbody>
<tr>
<td><address>
{{ order.payment_address }}
</address></td>
<td><address>
{{ order.shipping_address }}
</address></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead>
<tr>
<td><b>{{ column_product }}</b></td>
<td><b>{{ column_model }}</b></td>
<td><b>{{ column_sku }}</b></td>
<td class="text-right"><b>{{ column_quantity }}</b></td>
<td class="text-right"><b>{{ column_price }}</b></td>
<td class="text-right"><b>{{ column_total }}</b></td>
</tr>
</thead>
<tbody>
{% for product in order.product %}
<tr>
<td>{{ product.name }}
{% for option in product.option %}
<br />
<small> - {{ option.name }}: {{ option.value }}</small>
{% endfor %}</td>
<td>{{ product.model }}</td>
<td>{{ product.sku }}</td>
<td class="text-right">{{ product.quantity }}</td>
<td class="text-right">{{ product.price }}</td>
<td class="text-right">{{ product.total }}</td>
</tr>
{% endfor %}
{% for voucher in order.voucher %}
<tr>
<td>{{ voucher.description }}</td>
<td></td>
<td class="text-right">1</td>
<td class="text-right">{{ voucher.amount }}</td>
<td class="text-right">{{ voucher.amount }}</td>
</tr>
{% endfor %}
{% for total in order.total %}
<tr>
<td class="text-right" colspan="5"><b>{{ total.title }}</b></td>
<td class="text-right">{{ total.text }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if order.comment %}
<table class="table table-bordered">
<thead>
<tr>
<td><b>{{ text_comment }}</b></td>
</tr>
</thead>
<tbody>
<tr>
<td>{{ order.comment }}</td>
</tr>
</tbody>
</table>
{% endif %}
</div>
{% endfor %}
</div>
</body>
</html>
Thema So Revo is based on the default files, for all we have to show or make on admin pages or customer is used by default files.
This is codes wich i use for sku and logo now:
Codes from straightlight for logo (he's not going to help about sku, I asked him at the PM and hi just turned me down like becouse some rules and themes, I have no idea what hi want tell me about that, but never mind. .. )
viewtopic.php?t=200169
i make one changes from straightlight code logo:
after set logo code, logo not show, just show image not found ../admin / image / catalog / nadohvat /logo.png and i create directories / image / catalog / nadohvat / and upload logo, after that logo is on invoice.
--------------------------------------------------------------------------
this i use for sku on order_invoice
https://stackoverflow.com/questions/496 ... -invoices
For sku on admin page order info I use code from extension sku-order-info-oc3.ocmod
on file admin/controller/sale/order.php
That code is
Code: Select all
$this->load->model('catalog/product');
As above post is quite messy, so l'll bit difficult to understand.
I have resolved sale/order/invoice issue :
Please check try & tell us whether it worked or not
In admin/model/sale/order.php update getOrderProducts function as :
Code: Select all
$query = $this->db->query("SELECT op.*, p.sku FROM " . DB_PREFIX . "order_product AS op LEFT JOIN " . DB_PREFIX . "product AS p ON (op.product_id = p.product_id) WHERE op.order_id = '" . (int)$order_id . "'");
Code: Select all
'sku' => $product['sku'],
Code: Select all
<td><b>{{ column_sku }}</b></td>
Code: Select all
<td>{{ product.sku }}</td>
Thanks.
Attachments
Order_invoice.png (61.77 KiB) Viewed 1974 times
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi straightlight, I'm glad that you responded, and you want to help.
https://github.com/condor2/Opencart_302 ... /order.php
that is modified from xxvirusxx or @condor2 i dont know but here is catalog/controller/account/order.php
Use 3.0.2.0 version, theme is So Revo 3.
i have new installed oc from open cart site
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I already have on invoice sku and logo, but just for download from admin, havent that on email when send to customer.
Also not show sku on customer hsitory side.
Dont understand point with this.
Code: Select all
your code for model sale/order.php ------------------------------------------------------------------
$query = $this->db->query("SELECT op.*, p.sku FROM " . DB_PREFIX . "order_product AS op LEFT JOIN " . DB_PREFIX . "product AS p ON (op.product_id = p.product_id) WHERE op.order_id = '" . (int)$order_id . "'");
mine old from model sale/order.php---------------------------------------------------------------------
$query = $this->db->query("SELECT op.*,p.sku FROM " . DB_PREFIX . "order_product op LEFT JOIN " . DB_PREFIX . "product p on op.product_id = p.product_id WHERE order_id = '" . (int)$order_id . "'");
Ok, what i need make on catalog/controller/account/order.php to show sku my customers on order history and order info?
What I say with that is the way you have followed the instructions may also be differed as compared to the original poster has addressed from his instructions prior.What you want say with that straightlight? i know what want say, but what i wrote that can be diferent, Do not joke, brother.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I found all that for now on the partial codes , and work a lot good. Yes, missed sometimes some things but work and is not good. I allways can remove bad codes and replaced with new. Now i cant wait any more, need make shop quickly.
If you want , just tell me how you think that need to do, like on this topic.
viewtopic.php?p=581056
Simplest way to resolve your SKU query is, you can follow same steps as followed for product name or quantity
For Example :
If in view, column name is
Code: Select all
{{ column_quantity }}
Code: Select all
{{ column_sku }}
Code: Select all
'quantity' => $product['quantity'],
Code: Select all
'sku' => $product['sku'],
For logo,
Code: Select all
$data['logo'] = HTTPS_CATALOG . 'your logo image path';
Code: Select all
<img src="{{ logo }}" class="" height="70" width="70" />
Please try above code if you know controller & twig file and update us with the result.
Thanks.
Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com
Webinar : Power up Your holiday season marketing with the Automation tool
Users browsing this forum: No registered users and 214 guests