[ic] UserTag to return correct price for a given quantity using new pricing table

Jose Ma Revuelto interchange-users@interchange.redhat.com
Fri Apr 26 05:40:02 2002


Hi Ron,

This seems very cool, but could you explained how to make it works for the
newbies like me? I mean:

 I have created the qty_pricing.mysql, the qty-pricing table and the
lookup-qty-pricing.tag, but now:

 - Do I have to use the tag in any page or just do I need to add the
CommonAdjust Directive to catalog.cfg?
 - Do I need to do anything else to make it work?
 - Do I have to fill the table and how must I do it (manually...)?

I know that this is maybe very basic, but I don?t know how to start with it.

Thanks in advance,

Jose Ma

> -----Mensaje original-----
> De: interchange-users-admin@interchange.redhat.com
> [mailto:interchange-users-admin@interchange.redhat.com]En nombre de Ron
> Phipps
> Enviado el: viernes, 19 de abril de 2002 11:05
> Para: interchange-users@interchange.redhat.com
> Asunto: [ic] UserTag to return correct price for a given quantity using
> new pricing table
>
>
> Thanks to Kevin Walsh for the kick in the butt to do this solution the
> correct way and to everyone that submitted examples of how to use a
> query from within a UserTag.  This solution is a better way to solve the
> problem then the hack I was putting together.
>
> What it does:
> This tag will return the correct price for an item based on the quantity
> being ordered.  If the quantity being ordered falls between two break
> points then the last break point exceeded will be used.  This tag can be
> added to a CommonAdjust string and chained together with other lookup
> methods to come to a final price.  The tag is called with one parameter,
> the name of the pricing table and it returns a single number.  If no
> quantity pricing is found, 0 is returned, so the CommonAdjust string
> will move on to the next settor.
>
>
> Example call in CommonAdjust:
>
> CommonAdjust   "[lookup-qty-pricing table='qty_pricing']", ;:sale_price,
> ;:price, ==:options
>

>