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:
The code, one more time. (2003)
Tab Charactor (1997)
vs (1997)
default value from Lookup (was Grant, please help me) (1997)
default image if image in code not available (2003)
WebCat2 - many [carts] on one template page? (1997)
well... (1997)
Friday night shopping site joke (1997)
Separate SSL Server (1997)
Beta 18 (1997)
Need help with emailer- 2 issues (1997)
CommandSecurity? (1997)
Robert Minor duplicate mail (1997)
shoppingcart reload qty (1997)
Online reference (1997)
bug in [SendMail] (1997)
[ShowNext] feature in 2.0 (1997)
[WebDNA] Ubuntu 14.04 & WebDNA 8.2 (html not rendering) (2017)
Running _every_ page through WebCat ? (1997)
New Plug-in and Type 11 errors (1997)