X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   PO Numbers on Invoices, Searchable in Orders. (https://forum.x-cart.com/showthread.php?t=31653)

Berto 03-02-2009 03:23 PM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Quote:

Originally Posted by GreatLakesVacuum
Nevermind, I screwed up a step, it works fine!


WHEW! :-)

adriant 08-26-2009 11:07 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Quote:

Originally Posted by GreatLakesVacuum
Nevermind, I screwed up a step, it works fine!


Hi....... about to try this on 4.2..... should the routine in #6 be used on this version?

All the best

Berto 08-26-2009 12:07 PM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Quote:

Originally Posted by adriant
Hi....... about to try this on 4.2..... should the routine in #6 be used on this version?

All the best



Most likely it should. This code works on 4.17; if 4.2 doesn't use the variable $query_data on order.php, you may have to modify yours to find out the right array to add the po number to.

(We had no luck migrating the whole store to 4.2, so we're sticking to 4.17 for now.)

adriant 08-27-2009 01:30 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Hi Russell

can confirm that this does work on 4.2.2 with the routine from #6

best regards
Adrian

hues 09-08-2010 04:07 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Works great. Except a small problem. PO Number field appears on every invoice whether the payment method is Purchase order or any other. Need to show the field on invoice, only if payment method is Purchase Order.

exsecror 09-08-2010 04:50 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
customer/main/order_message.tpl
Code:

{if $order.order.payment_method eq "Purchase Order"}{$order.order.po_number}{/if}

mail/html/order_invoice.tpl (used in Print Invoice on Admin)
Code:

{if $order.payment_method eq "Purchase Order"}{$order.po_number}{/if}

That should give you a general idea of what to do.

hues 09-08-2010 05:21 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Thanks.

I changed mail/html/order_invoice.tpl ,

Code:

<b>{$lng.lbl_po_number}:</b> {$order.po_number}<br />
to
Code:

{if $order.payment_method eq "Purchase Order"}
<b>{$lng.lbl_po_number}:</b> {$order.po_number}<br />
{/if}


But this does not display PO Number field even if the payment method is Purchase Order. I don't know what is wrong.

hues 09-08-2010 05:25 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Never Mind, It is working now. Thanks for your help.

exsecror 09-08-2010 06:04 AM

Re: PO Numbers on Invoices, Searchable in Orders.
 
anytime

vllo 10-07-2010 07:59 PM

Re: PO Numbers on Invoices, Searchable in Orders.
 
Quote:

Originally Posted by hues
Never Mind, It is working now. Thanks for your help.


Hues, did you have to do anything special to get the po_number field to appear?

I don't see the variable anywhere in the debug console on the invoice page, and when I view the order, the PO number, company, etc. are all in just big text blob. I've tried variations on {$order.po_number}, without success.

Is there some setting to allow this to function as you'd expect? 4.3.2 doesn't seem to like it.


All times are GMT -8. The time now is 04:20 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.