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:

Options for http uploading of files (1999) Limiting user access to .tmpl files (1997) carriage returns in data (1997) WC2.0 Memory Requirements (1997) Check Boxes (2000) WebCat2.0 [format thousands .0f] no go (1997) OT: Poll Please (2002) TCP connect, how long does it take (PCS please) (1999) Shipcost lookup? (1997) CMSBuilder (2004) [WebDNA] FastCGI version confusion (2011) Newbie Question about a Logical AND in a show if statement.... (1999) Notepad problems (1998) rename a file (1997) Ok here is a question? (1997) MacAuthorize order data fields WAS:How To question... (1997) WebMerchant issues. [Resent] (2000) emailer setup (1997) updating checkbox in a db (1998) [Listfiles] vs Netfinder (1997)