Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

PO Numbers on Invoices, Searchable in Orders.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 04-05-2011, 04:56 AM
 
migol3 migol3 is offline
 

Member
  
Join Date: Oct 2006
Posts: 25
 

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

I just added this hack to order_invoice.tpl. It displays the PO number by using regex in the smarty template to remove everything after the first line break in $order.details.

{if $order.payment_method eq "Purchase Order"}{$order.details|regex_replace:"/[\n].*/":""}{/if}
__________________
X-Cart Gold 4.6.3
Reply With Quote
  #22  
Old 02-22-2012, 07:04 PM
 
notgrass notgrass is offline
 

Advanced Member
  
Join Date: Dec 2011
Location: Tennessee
Posts: 33
 

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

I finally got this mod to work on v4.4.4. It was not working when the po_number field in the database was set to VARCHAR. But when I changed it to text, it worked. Weird!

But thank you, Russell, for the great modification!
__________________
X-Cart v4.6.5
www.notgrass.com/notgrass/
Reply With Quote
  #23  
Old 05-08-2012, 11:50 AM
 
kcmastrpc kcmastrpc is offline
 

Newbie
  
Join Date: Apr 2012
Posts: 1
 

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

Having an issue with getting this to work.

I can insert a table entry for po_number manually, and it'll show up just fine in searches, etc. but as soon as I go to create a new order through xcart I get an error.

Warning
403
Access denied !

You are not allowed to access that resource!

Id: 79

This error no longer occurs if I remove:

'po_number' => addslashes(getPONum($order_details)),

from func.order.php

I've tried changing the dbtype to text from varchar, but that didn't help.
__________________
4.4.5
Reply With Quote
  #24  
Old 08-20-2012, 08:43 PM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

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

Is this working with 4.5.1 ?
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote
  #25  
Old 09-05-2012, 05:30 AM
 
fonefun fonefun is offline
 

Member
  
Join Date: May 2008
Posts: 10
 

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

will this mode work on 4.5.2?
__________________
4.1.11


www.fonefunshop.biz
Reply With Quote
  #26  
Old 09-05-2012, 11:34 AM
 
Berto Berto is offline
 

Member
  
Join Date: Mar 2007
Posts: 19
 

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

Quote:
Originally Posted by fonefun
will this mode work on 4.5.2?

Hasn't been tested higher than 4.4.x (see notgrass' post above) but you could be the first!
__________________
Russell
X-cart Version 4.1.9 [linux]
Reply With Quote
  #27  
Old 12-30-2012, 02:30 PM
 
keninfortmyers keninfortmyers is offline
 

Newbie
  
Join Date: Feb 2011
Posts: 3
 

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

This mod works great in 4.5.4 I'm using it
__________________
version 4.5.4
Reply With Quote
  #28  
Old 03-31-2014, 12:04 PM
 
bitNine bitNine is offline
 

Newbie
  
Join Date: Mar 2014
Posts: 8
 

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

Quote:
Originally Posted by kcmastrpc
Having an issue with getting this to work.

I can insert a table entry for po_number manually, and it'll show up just fine in searches, etc. but as soon as I go to create a new order through xcart I get an error.

Warning
403
Access denied !

You are not allowed to access that resource!

Id: 79

This error no longer occurs if I remove:

'po_number' => addslashes(getPONum($order_details)),

from func.order.php

I've tried changing the dbtype to text from varchar, but that didn't help.

I hate bumping old threads, but I ran across this thread while trying to determine the reason for an almost identical error while modifying a module, and wanted to provide my solution.

Clear the x-cart cache. It's that easy. I made a change to code that involves inserting data into a modified db table using the array2insert function built into x-cart. Apparently x-cart caches information about that table, and would throw this error when I'd provide 2 extra columns in the array. Clearing the cache solved it.
__________________
X-Cart 4.6
X-Banners MOdule
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:28 AM.

   

 
X-Cart forums © 2001-2020