so you wanna comments in "oscomm_invoice" ?
I will take a look on it, probably this evening or tomorrow.
thanks for your interest
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
Code: Select all
$order["comment"]
1. open
Code: Select all
admin/view/template/sale/osc_order_invoice.tpl
Code: Select all
<!-- order - comments - start //-->
<?php if ($order["comment"]) { ?>
<tr>
<td>
<table width="100%" border="1" cellpadding="2" cellspacing="0">
<tbody>
<tr class="dataTableRow">
<td><?php echo $order["comment"]; ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
<?php } ?>
<tr>
<td><img src="view/osc_invoice/pixel_trans.gif" alt="" width="1" border="0" height="5"></td>
</tr>
<!-- order - comments - end //-->
Code: Select all
<tr>
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td class="main-payment2"><?php echo $entry_yellow_line; ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
yes, because the requirements for admin-comments are different in different projects.
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
Dear Sir,"admin comments" can be simply added BUT not available now because there is NO "common" way to put into invoice right that comment(s) which you need.
Thanks! this is great but not for me.
If admin comment is simply - can you tell it?
All admin comments is OK for me.
Thank you !!!
open your
Code: Select all
admin/controller/sale/order.php
Code: Select all
/* webme - osCommerce Invoice - mod - end */
replace
Code: Select all
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_id' => $invoice_id,
'invoice_date' => $invoice_date,
'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'], '/'),
'address' => nl2br($this->config->get('config_address')),
'telephone' => $this->config->get('config_telephone'),
'fax' => $this->config->get('config_fax'),
'email' => $this->config->get('config_email'),
'shipping_address' => $shipping_address,
'payment_address' => $payment_address,
'shipping_method' => $order_info['shipping_method'],
'payment_method' => $order_info['payment_method'],
'customer_email' => $order_info['email'],
'ip' => $order_info['ip'],
'customer_telephone'=> $order_info['telephone'],
'comment' => $order_info['comment'],
'product' => $product_data,
'total' => $total_data
);
Code: Select all
/* order - admin_comments - start */
$histories = array();
$order_histories = $this->model_sale_order->getOrderHistory($this->request->get['order_id']);
foreach ($order_histories as $order_history) {
if (!empty($order_history['comment'])) {
$histories[] = array(
'date_added' => date($this->language->get('date_format_short'), strtotime($order_history['date_added'])),
'status' => $order_history['status'],
'comment' => nl2br($order_history['comment']),
'notify' => $order_history['notify'] ? $this->language->get('text_yes') : $this->language->get('text_no')
);
}
}
/* order - admin_comments - end */
$this->data['orders'][] = array(
'order_id' => $order_id,
'invoice_id' => $invoice_id,
'invoice_date' => $invoice_date,
'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'], '/'),
'address' => nl2br($this->config->get('config_address')),
'telephone' => $this->config->get('config_telephone'),
'fax' => $this->config->get('config_fax'),
'email' => $this->config->get('config_email'),
'shipping_address' => $shipping_address,
'payment_address' => $payment_address,
'shipping_method' => $order_info['shipping_method'],
'payment_method' => $order_info['payment_method'],
'customer_email' => $order_info['email'],
'ip' => $order_info['ip'],
'customer_telephone'=> $order_info['telephone'],
'comment' => $order_info['comment'],
'product' => $product_data,
'total' => $total_data,
'history' => $histories
);
Code: Select all
admin/view/template/sale/osc_order_invoice.tpl
Code: Select all
<tr>
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td class="main-payment2"><?php echo $entry_yellow_line; ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
Code: Select all
<!-- order - admin_comments - start //-->
<?php if ($order["history"]) { ?>
<tr>
<td>
<table width="100%" border="1" cellpadding="2" cellspacing="0">
<tbody>
<?php foreach($order["history"] as $order_history) { ?>
<tr class="main-payment">
<td><?php echo $order_history["comment"]; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</td>
</tr>
<?php } ?>
<tr>
<td><img src="view/osc_invoice/pixel_trans.gif" alt="" width="1" border="0" height="5"></td>
</tr>
<!-- order - admin_comments - end //-->
FTW, you will need small changes to last code to put admin-comments into "yellow line".
replace this code
Code: Select all
<tr>
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td class="main-payment2"><?php echo $entry_yellow_line; ?></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td><img src="view/osc_invoice/pixel_trans.gif" alt="" width="1" border="0" height="5"></td>
</tr>
Code: Select all
<!-- order - admin_comments - start //-->
<?php if ($order["history"]) { ?>
<tr>
<td>
<table width="100%" border="1" cellpadding="2" cellspacing="0">
<tbody>
<?php foreach($order["history"] as $order_history) { ?>
<tr class="main-payment">
<td class="main-payment2"><?php echo $order_history["comment"]; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</td>
</tr>
<?php } ?>
<tr>
<td><img src="view/osc_invoice/pixel_trans.gif" alt="" width="1" border="0" height="5"></td>
</tr>
<!-- order - admin_comments - end //-->
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica
I still don't see how to do the second part.celestial wrote:One is outside yellow line and the other is inside yellow line, 2 different steps
I did the necessary changes to admin/controller/sale/order.php by adding the code between the
/* order - admin_comments - start */
/* order - admin_comments - end */
(adding at the end: 'history' => $histories AFTER 'total' => $total_data,)
OK, that file is easy to understand those changes.
But then comes along admin/view/template/sale/osc_order_invoice.tpl
the first two codes boxes are easy to apply, just add the code in the second box before the occurrence of the first box.
But the las two code boxes I see them hard to apply as the code they refer to looks most the same to the previous 2 code boxes. I see only one line referring to "$entry_yellow_line" and not two.
I might have difficulty understanding, have not much knowledge of php coding
rocketero, dont panic
you have to decide - are you gonna use admin-comments inside "yellow line", or left that "yellow line" for other static staff (like bank info or so) and use admin-comments in separate "grey-block".
1) to add admin-comments within the "grey-block":
follow the first part (all above "thats all " phrase) of instructions.
2) to add admin-comments within the "yellow-line-block":
follow the first part (all above "thats all " phrase) of instructions EXCEPT last changes in template file.
and then apply changes described after
FTW, you will need small changes to last code to put admin-comments into "yellow line".
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
I installed it an works beautifully! except... generating an invoice number and then clicking on osCommerce invoice (or print invoice for that matter) seems to not display the invoice number.
Als when I leave and return to the order, the invoice number is gone and the button generate invoice number is back instead.
I THINK it has more to do with a CHMOD issue than an osCommerce issue. Anyone can help me out?
If it is 1.4.9.4 I think this modification is incompatible due to the change of the Invoice-number way of working.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Then it should work.Thegge wrote:Sorry, forgot to mention: Version 1.4.9.3i2Paq wrote:What version of OpenCart?
If it is 1.4.9.4 I think this modification is incompatible due to the change of the Invoice-number way of working.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
you have some problems with ajax.Als when I leave and return to the order, the invoice number is gone and the button generate invoice number is back instead.
you have to check the browser's log console to see if there any errors appears when you clicking "Generate" button.
please use "osc" lower case abbreviation (or "osc_invoice" or "osc invoice") instead of "OS Commerce" in any future posts, because it could confuse other users.I THINK it has more to do with a CHMOD issue than an OS Commerce issue. Anyone can help me out?
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
I set the start count for the invoices to 000 and seems it does not accept a 0.
Prefix was 2011 and then 000 for start, but it does not work.
Changed it to 0001 and now shows 20111.
Leaves the zeroes out, but at least it works!
Code: Select all
Notice: Undefined index: history in /home2/MyWebsite/public_html/admin/view/template/sale/osc_order_invoice.tpl on line 184
so I don't understand is that 'history' undefined index? what does index means, usually I see 'Undefined variable' but this is different.
rocketero, backup your current template file
Code: Select all
/home2/MyWebsite/public_html/admin/view/template/sale/osc_order_invoice.tpl
Русское коммьюнити разработчиков OpenCart - myopencart.ru
some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed
My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This
For Print Shipping Invoice, I get now these 3 Notices in the same page:, the url ends on:
/admin/index.php?route=sale/order/osc_invoice&token=3cc546b95faee48ff249719cf5c3384e
Code: Select all
Undefined index: history in /home2/MYWEBSITE/public_html/admin/view/template/sale/osc_order_invoice.tpl on line 253
Code: Select all
Notice: Undefined variable: column_sku in /home2/MYWEBSITE/public_html/admin/view/template/sale/osc_order_invoice.tpl on line 189
Code: Select all
Notice: Undefined index: sku in /home2/MYWEBSITE/public_html/admin/view/template/sale/osc_order_invoice.tpl on line 204
for the other button, print invoice, the url ends on:
/admin/index.php?route=sale/order/invoice&token=3cc546b95faee48ff249719cf5c3384e
Code: Select all
Notice: Undefined index: order_id in /home2/MYWEBSITE/public_html/admin/controller/sale/order.php on line 928
Update: After taking off this osc_order_invoice.tpl and replacing it by the privious osc_order_invoice.tpl that I had before any changes about this whole issue 'web admin comments', Now the invoices and shipping receipts show fine with no Notices at all. And to be honest I don't even see that did any impact to what I was looking at once I clicked on Sales / Orders in backoffice.
Users browsing this forum: No registered users and 33 guests