Community Forums

[Released] Prof. Invoice and Packingslip

Free manual modifications can be contributed here. Modifications are manual snippets of code that are pasted into the forums for others to use.

Re: [Released] Prof. Invoice and Packingslip

Postby i2Paq » Tue Feb 01, 2011 6:18 pm

TalonRAge wrote:Here is the vQmod file that handles both the invoices and packing slips since your latest release.


Thanks for that, I have added it to the Prof. Invoice and Packingslip Extension :)
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: [Released] Prof. Invoice and Packingslip

Postby francoisv » Wed Feb 02, 2011 6:04 am

Hi there.
Thx for the mod. I am rather new at this.
I installed it and made all the changes to the files.
I have a few problems. The alignment of the button seems to be a bit off. See attached picture.
Also, how do I change the logo and the images at the bottom? It shows the default logo and not my company logo.
How do I change the line in yellow or remove it if I don't want it.
Sorry if I sound like a noob.
Thx
allign.jpg
allign.jpg (5.08 KiB) Viewed 2031 times
invoice.jpg
invoice.jpg (53.92 KiB) Viewed 2031 times
francoisv
 
Posts: 21
Joined: Thu Nov 04, 2010 9:08 am

Re: [Released] Prof. Invoice and Packingslip

Postby i2Paq » Wed Feb 02, 2011 6:56 am

francoisv wrote:Hi there.
Thx for the mod. I am rather new at this.
I installed it and made all the changes to the files.
I have a few problems. The alignment of the button seems to be a bit off. See attached picture.
Also, how do I change the logo and the images at the bottom? It shows the default logo and not my company logo.
How do I change the line in yellow or remove it if I don't want it.
Sorry if I sound like a noob.
Thx


The code for images are found in the \admin\view\template\sales\order_packingslip.tpl and the \admin\view\template\sales\osc_order_invoice.
The images it self are found in \admin\view\osc_invoice.

The button alignment I think is because you did not add the code correctly.
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: [Released] Prof. Invoice and Packingslip

Postby extigo » Wed Feb 02, 2011 11:38 am

In the manual it does not say you have to edit another div. I had the same problem because I put the input code in the same div as the original buttons. In the code you have to create a div for every button separately.
Op al uw computervragen een antwoord -- Extigo Computers
http://www.extigo.nl

Using OC 1.4.9.4
extigo
 
Posts: 172
Joined: Thu Dec 09, 2010 9:04 am

Re: [Released] Prof. Invoice and Packingslip

Postby i2Paq » Wed Feb 02, 2011 11:58 am

extigo wrote:In the manual it does not say you have to edit another div. I had the same problem because I put the input code in the same div as the original buttons. In the code you have to create a div for every button separately.


It says where to put it + it has the <div> and </div> in place.

I will check tonight.
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: [Released] Prof. Invoice and Packingslip

Postby extigo » Thu Feb 03, 2011 7:31 am

Yeah it says where you need to put it. But in the manual you are only talking about the <a=href></a> tags. So I thought the new code needed to be within the div tags. When I did that I got the same problem as francoisv.
Op al uw computervragen een antwoord -- Extigo Computers
http://www.extigo.nl

Using OC 1.4.9.4
extigo
 
Posts: 172
Joined: Thu Dec 09, 2010 9:04 am

Re: [Released] Prof. Invoice and Packingslip

Postby afwollis » Fri Feb 04, 2011 7:36 am

Hi all, here is a valid (mod - by - default) code:

new buttons are in the same div as the original buttons

Code: Select all
admin/view/template/sale/order_list.tpl

Code: Select all
<div class="buttons">
<a onclick="$('#form').attr('action', '<?php echo $invoice; ?>'); $('#form').attr('target', '_blank'); $('#form').submit();" class="button"><span><?php echo $button_invoices; ?></span></a>
<!-- webme - osCommerce Invoice - mod - start -->
<a onclick="$('#form').attr('action', '<?php echo $osc_invoices; ?>'); $('#form').attr('target', '_blank'); $('#form').submit();" class="button"><span><?php echo $button_osc_invoices; ?></span></a>
<!-- webme - osCommerce Invoice - mod - end -->
<!-- webme - Packingslip - mod - start -->
<a onclick="$('#form').attr('action', '<?php echo $packingslips; ?>'); $('#form').attr('target', '_blank'); $('#form').submit();" class="button"><span><?php echo $button_packingslips; ?></span></a>
<!-- webme - Packingslip - mod - end -->
<a onclick="$('#form').attr('action', '<?php echo $delete; ?>'); $('#form').attr('target', '_self'); $('#form').submit();" class="button"><span><?php echo $button_delete; ?></span></a>
</div>


