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:
sendmail for email (was Netforms) (1998)
Text limits in NT version? (1997)
Re: (1997)
Lookup Notfound (1998)
SV: Mass Mail (2000)
Help!!!! Purchases not going through! FIXED! (1997)
[WriteFile] problems (1997)
AppleScript question (1997)
Some Questions (1997)
Auto entering Friday's date in a field (2002)
Items XX to XX shown (1997)
multi-paragraph fields (1997)
affiliate marketing program (1998)
New Command prefs ... (1997)
[convertchars] (2000)
emailer settings and control questions (1997)
$Append for Users outside the ADMIN group (1997)
[tcp connect] (1998)
off topic - dna snipets (1997)
Cart Numbers (1997)