[ic] overriding MaxQuantityField in admin order entry UI - admin/entry.html

Mike Heins mike at perusion.com
Fri Jul 23 15:22:33 EDT 2004


Quoting Jon Jensen (jon at endpoint.com):
> On Fri, 23 Jul 2004, Ed LaFrance (New Media E.M.S.) wrote:
> 
> > >We use the MaxQuantityField configuration setting to prevent ordering more 
> > >than stock. However, for the admin order entry UI, we want to override 
> > >this behavior, (probably add a checkbox to override it conditionally). Is 
> > >there any hidden parameter which can be set to achieve this functionality ?
> > 
> > Try adding this near the top of admin/entry.html:
> > 
> >          [calc]
> >                  $Config->{MaxQuantityField} = '';
> >          [/calc]
> > 
> > 
> > ...I'm not sure if this is sticky from page to page. If it is not, you may 
> > have problems retaining your quantities when submitting the order.
> 
> It's not sticky. (Except unpredictably in older IC versions in PreFork
> mode due to a bug.)
> 
> You could put that code in your admin Autoload 
> ($VENDROOT/lib/UI/pages/admin/.autoload) and then anywhere in the admin 
> should be free of the MaxQuantity restriction. There still may be trouble 
> on process or ui actions, though, come to think of it.
> 

You could do:

GlobalSub <<EOS
sub remove_max_restriction {
	if($Vend::admin) {
	    $Vend::Cfg->{MaxQuantityField} = '';
	}
	return;
}
EOS

Then in catalog.cfg:

	Autoload  remove_max_restriction


-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous


More information about the interchange-users mailing list