Code: Select all
admin/view/template/sale/order_form.tpl

Code: Select all
<div class="buttons">
<a onclick="window.open('<?php echo $invoice; ?>');" class="button"><span><?php echo $button_invoice; ?></span></a>
<!-- webme - osCommerce Invoice - mod - start -->
<a onclick="window.open('<?php echo $osc_invoice; ?>');" class="button"><span><?php echo $button_osc_invoice; ?></span></a>
<!-- webme - osCommerce Invoice - mod - end -->
<!-- webme - Packingslip - mod - start -->
<a onclick="window.open('<?php echo $packingslip; ?>');" class="button"><span><?php echo $button_packingslip; ?></span></a>
<!-- webme - Packingslip - mod - end -->
<a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a>
</div>
afwollis
 
Posts: 110
Joined: Mon Jan 10, 2011 9:41 pm
Location: Ukraine

Re: [Released] Prof. Invoice and Packingslip

Postby afwollis » Sat Feb 05, 2011 9:34 am

for those who want to see SKU...

the changes are almost the same for both "mods"


step #0 (one for both)
open
Code: Select all
admin/model/sale/order.php

after (near the end of file)
Code: Select all
public function getTotalSalesByYear($year) {
         $query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND YEAR(date_added) = '" . (int)$year . "'");

      return $query->row['total'];
   }

add
Code: Select all
   /* webme - get sku - for osC-invoice or Packingslip - mod - start */
   public function wbm_getSKU($prodID) {
      $query = $this->db->query("SELECT `sku` FROM `" . DB_PREFIX . "product` WHERE `product_id` = '".(int)$prodID."' LIMIT 1");
      
      return $query->row['sku'];
   }
   /* webme - get sku - for osC-invoice or Packingslip - mod - end */


...in their invoices
step #1
open
Code: Select all
admin/controller/sale/order.php

