Re: Disconts

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55293
interpreted = N
texte = I would add a product called "discount" to the database with a price of 0. Then, at the top of your invoice page (the page where the user hits submit to pay for the item), have code that calculates the discount. For intstance, if the discount is only enacted if the user has purchased 100 or more, then you would do something like: [orderfile cart=[cart]] [lineitems] [showif [SKU]=discount] [removelineitem cart=[cart]&index=[lineindex]] [/showif] [/lineitems] [showif [grandtotal]>99.99] [text]disc=[math][subtotal]*.1[/math][/text] [/showif] [/orderfile] Then add the product. [addlineitem cart=[cart]&SKU=discount]price=-[disc]&password=[/addlineitem] (you can do this in the formulas.db instead of here to) The trick is that you will want to delete this lineitem on every page before the submit page and including the submit page (before the code). This is so they don't get lots of discounts. WebDNA is capable of complex discounting schemes. HTH, Donovan Erol Guneri wrote: > Hi, > > Is there any way that you can discount a cart? > > What I am trying to do is list all the items, then have a discount line > which is then taken away from the subtotal and grandtotal. I want it to > look something like: > > > Product Price > Product1 £10 > Product2 £10 > Discount (10%) £2 > SubTotal £18 > Tax £0.30 > GrandTotal £18.30 > > > Erol -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Disconts ( John Peacock 2004)
  2. Re: Disconts ( Donovan Brooke 2004)
  3. Re: Disconts ( Donovan Brooke 2004)
  4. Re: Disconts ( "Erol Guneri" 2004)
  5. Re: Disconts ( Jesse Proudman 2004)
  6. Disconts ( "Erol Guneri" 2004)
I would add a product called "discount" to the database with a price of 0. Then, at the top of your invoice page (the page where the user hits submit to pay for the item), have code that calculates the discount. For intstance, if the discount is only enacted if the user has purchased 100 or more, then you would do something like: [orderfile cart=[cart]] [lineitems] [showif [SKU]=discount] [removelineitem cart=[cart]&index=[lineindex]] [/showif] [/lineitems] [showif [grandtotal]>99.99] [text]disc=[math][subtotal]*.1[/math][/text] [/showif] [/orderfile] Then add the product. [addlineitem cart=[cart]&SKU=discount]price=-[disc]&password=[/addlineitem] (you can do this in the formulas.db instead of here to) The trick is that you will want to delete this lineitem on every page before the submit page and including the submit page (before the code). This is so they don't get lots of discounts. WebDNA is capable of complex discounting schemes. HTH, Donovan Erol Guneri wrote: > Hi, > > Is there any way that you can discount a cart? > > What I am trying to do is list all the items, then have a discount line > which is then taken away from the subtotal and grandtotal. I want it to > look something like: > > > Product Price > Product1 £10 > Product2 £10 > Discount (10%) £2 > SubTotal £18 > Tax £0.30 > GrandTotal £18.30 > > > Erol -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Donovan Brooke

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] Which EC2 instance? (2008) trouble updating records in database (1998) So what ya working on? (or have you completed?) (2004) Help!!!! (1997) creating an email message (1998) Feature Request (2003) Date search - yes or no (1997) HELP WITH DATES (1997) SiteGuard Admin Feature ? (1997) Disappearing HTML/WebDNA (1998) [WebDNA] An unknown error occured // Deadlock avoided (2011) Email notification to one of multiple vendors ? (1997) customizing the color of user's pages (1997) Multiple Ad databases? (1997) OT: RAID Options (2004) This Code Kills My WebCatalog Dead (2003) [Sum] function? (1997) WebCommerce: Folder organization ? (1997) Shipping charges (1998) Almost a there but..bye bye NetCloak (1997)