[ic] Help with Creating Pre-Defined Order Numbers

Mike Heins mikeh@minivend.com
Mon, 26 Feb 2001 15:50:14 -0500


Quoting jeffrey.pui@bidorbuy.com (jeffrey.pui@bidorbuy.com):
> Anyone know how to create predefined Order Numbers without having to use
> the order.number file in /etc dir?

Absolutely. It even used to be documented before the docs restructuring... 8-\

> I've managed to hack the Order.pm file and divert the mv_order_number
> into my custom number, but I'm quite sure the order.number is used
> widely elsewhere.

It is not used at all to determine anything, other than to create
key values for database inserts. In other words, nothing in the core
code depends on it. All uses (in the demos) are in etc/log_transaction,
etc/receipt.html, and etc/report.

> Is it possible to change the read only
> 'mv_order_number' without having changing the .pm modules?  
>

All you have to do is use the order routing function, and sometime before
the first route kicks off do:

	[perl]
		$Session->{mv_order_number} = &your_function;
	[/perl]

For instance, you might use a sequence from a database or another
counter function via UserTag.

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown