Re: Unit Cost Look Up

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37180
interpreted = N
texte = Stephen Russo wrote: > > I have three choices for shipping: > > UPS Ground > UPS 2Day > UPS Next Day > > My products all contain an unitshipcost. Those Items that have a 10 in > unitshipcost can only be sent via UPS Ground. I want to be able to check if > one of the items in the users cart has a 10 in the unitshipcost then they > only have the option of UPS Ground. I did the following and it works except > if they add another item to the cart that does not have a 10 in > unitshipcost. > What you are doing is not going to work for you, because you are testing a single number versus a potentially multivalued field. Say you have two line items with unitshipcost of 10 and 5, then [lineitems][unitshipcost][/lineitems]will be literally 105so that is not what you want.I would recommend that you loop through each of the ShoppingCart lines and limit __shipvia if you find any that are Ground only. Like this (not tested):...top of page...[text]Ground_Only=[/text] [lineitems] [if [unitshipcost]=10] [text]Ground_Only=T [/if] [/lineitems]...later... Shipping Method: -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Unit Cost Look Up (John Peacock 2001)
  2. Re: Unit Cost Look Up (Christer Olsson 2001)
  3. Unit Cost Look Up (Stephen Russo 2001)
Stephen Russo wrote: > > I have three choices for shipping: > > UPS Ground > UPS 2Day > UPS Next Day > > My products all contain an unitshipcost. Those Items that have a 10 in > unitshipcost can only be sent via UPS Ground. I want to be able to check if > one of the items in the users cart has a 10 in the unitshipcost then they > only have the option of UPS Ground. I did the following and it works except > if they add another item to the cart that does not have a 10 in > unitshipcost. > What you are doing is not going to work for you, because you are testing a single number versus a potentially multivalued field. Say you have two line items with unitshipcost of 10 and 5, then [lineitems][unitshipcost][/lineitems]will be literally 105so that is not what you want.I would recommend that you loop through each of the ShoppingCart lines and limit __shipvia if you find any that are Ground only. Like this (not tested):...top of page...[text]Ground_Only=[/text] [lineitems] [if [unitshipcost]=10] [text]Ground_Only=T [/if] [/lineitems]...later... Shipping Method: -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WC2.0 Memory Requirements (1997) Ken's Data Manager (finally available I think ...) (2005) # fields limited? (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Setting up shop (1997) [WebDNA] can webdna set the email header (w/[sendmail]) that controls where bounced email goes? (2012) Associative lookup style? + bit more (1997) [WebDNA] [OT] WebDNA Payment Processing Integration (2011) How long until WebDNA makes the list? :( (2004) [WebDNA] decrypt appears to be hosed (2008) [ShowIf] if the varieable exists (1998) Problems setting MIME Headers (1998) off topic - dna snipets (1997) Cant get my own subtotal (2001) Need WebDNA that crashes server for testing (2000) WebCat2b15MacPlugin - showing [math] (1997) TCPConnect / Current Temperature (2004) Is this possible in simple search? question? (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Searching multiple fields (1997)