find function
Code: Select all
public function osc_invoice() {

inside it
after
Code: Select all
$this->data['column_comment'] = $this->language->get('column_comment');

add
Code: Select all
$this->data['column_sku'] = $this->language->get('column_sku');

scroll down
after (somewhere around the line 1109)
Code: Select all
                  'model'    => $product['model'],

add
Code: Select all
                  'sku'    => $this->model_sale_order->wbm_getSKU($product['product_id']),


step #2
open
Code: Select all
admin/language/english/sale/osc_order.php

add anywhere
Code: Select all
$_['column_sku']         = 'SKU';


step #3
open
Code: Select all
admin/view/template/sale/osc_order_invoice.tpl

after
Code: Select all
<td class="dataTableHeadingContent-invoice"><?php echo $column_model; ?></td>

add
Code: Select all
<td class="dataTableHeadingContent-invoice"><?php echo $column_sku; ?></td>

after
Code: Select all
<td class="dataTableContent" valign="top"><?php echo $product['model']; ?></td>

add
Code: Select all
<td class="dataTableContent" valign="top"><?php echo $product['sku']; ?></td>


replace
Code: Select all
<td colspan="8" align="right"><br> <table border="0" cellpadding="2" cellspacing="0">

to
Code: Select all
<td colspan="9" align="right"><br> <table border="0" cellpadding="2" cellspacing="0">


OC_osC-invoice_packingslip_sku_001.png
OC_osC-invoice_packingslip_sku_001.png (55.93 KiB) Viewed 1971 times


...in their packingslips
step #1
open
Code: Select all
admin/controller/sale/order.php

find function
Code: Select all
public function packingslip() {

inside it
add
Code: Select all
$this->data['column_sku'] = $this->language->get('column_sku');

after
Code: Select all
$this->data['column_comment'] = $this->language->get('column_comment');

scroll down
after (somewhere around the line 1327)
Code: Select all
                  'model'    => $product['model'],

add
Code: Select all
                  'sku'    => $this->model_sale_order->wbm_getSKU($product['product_id']),


step #2
open
Code: Select all
admin/language/english/sale/packingslip.php

add anywhere
Code: Select all
$_['column_sku']         = 'SKU';


step #3
open
Code: Select all
admin/view/template/sale/order_packingslip.tpl

after
Code: Select all
<td class="dataTableHeadingContent-invoice"><?php echo $column_model; ?></td>

add
Code: Select all
<td class="dataTableHeadingContent-invoice"><?php echo $column_sku; ?></td>

after
Code: Select all
<td class="dataTableContent" valign="top"><?php echo $product['model']; ?></td>

add
Code: Select all
<td class="dataTableContent" valign="top"><?php echo $product['sku']; ?></td>


OC_osC-invoice_packingslip_sku_002.png
OC_osC-invoice_packingslip_sku_002.png (50.14 KiB) Viewed 1971 times
Last edited by afwollis on Sat Feb 05, 2011 9:41 am, edited 1 time in total.
afwollis
 
Posts: 110
Joined: Mon Jan 10, 2011 9:41 pm
Location: Ukraine

Re: [Released] Prof. Invoice and Packingslip

Postby afwollis » Sat Feb 05, 2011 9:39 am

How do I change the line in yellow or remove it if I don't want it.

the text is in your language files:
Code: Select all
$_['entry_yellow_line'] = 'blah-blah-blah. Yellow line text. It is from the language file.';


if you don't need this line - remove next code from your templates:
Code: Select all
  <tr>
    <td><img src="view/osc_invoice/pixel_trans.gif" alt="" width="1" border="0" height="5"></td>
  </tr>
  <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>


if you want to change the styling, check
Code: Select all
admin/view/osc_invoice/stylesheet.css
afwollis
 
Posts: 110
Joined: Mon Jan 10, 2011 9:41 pm
Location: Ukraine

Re: [Released] Prof. Invoice and Packingslip

Postby BlackTube » Fri Feb 11, 2011 3:13 am

that works good.
User avatar
BlackTube
 
Posts: 19
Joined: Fri Jan 14, 2011 6:11 am
Location: USA

Re: [Released] Prof. Invoice and Packingslip

Postby megahuman » Tue Feb 15, 2011 7:44 am

Hey,

I want to install this mod but I'm just curious what the difference between the two download files are?

Prof. Invoice & Packingslip 1.3
or the Prof. Invoice & Packingslip 1.3 vQmod?

Do I need them both?
megahuman
 
Posts: 211
Joined: Tue Dec 14, 2010 8:57 am

Re: [Released] Prof. Invoice and Packingslip

Postby fiona86 » Tue Feb 15, 2011 11:36 am

Is it possible for us to add it a few more lines of text to the yellow box? I'm sure many of us would need more space type instructions and bank information for the customers to make payment.
fiona86
 
Posts: 7
Joined: Tue Feb 15, 2011 11:34 am

Re: [Released] Prof. Invoice and Packingslip

Postby i2Paq » Tue Feb 15, 2011 11:41 am

megahuman wrote:Hey,

I want to install this mod but I'm just curious what the difference between the two download files are?

Prof. Invoice & Packingslip 1.3
or the Prof. Invoice & Packingslip 1.3 vQmod?

Do I need them both?


If you are going to use the [MOD] - VirtualQMod "vQmod" Virtual File Modification System then yes, you need them both.
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: [Released] Prof. Invoice and Packingslip

Postby megahuman » Tue Feb 15, 2011 12:11 pm

i2Paq wrote:
megahuman wrote:Hey,

I want to install this mod but I'm just curious what the difference between the two download files are?

Prof. Invoice & Packingslip 1.3
or the Prof. Invoice & Packingslip 1.3 vQmod?

Do I need them both?


If you are going to use the [MOD] - VirtualQMod "vQmod" Virtual File Modification System then yes, you need them both.


But is their any benefits using that or is it just easier to install the normal mod?
megahuman
 
Posts: 211
Joined: Tue Dec 14, 2010 8:57 am

Re: [Released] Prof. Invoice and Packingslip

Postby afwollis » Wed Feb 16, 2011 10:41 am

fiona86 wrote:Is it possible for us to add it a few more lines of text to the yellow box? I'm sure many of us would need more space type instructions and bank information for the customers to make payment.

If you need just "new lines" - no problem:
open your language file
Code: Select all
admin/language/YOUR_LANG/sale/osc_order.php

I've changed
Code: Select all
$_['entry_yellow_line'] = 'blah-blah-blah. Yellow line text. It is from the language file.';

to
Code: Select all
$_['entry_yellow_line'] = 'blah-blah-blah. Yellow line text. It is from the language file.<br /><br />blah-2<br />blah-3<br /><br />...<br /><br />blah-n';

Code: Select all
<br />

is a "line breaker".
each <br /> means "new line"


and here is a result
OC_oscInvoice_yellow_line_001.png
OC_oscInvoice_yellow_line_001.png (52.8 KiB) Viewed 1862 times


But if you need some "positioning" within that "line", you will need some more markup-changes within template...
afwollis
 
Posts: 110
Joined: Mon Jan 10, 2011 9:41 pm
Location: Ukraine

Re: [Released] Prof. Invoice and Packingslip

Postby affordable » Thu Feb 17, 2011 5:31 pm

Hi,
Receiving this on top of admin/index.php?route=sale/order/osc_invoice&token=cfb256de26e125ae0d0ec8d91d6fb6d1

Notice: Undefined index: nif in /home/flowersh/public_html/domainname/admin/model/sale/order.php on line 217

Anybody know how to sort it out?

Thanks
affordable
 
Posts: 53
Joined: Thu Dec 16, 2010 8:53 am
Location: Ireland

Re: [Released] Prof. Invoice and Packingslip

Postby i2Paq » Thu Feb 17, 2011 5:50 pm

Looks like you modified the wrong file, no need for editing the: admin/model/sale/order.php
Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart.

Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Alles over BTW: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9835
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands

Re: [Released] Prof. Invoice and Packingslip

Postby kornovec » Fri Feb 18, 2011 3:04 pm

Hello,

first of all need to say that its great mod!!!
Is there any possibility how to separete subtotal, total, flatrate... etc. items?
I need it more custom.

Im not extactly a programmer, but i can see that now its in "group" - code:

Code: Select all
<?php foreach ($order['total'] as $total) { ?>
            <?php echo $total['title']; ?>
            <?php echo $total['text']; ?>
          <?php } ?>


And id like to have it like that:

Image

Thanks for any advice!
K.
kornovec
 
Posts: 45
Joined: Mon Jun 15, 2009 9:02 am

Re: [Released] Prof. Invoice and Packingslip

Postby afwollis » Tue Feb 22, 2011 5:42 pm

kornovec, you can compare "total title" with a pattern you need.

For example, if you want to show only "Total: bla bla" you have to replace this code
Code: Select all
<?php foreach ($order['total'] as $total) { ?>
   <tr>
      <td class="smallText" align="right"><?php echo $total['title']; ?></td>
      <td class="smallText" align="right"><?php echo $total['text']; ?></td>
   </tr>
<?php } ?>

with next one
Code: Select all
<?php foreach ($order['total'] as $total) { ?>
   <?php if ($total['title'] == "Total:") { ?>
      <tr>
         <td class="smallText" align="right"><?php echo $total['title']; ?></td>
         <td class="smallText" align="right"><?php echo $total['text']; ?></td>
      </tr>
   <?php } ?>
<?php } ?>
afwollis
 
Posts: 110
Joined: Mon Jan 10, 2011 9:41 pm
Location: Ukraine

Re: [Released] Prof. Invoice and Packingslip

Postby rocketero » Sun Feb 27, 2011 5:23 am

I'm newbie with this, I read that if you want to use vqmod, you need to download both zip files (pro and vqmod zip files).

But I"m not sure what to do, I downloaded vqmod and uploaded to the root of the store, now I have a file, then I modified the root file index.php and /admin/index.php to reflect the vqmod requirements. (replacing some 'require_once' statements).

Now I have this file: Prof_Invoice_PackingSlip.xml

Does this file suppose to be run from somewhere ? I see that it has basically all the manual changes that should be done to the core files to implement this packaging-invoice mod but not sure what to do with it.

regards.
Last edited by rocketero on Fri Mar 18, 2011 10:34 pm, edited 1 time in total.
rocketero
 
Posts: 36
Joined: Tue Feb 01, 2011 1:22 pm

PreviousNext

Return to Modifications

Who is online

Users browsing this forum: No registered users and 5 guests

Hosted by Arvixe Web Hosting