Page 2 of 10

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 02, 2011 2:18 am
by i2Paq
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 :)

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 02, 2011 2:04 pm
by francoisv
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 6462 times

invoice.jpg

invoice.jpg (53.92 KiB) Viewed 6462 times


Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 02, 2011 2:56 pm
by i2Paq
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 02, 2011 7:38 pm
by extigo
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 02, 2011 7:58 pm
by i2Paq
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Thu Feb 03, 2011 3:31 pm
by extigo
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Fri Feb 04, 2011 3:36 pm
by afwollis
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>

Re: [Released] Prof. Invoice and Packingslip

Posted: Sat Feb 05, 2011 5:34 pm
by afwollis
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 6402 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 6402 times


Re: [Released] Prof. Invoice and Packingslip

Posted: Sat Feb 05, 2011 5:39 pm
by afwollis
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

Re: [Released] Prof. Invoice and Packingslip

Posted: Fri Feb 11, 2011 11:13 am
by BlackTube
that works good.

Re: [Released] Prof. Invoice and Packingslip

Posted: Tue Feb 15, 2011 3:44 pm
by megahuman
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?

Re: [Released] Prof. Invoice and Packingslip

Posted: Tue Feb 15, 2011 7:36 pm
by fiona86
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Tue Feb 15, 2011 7:41 pm
by i2Paq
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Tue Feb 15, 2011 8:11 pm
by megahuman
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?

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 16, 2011 6:41 pm
by afwollis
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 6294 times

But if you need some "positioning" within that "line", you will need some more markup-changes within template...

Re: [Released] Prof. Invoice and Packingslip

Posted: Fri Feb 18, 2011 1:31 am
by affordable
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

Re: [Released] Prof. Invoice and Packingslip

Posted: Fri Feb 18, 2011 1:50 am
by i2Paq
Looks like you modified the wrong file, no need for editing the: admin/model/sale/order.php

Re: [Released] Prof. Invoice and Packingslip

Posted: Fri Feb 18, 2011 11:04 pm
by kornovec
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.

Re: [Released] Prof. Invoice and Packingslip

Posted: Wed Feb 23, 2011 1:42 am
by afwollis
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 } ?>

Re: [Released] Prof. Invoice and Packingslip

Posted: Sun Feb 27, 2011 1:23 pm
by rocketero
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.