Re: Can ShowNext do this?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28063
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:

[WebDNA] OS and version (2019) CT Scan might have saved my life!! (2006) Mail Server Needed. (1998) TeaRoom (2000) Integration? (1999) weird G3 happenings (1998) Errata: WCS Newbie question (1997) A little syntax help (1997) Re:no [search] with NT (1997) carriage returns in data (1997) Need help with emailer- 2 issues (1997) WebCatalog can't find database (1997) multi-paragraph fields (1997) Cyberstudio and WebDNA (1997) View Source from cache (1997) Reversing [ipaddress] normalization (1998) Bug or syntax error on my part? (1997) WebCatalog for guestbook ? (1997) emailer cc to figured out (1997) WebCatalog 4.0.2b5 available (2000)