Re: Shipping.db
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16134
interpreted = N
texte = >Ok, I have a project where I can't use my favorite showifs to figure>shipping, but must instead use the shipping table below. I understand how to>do lookups, that's not a problem, but what I don't understand is how to do a>case function to figure out which price range the subtotal falls into. >Please help me--->>Merchandise Regular Rush Express >Subtotals Delivery Delivery Delivery>Up to>$15.00............$3.90.......$8.90......$16.90>$15.01-$30.00.....$5.25......$10.25......$17.90>$30.01-$45.00.....$6.90......$11.90......$19.25Here's some people have done it:Rather than doing lookups, you can use [Search] to find the ranges. Perform a search that finds all the MerchandiseSubtotals in this table which are Less Than your order subtotal, and sort the results in descending order. You'll end up with a list which always has the record you're interested in at the top, so further setting max=1 will cause the list to *only* return the one record you want. At that point, [RegularDelivery] is the value you need for the shipping cost (or Rush or Express, depending...).Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>Ok, I have a project where I can't use my favorite showifs to figure>shipping, but must instead use the shipping table below. I understand how to>do lookups, that's not a problem, but what I don't understand is how to do a>case function to figure out which price range the subtotal falls into. >Please help me--->>Merchandise Regular Rush Express >Subtotals Delivery Delivery Delivery>Up to>$15.00............$3.90.......$8.90......$16.90>$15.01-$30.00.....$5.25......$10.25......$17.90>$30.01-$45.00.....$6.90......$11.90......$19.25Here's some people have done it:Rather than doing lookups, you can use
[search] to find the ranges. Perform a search that finds all the MerchandiseSubtotals in this table which are Less Than your order subtotal, and sort the results in descending order. You'll end up with a list which always has the record you're interested in at the top, so further setting max=1 will cause the list to *only* return the one record you want. At that point, [RegularDelivery] is the value you need for the shipping cost (or Rush or Express, depending...).Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Grant Hulbert
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:
Banners (1997)
A sendmail warning (2005)
Major problem (1999)
WebCatalog Use Question (1997)
[WebDNA] unused database fields. . . . (2014)
authnet good news (2003)
[/application] error? (1997)
(1997)
Associative lookup style? (1997)
Counting records (2000)
[Price] (1997)
Migrating to NT (1997)
WebCatalog for guestbook ? (1997)
OT: javascript help (2003)
multi-paragraph fields (1997)
all records returned. (1997)
EIMS Problems (1997)
Searchable WebCat (etc.) Docs ? (1997)
Duplicate Messages (1998)
Carrying Forward (1998)