Re: Shipping costs question - update

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 44788
interpreted = N
texte = Oops, forgot about quantity!Used this line instead: [math show=f]sc=[sc]+([quantity]*[price])[/math]on 4/11/02 10:37 am, Mark Derrick at mark.derrick@computerwarehouse.co.uk wrote:> Thanks for that, this is what I came up with: > (We simply added a suffix to the sku to signify a no shipping charge item) > > Line breaks added for clarity. > > ShipCost > > [math show=f]sc=0[/math] > > [lineItems] > [showif [sku]^ESD] * [math show=f]sc=[sc]+[price][/math][/showif] > [/lineItems] > > [math show=f]sct=[subtotal]-[sc][/math] > > [if [sct]=0][then]0[/then] > [else] > [showif [sct]>100.00]5.95[/showif] > [showif [sct]<100.00]2.95[/showif] > [showif [sct]=100.00]2.95[/showif] > [/else] > [/if]] > > Seemed like the easiest and quickest way to do it, although I'm always happy > to find a shorter way! :-) > > > Mark. > > on 1/11/02 6:47 pm, Donovan Brooke at donovan@ns1.ddbproductions.org wrote: > >> Mark, you will want to go through the lineitems to see if that >> SKU is the cart. If it is you will want to subtract the price from >> the [subtotal] and set that to a var. Then you can do your >> code below only using the var instead of [subtotal] >> >> Donovan >> >> P.S. >> A note, if you are going to have this as a promotion on different >> products you could as easily put a field shippingcharge with >> a value of yes or no or T or F and then query the products.db >> for each item in the cart before shipping is calculated. >> >> >> >> Mark Derrick wrote: >> >>> Here's the scenario, >>> We currently use the following in our formulas.db: >>> shipCost [showif [subtotal]>100.00]5.95[/showif] [showif >>> [subtotal]<100.00]2.95[/showif] [showif [subtotal]=100.00]2.95[/showif] >>> >>> But we now need to be able to sell a product for which there's a zero >>> shipping charge. Which means that if this product is the only item in the >>> cart, then the shipcost needs to be 0. >>> >>> Is there an easy way to achieve this? >>> >>> Thanks. >>> >> ------------------------------------------------------------- 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: Shipping costs question - update (Mark Derrick 2002)
Oops, forgot about quantity!Used this line instead: [math show=f]sc=[sc]+([quantity]*[price])[/math]on 4/11/02 10:37 am, Mark Derrick at mark.derrick@computerwarehouse.co.uk wrote:> Thanks for that, this is what I came up with: > (We simply added a suffix to the sku to signify a no shipping charge item) > > Line breaks added for clarity. > > ShipCost > > [math show=f]sc=0[/math] > > [lineitems] > [showif [sku]^ESD] * [math show=f]sc=[sc]+[price][/math][/showif] > [/lineItems] > > [math show=f]sct=[subtotal]-[sc][/math] > > [if [sct]=0][then]0[/then] > [else] > [showif [sct]>100.00]5.95[/showif] > [showif [sct]<100.00]2.95[/showif] > [showif [sct]=100.00]2.95[/showif] > [/else] > [/if]] > > Seemed like the easiest and quickest way to do it, although I'm always happy > to find a shorter way! :-) > > > Mark. > > on 1/11/02 6:47 pm, Donovan Brooke at donovan@ns1.ddbproductions.org wrote: > >> Mark, you will want to go through the lineitems to see if that >> SKU is the cart. If it is you will want to subtract the price from >> the [subtotal] and set that to a var. Then you can do your >> code below only using the var instead of [subtotal] >> >> Donovan >> >> P.S. >> A note, if you are going to have this as a promotion on different >> products you could as easily put a field shippingcharge with >> a value of yes or no or T or F and then query the products.db >> for each item in the cart before shipping is calculated. >> >> >> >> Mark Derrick wrote: >> >>> Here's the scenario, >>> We currently use the following in our formulas.db: >>> shipCost [showif [subtotal]>100.00]5.95[/showif] [showif >>> [subtotal]<100.00]2.95[/showif] [showif [subtotal]=100.00]2.95[/showif] >>> >>> But we now need to be able to sell a product for which there's a zero >>> shipping charge. Which means that if this product is the only item in the >>> cart, then the shipcost needs to be 0. >>> >>> Is there an easy way to achieve this? >>> >>> Thanks. >>> >> ------------------------------------------------------------- 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/ Mark Derrick

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:

convertchars and case? (1998) RE: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997) Firewalls - What's Good? (1999) Problem decrypting encrypted data on different machine (2000) MacAuthorize hub, no modal password dialog? (1997) [OT] html background att (2003) target=_blank and form variables (1997) set header in DB (no cart) (2003) Copyright ? (1997) WebDNA Solutions ... sorry! (1997) HELP WITH DATES (1997) PCS Frames (1997) [WebDNA] isolatin-1 to utf-8 conversion (2013) PCS Frames (1997) [WebDNA] Needing Open Source Support (2012) docs for WebCatalog2 (1997) InSecureTextVariables.... (2000) So many lookers, hey smith micro (2003) How to get shownext to just shownext once (1997) Disconts (2004)