[ic] Help with Creating Pre-Defined Order Numbers

Mike Heins mheins@redhat.com
Mon, 26 Feb 2001 16:53:55 -0500


Quoting Mike Heins (mikeh@minivend.com):
> Quoting jeffrey.pui@bidorbuy.com (jeffrey.pui@bidorbuy.com):
> > 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.
> 

Thanks for the example to use in the upcoming SOAP documentation:

  Integrated client tag
    You can make SOAP RPC calls to other servers. That includes other
    catalogs on the same Interchange server, of course!

	[calc]
	my $next_order = q{[soap
			    uri="http://localhost/Vend/SOAP"
			    proxy="http://localhost:7780/other_cat"
			    call="counter"
			    file="etc/order.number"
			]};
	if(! $next_order) {
	    # Alternatively you could die if this was in an order profile
	    Log("Failed to get order number from SOAP! Using temporary number");
	    $next_order = q{[counter file=emergency.number]};
	}
	$Session->{mv_order_number} = $next_order;
	return;
	[/calc]

8-)

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

Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun