Re: Pricing based on quantity

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26277
interpreted = N
texte = On 1/20/00 3:05 AM, Jimi Sweet wrote:>Can someone please help me with the following formula? > >In my products database, I set up [price_1], [price_2]...[price_8] for each >of the products. > >The pricing of the product is determined by the total number of items in the >shopping cart. It does not matter how many of each item, just the total >number in the entire cart. (This store is for videos, where each of the >products cost the same amount, but the more you buy, the less they cost per >piece). > >In the formulas database, I want to set it up so that once it figures out >the number of items, it picks the correct price. > >For instance, if there are three items in the basket, then the price per >item is [price_3]. If there are four items, the price is [price_4]. > >How should this formula be set up?I would look at it from the subtotal and give back a discount the discountlets say each video cost 20.00 each then you could develop a discounting scheme, by which you give back so much at the end. If I buy one its 20.00, but if I buy 2 then the price is 20.00 per each plus a 1.00 discount. That makes the videos 19.50 each. if I buy 5 thats a 100.00. with a $12.00 discount. You would be able to calculate the discount rate fairly easily just by the quantity of items. In the shoppingcart the user would see the discount applied, but it would not actually become part of the actually shoppingcart until they selected purchase then you would add the discount as a lineitem to the shoppingcart That way if you user selected 5 videos of the same item at the last minute you wouldn't have to do any fancy reformulating the discount would be applied based on the total items submitted at the purchase time.so on my shoppingcart page I would have:Title Qty Price Ext How to WebDNA on a Mac 1 $20.00 $20.00 How to avoid Poison Ivy 2 $20.00 $40.00Subtotal $60.00 Discount $ 3.00 Your Total $57.00Your math formula for the discount could be an actual mathmatical equation using showif and or math etc. or a lookup in a db ie [lookup db=discount.db&lookinfield=ttl&value=[qtytotal]&returnfield=discount¬fou nd=35.00] Now if I reach any number higher than say 10 I only get the 10 qty discount, because when it goes to lookup 11 it will not find it and return a discount of $35.00.Here is my discount.db filettl discount 1 0.00 2 1.00 3 3.00 4 6.00 5 12.00 6 15.00 7 20.00 8 25.00 9 30.00 10 35.00 Robert Minor___________________________________________________________________________CyberMill Communications voice 314-962-4024 8616 Joseph Ave http://www.cybermill.com/ St. Louis, MO 63144 email: webmaster@cybermill.com ___________________________________________________________________________Purveyors of fine Websites and Webhosting services.------------------------------------------------------------- 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: Pricing based on quantity (Conrad Hubbard 2000)
  2. Re: Pricing based on quantity (Jimi Sweet 2000)
  3. Re: Pricing based on quantity (Bob Minor 2000)
  4. Re: Pricing based on quantity (Jimi Sweet 2000)
  5. Re: Pricing based on quantity (Brian Boegershausen 2000)
  6. Pricing based on quantity (Jimi Sweet 2000)
On 1/20/00 3:05 AM, Jimi Sweet wrote:>Can someone please help me with the following formula? > >In my products database, I set up [price_1], [price_2]...[price_8] for each >of the products. > >The pricing of the product is determined by the total number of items in the >shopping cart. It does not matter how many of each item, just the total >number in the entire cart. (This store is for videos, where each of the >products cost the same amount, but the more you buy, the less they cost per >piece). > >In the formulas database, I want to set it up so that once it figures out >the number of items, it picks the correct price. > >For instance, if there are three items in the basket, then the price per >item is [price_3]. If there are four items, the price is [price_4]. > >How should this formula be set up?I would look at it from the subtotal and give back a discount the discountlets say each video cost 20.00 each then you could develop a discounting scheme, by which you give back so much at the end. If I buy one its 20.00, but if I buy 2 then the price is 20.00 per each plus a 1.00 discount. That makes the videos 19.50 each. if I buy 5 thats a 100.00. with a $12.00 discount. You would be able to calculate the discount rate fairly easily just by the quantity of items. In the shoppingcart the user would see the discount applied, but it would not actually become part of the actually shoppingcart until they selected purchase then you would add the discount as a lineitem to the shoppingcart That way if you user selected 5 videos of the same item at the last minute you wouldn't have to do any fancy reformulating the discount would be applied based on the total items submitted at the purchase time.so on my shoppingcart page I would have:Title Qty Price Ext How to WebDNA on a Mac 1 $20.00 $20.00 How to avoid Poison Ivy 2 $20.00 $40.00Subtotal $60.00 Discount $ 3.00 Your Total $57.00Your math formula for the discount could be an actual mathmatical equation using showif and or math etc. or a lookup in a db ie [lookup db=discount.db&lookinfield=ttl&value=[qtytotal]&returnfield=discount¬fou nd=35.00] Now if I reach any number higher than say 10 I only get the 10 qty discount, because when it goes to lookup 11 it will not find it and return a discount of $35.00.Here is my discount.db filettl discount 1 0.00 2 1.00 3 3.00 4 6.00 5 12.00 6 15.00 7 20.00 8 25.00 9 30.00 10 35.00 Robert Minor___________________________________________________________________________CyberMill Communications voice 314-962-4024 8616 Joseph Ave http://www.cybermill.com/ St. Louis, MO 63144 email: webmaster@cybermill.com ___________________________________________________________________________Purveyors of fine Websites and Webhosting services.------------------------------------------------------------- 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 Bob Minor

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:

Speed/performance issues using .hdr (1997) Error Log.db --however (1997) unsubscribe (2000) Get current URL with Variables (2005) Showif, Hideif reverse logic ? (1997) Quickie question on the email templates (1997) FTP FOLDER PERMISSIONS (2004) PSC recommends what date format yr 2000??? (1997) Removing [showif] makes a big difference in speed (1997) OS X permissions to write to Globals directory (2003) OLD PROBLEM (1997) ShowNext truncating passed variable?? (1997) code to phantom spacing (2001) random .inc files pulled and placed (2002) [subtotal] and others (1997) Re2: AAgghh!! Help, please. SSL strikes again. (1997) search form problem.. (1997) RE: OK, here goes... (1997) WCS Newbie question (1997) Webmerchant -> MacAuthorize ... please retry ? (1997)