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 witha price of 0.Then, at the top of your invoice page (the page where the user hits submit topay for the item), have code that calculates the discount. For intstance, ifthe discount is only enacted if the user has purchased 100 or more, thenyou 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 thesubmit page and including the submit page (before the code). This is so they don'tget lots of discounts.WebDNA is capable of complex discounting schemes.HTH,DonovanErol 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:
I would add a product called "discount" to the database witha price of 0.Then, at the top of your invoice page (the page where the user hits submit topay for the item), have code that calculates the discount. For intstance, ifthe discount is only enacted if the user has purchased 100 or more, thenyou 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 thesubmit page and including the submit page (before the code). This is so they don'tget lots of discounts.WebDNA is capable of complex discounting schemes.HTH,DonovanErol 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:
_ in front of field name (1998)
RequiredFields notes ... (1997)
Review comparison by PC Magazine: Open for On-line Business (1997)
FW: Shipping calculations (1997)
Speaking of mysql... sqlexecute question (2006)
webcat method for waiting specific amount of time? (2000)
Showif, Hideif reverse logic ? (1997)
Generating unique SKU from [cart] - Still Stumped... (1997)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
sendmail logs (1999)
Misc Stuff That Might Help (1997)
Upgrading old WebCat Database Files (1997)
Queertrons? (1997)
Card clearance, problems - solutions? (1997)
Multiple instances of database (2003)
Emailer Problem (1998)
[WebDNA] Triggers issue, or sendmail? (2012)
[include] affect on filepaths for links? (1997)
Redirect and passing more than one variable... (2002)
2.0Beta Command Ref (can't find this instruction) (1997)