Need help, multiple shipping options

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28068
interpreted = N
texte = Sorry that this is a repost, I forgot to change the subject on the 1st message-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. Need help, multiple shipping options (Gary Krockover 2000)
  2. Need help, multiple shipping options (Gary Krockover 2000)
Sorry that this is a repost, I forgot to change the subject on the 1st message-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:

Setting up shop (1997) Separate SSL Server (1997) more on quicktime test stuff (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) RE: 2nd WebCatalog2 Feature Request (1996) randomness (1997) [WebDNA] Feature Request (2013) WebCatalog for Mac 2.0.1 Released (1997) The beginning (1997) A dynamic database. (1997) Buying sans cart (1997) Variable Math (1998) Test (2001) Webstar 1.3.1 PPC (1997) RE: combining strings (1997) Search results templates (1996) all records returned. (1997) WebCat2b13MacPlugIn - [include] (1997) Which GUI HTML editors work with WC ? (1997) protect tag on NT IIS (1997)