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

Ron Phipps interchange-users@interchange.redhat.com
Fri Apr 26 12:31:00 2002


> From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-
> users-admin@interchange.redhat.com] On Behalf Of Jose Ma Revuelto
> 
> 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:

Hi Jose,

You are almost there!

> 
>  - Do I have to use the tag in any page or just do I need to add the
> CommonAdjust Directive to catalog.cfg?

Use the tag in the CommonAdjust string in your catalog.cfg.  I have not
used this tag with different pricing levels like dealers and wholesalers
yet, but this is a viable expansion of the tag/table in the future.

>  - Do I need to do anything else to make it work?

You should not.  The tag tells CommonAdjust how to price the item and
sees it as the first valid entry in the CommonAdjust string.  You may
need to play with the actual CommonAdjust string to verify that your
options are handled correct in conjuction with the UserTag.

>  - Do I have to fill the table and how must I do it (manually...)?

I filled my tables using phpPgAdmin.  You could use a web tool like
this, a command line interface or the table editor in the Admin UI.

> I know that this is maybe very basic, but I don?t know how to start
with
> it.
> 
> Thanks in advance,
> 
> Jose Ma

One more quick thing when you reply to messages on the list make sure
you do not use top quoting, many people on this list will ignore your
questions.  Best of luck!

-Ron

> > -----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
> >
> 
> >
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users