Re: Can ShowNext do this?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28064
interpreted = N
texte = Hello WebDNA guru's, I've been subscribed to the list for about a year and have appreciated the advice/solutions everyone has given here during that time. My problem:Shipping issue: The merchant will charge a price-based shipping rate on the subtotal of an order except for any items in the shopping cart that are weight-based items. This is determined by if their is a non [blank] in the 'weight' column of the .db. In this case, the non-weight based items would be charged the priced-based rate, and any weight-based items would have that rate added to get the final amount.The price and weight based amounts are found with a [search] to each respective .db.I can get it to hide the price-based charge if there is a weight-based charge, but this will hide _all_ the other priced-based charges that should be applied. The twist also is if the weight is over 200# or if the price is over $101, but I can work that part of it out.I have some ugly code that I inherited that is trying to accomplish this, but I think I'd be better off re-doing the whole section. The code is posted below for those interested, breaks caused by the email.TIA!!!! GK Price based shipping: $[showif [shipsub]>0][hideif [shipsub]>101][showif [shipweight]!0][search db=sub100a.txt&statewrbk=,&wostatedatarq=[shiptostate]&gesubdatarq=[shipsub]&subsdir=as&subsort=1&subtype=num&max=1][founditems][for mat .2f][cost][/format] [math show=f]donald=[cost][/math][/founditems][/search][/hideif][/showif][showif [shipsub]>100][math show=f]donald=([lookup db=100plus.txt&lookinfield=state&value=[shiptostate]&returnfield=rate¬found=.1]*[shipsub])[/math][format .2f][math]donald[/math][/format] [/showif][/showif][showif [shipsub]=0][format .2f]0[/format][math show=f]donald=0[/math][/showif][showif [shipsub]=][format .2f]0[/format][math show=f]donald=0[/math][/showif] Weight based shipping: $[showif [shipweight]!0][showif [shipweight]<200][search db=weight.txt&getweightdatarq=[shipweight]&statewrbk=,&wostatedatarq=[shiptostate]&tweightsdir=as&tweightsort=1&tweighttype=num&max= 1][founditems][format .2f][cost][/format] [math show=f]drew=[cost][/math][/founditems][/search][/showif][/showif][showif [shipweight]=0][format .2f]0[/format][math show=f]drew=0[/math][/showif][showif [shipweight]=[blank]][format .2f]0[/format][math show=f]drew=0[/math][/showif] ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Can ShowNext do this? (Gary Krockover 2000)
  2. Re: Can ShowNext do this? (Gary Krockover 2000)
  3. Re: Can ShowNext do this? SOLVED (Clint Davis 2000)
  4. Re: Can ShowNext do this? (Clint Davis 2000)
  5. Re: Can ShowNext do this? (Mike Davis 2000)
  6. Re: Can ShowNext do this? (Clint Davis 2000)
  7. Can ShowNext do this? (Clint Davis 2000)
Hello WebDNA guru's, I've been subscribed to the list for about a year and have appreciated the advice/solutions everyone has given here during that time. My problem:Shipping issue: The merchant will charge a price-based shipping rate on the subtotal of an order except for any items in the shopping cart that are weight-based items. This is determined by if their is a non [blank] in the 'weight' column of the .db. In this case, the non-weight based items would be charged the priced-based rate, and any weight-based items would have that rate added to get the final amount.The price and weight based amounts are found with a [search] to each respective .db.I can get it to hide the price-based charge if there is a weight-based charge, but this will hide _all_ the other priced-based charges that should be applied. The twist also is if the weight is over 200# or if the price is over $101, but I can work that part of it out.I have some ugly code that I inherited that is trying to accomplish this, but I think I'd be better off re-doing the whole section. The code is posted below for those interested, breaks caused by the email.TIA!!!! GK Price based shipping: $[showif [shipsub]>0][hideif [shipsub]>101][showif [shipweight]!0][search db=sub100a.txt&statewrbk=,&wostatedatarq=[shiptostate]&gesubdatarq=[shipsub]&subsdir=as&subsort=1&subtype=num&max=1][founditems][for mat .2f][cost][/format] [math show=f]donald=[cost][/math][/founditems][/search][/hideif][/showif][showif [shipsub]>100][math show=f]donald=([lookup db=100plus.txt&lookinfield=state&value=[shiptostate]&returnfield=rate¬found=.1]*[shipsub])[/math][format .2f][math]donald[/math][/format] [math]donald[/math]>[/showif][/showif][showif [shipsub]=0][format .2f]0[/format][math show=f]donald=0[/math][/showif][showif [shipsub]=][format .2f]0[/format][math show=f]donald=0[/math][/showif] Weight based shipping: $[showif [shipweight]!0][showif [shipweight]<200][search db=weight.txt&getweightdatarq=[shipweight]&statewrbk=,&wostatedatarq=[shiptostate]&tweightsdir=as&tweightsort=1&tweighttype=num&max= 1][founditems][format .2f][cost][/format] [math show=f]drew=[cost][/math][/founditems][/search][/showif][/showif][showif [shipweight]=0][format .2f]0[/format][math show=f]drew=0[/math][/showif][showif [shipweight]=[blank]][format .2f]0[/format][math show=f]drew=0[/math][/showif] ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Gary Krockover

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:

path hierarchy notation (1998) Re:Merging databases (1997) For Sale: WebTen 2.x and WebCat 2.x (2000) pretty Urgent: Crash after addlineitem (2001) I give up!! (1997) creator code (1997) Separate SSL Server (1997) Multiple products Multiple price (2000) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Ampersand (1997) Database Upload (2000) BBEdit and WebCatalog 2.0? (1997) General WebCatalog Questions (1997) Error: the 'showcart' command requires that you specify a db (1997) Using Plug-In while running 1.6.1 (1997) where to put code (1998) convertWords... NEW (2001) WebTen? (1997) SiteEdit Pro Update Announcement (1997) Help- Linux Install Serial number not taling. (2000)