Post by rale » Thu May 02, 2019 6:38 am

Hello there!
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!

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by IP_CAM » Thu May 02, 2019 8:20 am

Need some instruction for that
Well, you're not the only One, others would also need Instructions
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 ... :D

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by rale » Thu May 02, 2019 10:06 am

Thanks for answer IP CAM.
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.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by IP_CAM » Thu May 02, 2019 10:56 am

Just tell me what you want to know.
Well, you already mentioned your technical Stuff, and I assume,
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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by cedcommerceteam » Thu May 02, 2019 4:22 pm

Hi rale,

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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by rale » Thu May 02, 2019 6:23 pm

Hi IP CAM, i understand you.
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 />
						&nbsp;<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>
this is default file order invoice
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 />
            &nbsp;<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>

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by rale » Thu May 02, 2019 6:24 pm

And this with last post

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'); 
And for admin side: admin/view/template/sale/order_info.twig use column and product usual for vsual and that all work good.
Last edited by rale on Fri May 03, 2019 5:03 am, edited 1 time in total.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by rale » Thu May 02, 2019 6:27 pm

Hi cedcommerceteam!
I know that, thank you, but i dont know wich part need change for my problem.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by rale » Thu May 02, 2019 6:47 pm

I can add files fromadmin/ controller /sale/ wich is changed if you need to look.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by cedcommerceteam » Thu May 02, 2019 8:28 pm

Hello rale,
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 . "'");
In admin/controller/sale/order.php add following code to invoice function while preparing order product :

Code: Select all

'sku'    => $product['sku'],
In view section, order_invoice.twig add following code :

Code: Select all

<td><b>{{ column_sku  }}</b></td>

Code: Select all

<td>{{ product.sku }}</td>
Please try these above codes. I hope this will help you.

Thanks.

Attachments

Order_invoice.png

Order_invoice.png (61.77 KiB) Viewed 1921 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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by straightlight » Thu May 02, 2019 8:32 pm

Language file for the column_sku definition might be missing. In addition, there seem to be an extra space with column_sku from the right-end side of the variable.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by rale » Thu May 02, 2019 8:46 pm

Hello there, thank you cedcommerceteam i will check that. I have some files wich i found.
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
Last edited by rale on Fri May 03, 2019 5:05 am, edited 1 time in total.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by rale » Thu May 02, 2019 8:50 pm

I'm stuck between all files.
I go to added that and check what happend.
Last edited by rale on Fri May 03, 2019 5:05 am, edited 1 time in total.

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by straightlight » Thu May 02, 2019 8:51 pm

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


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by rale » Thu May 02, 2019 10:18 pm

No , its same like before, just code from model is diferent but same work, sku not show on invoice from email send.
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 . "'");
What you want say with that straightlight? i know what want say, but what i wrote that can be diferent, Do not joke, brother.

Ok, what i need make on catalog/controller/account/order.php to show sku my customers on order history and order info?

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by straightlight » Thu May 02, 2019 11:14 pm

What you want say with that straightlight? i know what want say, but what i wrote that can be diferent, Do not joke, brother.
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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by rale » Thu May 02, 2019 11:25 pm

I dont understand you bro. :D
Do you want told me steps for implement sku on customer side order history? I know you know how need work that. >:D

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by straightlight » Thu May 02, 2019 11:30 pm

While the partial codes posted might be difficult to track down the source of the issue that you may have missed, you can always create a new service request in the Commercial Support section of the forum to implement this feature as a custom job or to find an equivalent extension from the Marketplace.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by rale » Thu May 02, 2019 11:44 pm

I know that, not problem.
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

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by cedcommerceteam » Fri May 03, 2019 2:47 pm

Hello rale,

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 }}
then in the next line code for SKU as

Code: Select all

{{ column_sku }}
If in controller, value assigned for product quantity is

Code: Select all

 'quantity' => $product['quantity'], 
then in the next line code for SKU as

Code: Select all

 'sku' => $product['sku'],
Similarly, in language & model.

For logo,

Code: Select all

$data['logo'] = HTTPS_CATALOG . 'your logo image path';
code this in controller & in view code as

Code: Select all

<img src="{{ logo }}" class="" height="70" width="70" /> 
Note : HTTPS_CATALOG if working on frontend or catalog section and HTTPS_SERVER if working on backend or admin section.

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


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: No registered users and 139 guests