Re: Price Change
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 35626
interpreted = N
texte = Figure out what your discount total is and add it to the cart as a negativelineitem. This will require that you have a product in your productdatabase for the discount.1) Add a product to your database for the discount, the price will notmatter we will set it later2) In your template figure out what the discount amount will be3) Add the discount sku to the cart with a negative price, you will need touse the price change password to set the price[addlineitem cart=[cart]&sku=your discount sku]price=discountamount&password=your price change password[/addlineitem]-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Stephen RussoSent: Wednesday, August 02, 2000 5:40 PMTo: WebCatalog TalkSubject: Re: Price ChangeGlenn,That works fine.But when I go to change subtotal to the new discounted price it does notchange. That is my main problem, changing subtotal to the new price.Stephen-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Glenn BusbinSent: Wednesday, August 02, 2000 8:46 AMTo: WebCatalog TalkSubject: Re: Price ChangeThere's more than one way to skin a cat using WC. The database approach Isuggested (late at night after a long day) is one, but since your discountsare so simple, you can also just sum the costs of the items in the cart anduse some [showif] [hideif] stuff.Sum the costs of the items BEFORE getting to [subtotal]. Then evaluate thetemporarysubtotal to see if a discount should be given. If so, add anegative number to the cart that will deduct the appropriate amount.Try something along the order of:[showif [temporarysubtotal]>299] [hideif [temporarysubtotal]>499][Discount]=-50[/hideif][/showif][showif [temporarysubtotal]>499] [Discount]=-55[/showif]In the html for the page, add a line that will display whatever discount isgiven or hide it if there isn't one.[showif [Discount]>0]
Discount= | [Discount] |
[/showif]Then continue with the html and WC stuff as if there were no discountincluded. The negative values of [Discount] will be added to the cost ofthe Items ordered and will not foul up WC's built-in use of the [subtotal]and [grandtotal] calcs.
Subtotal= | [subtotal] |
Taxes= | [tax] |
Grandtotal= | [grandtotal] |
etc.Lemme know how it works out.Glenn-------------------------------------------------------------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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Figure out what your discount total is and add it to the cart as a negativelineitem. This will require that you have a product in your productdatabase for the discount.1) Add a product to your database for the discount, the price will notmatter we will set it later2) In your template figure out what the discount amount will be3) Add the discount sku to the cart with a negative price, you will need touse the price change password to set the price[addlineitem cart=[cart]&sku=your discount sku]price=discountamount&password=your price change password[/addlineitem]-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Stephen RussoSent: Wednesday, August 02, 2000 5:40 PMTo: WebCatalog TalkSubject: Re: Price ChangeGlenn,That works fine.But when I go to change subtotal to the new discounted price it does notchange. That is my main problem, changing subtotal to the new price.Stephen-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]OnBehalf Of Glenn BusbinSent: Wednesday, August 02, 2000 8:46 AMTo: WebCatalog TalkSubject: Re: Price ChangeThere's more than one way to skin a cat using WC. The database approach Isuggested (late at night after a long day) is one, but since your discountsare so simple, you can also just sum the costs of the items in the cart anduse some [showif] [hideif] stuff.Sum the costs of the items BEFORE getting to [subtotal]. Then evaluate thetemporarysubtotal to see if a discount should be given. If so, add anegative number to the cart that will deduct the appropriate amount.Try something along the order of:[showif [temporarysubtotal]>299] [hideif [temporarysubtotal]>499][Discount]=-50[/hideif][/showif][showif [temporarysubtotal]>499] [Discount]=-55[/showif]In the html for the page, add a line that will display whatever discount isgiven or hide it if there isn't one.[showif [Discount]>0]Discount= | [Discount] |
[/showif]Then continue with the html and WC stuff as if there were no discountincluded. The negative values of [Discount] will be added to the cost ofthe Items ordered and will not foul up WC's built-in use of the [subtotal]and [grandtotal] calcs.Subtotal= | [subtotal] |
Taxes= | [tax] |
Grandtotal= | [grandtotal] |
etc.Lemme know how it works out.Glenn-------------------------------------------------------------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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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://search.smithmicro.com/
John Jakovich
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:
Cart Numbers (1997)
[WebDNA] Bug in Emailer (2008)
Mac 2.1b2 speed (1997)
Emailer again & again (1997)
my price won't move (1997)
WebDNA 6 (2004)
database freeze (1997)
WebCat for mass emailings (1997)
logic help (1998)
weening me off overwriting form variables. John Peacock? (2000)
WebCat2 several catalogs? (1997)
New reserved words for [tags] (2000)
problems with 2 tags (1997)
bug in wn searching NT version? (1997)
serial number generation (1997)
Help name our technology! (1997)
math on date? (1997)
ListFields and [name] (1997)
Forms & Tables (1998)
WebCat2b13MacPlugIn - syntax to convert date (1997)