Re: Price Change

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35714
interpreted = N
texte = Stephen,the verb your are after here is addlineitem. That means you want to actually add a product to the shopping cart. In this case the product will just so happen to have a negative price (i.e. it's a discount). You can add a lineitem to a shopping cart via the add command or via the [addlineitem] context. Webcat completely takes care of the subtotal for you. You do not need to try to add something to it. I mean you can do what you want another way and actually take the hassle and use all different displays ([my_subtotal], [my_taxtotal], [my_grandtotal], etc.) but this is alot more work because you would have to calculate everything yourself on the fly using [math] etc., and display it all properly while taking care not to display the standard [subtotal] etc., not to mention how you store/archive the orders in db('s), not to mention how you integrate w/WebMerchant if you use that...See? Once you figure out how to add a product with a negative price under certain conditions (the conditions you posted in the first place) , then everything falls into place via webcat autopilot...You might want to reread Glenn's latter posts and SM's most recent post to you in this light...alsoŽStephen Russo wrote:> Glenn, > Two things: > One: Where on the shoppingcart.tpl page do I put the add lineitem: > In the Linitems, In the SetLineItem?understand that [Lineitems] is a *loop*. If you stick an [addlineitem] inside the Linitems then you will potentially be (in one hit to the page) adding the product specified as many times as there are existing lineitems already in the cart. Make sure you read the docs on each tag or context you are trying to use. If there is anything on your page which you do not know exactly what it is doing, then study docs and post Q's until you grasp it...> > > Two: How do I know what the subtotal is to add the lineitem. > I know to put a showif but when does it know to compare all the items and > quantities to get the subtotal?[subtotal] is automagic. It does what you would expect: qty*price = extension it adds up the extension for all the lineitems in the cart and displays that value.If you want to know what the subtotal is, then stick this in your page: [subtotal]as long as you are within an [ordefile] context (implicit or explicit), then [subtotal] will show the right value (someone correct me if I am wrong).HTH-John> > > Stephen > > -----Original Message----- > From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On > Behalf Of Glenn Busbin > Sent: Thursday, August 03, 2000 10:32 AM > To: WebCatalog Talk > Subject: Re: Price Change > > >Glen, > >I tried the addlineitem and nothing. Here is my code for the invoice page. > >Again if subtotal > 299 Discount $50. If subtotal > 499 Discount $55. > > > >Any help would be great. > > > >Stephen > > > > This is the Invoice.tpl page. I think you'd be better off adding the > discount to the ShoppingCart.tpl page. After all, that's where all other > items are added to the cart. > > Use the addlineitem inside of a [showif] to the ShoppingCart.tpl page, > ensure that the price change password is set in Prefs and give it a shot. > > I'd try this using only one discount instead of two. If you can get one > working, you'll be able to add the other later and the process will be a > bit less intimidating. > > 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 to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [SETLINEITEM] Price Change Not Working (Lawrence 2010)
  2. [WebDNA] [SETLINEITEM] Price Change Not Working ("Ki Song - Knifecenter.com" 2010)
  3. Re: Price Change Password ( Stuart Tremain 2003)
  4. Re: Price Change Password ( Stuart Tremain 2003)
  5. Price Change Password ( Brian Wachter 2003)
  6. Re: Price Change (John Butler 2000)
  7. Re: Price Change (Stephen Russo 2000)
  8. Re: Price Change (Stephen Russo 2000)
  9. Re: Price Change (Glenn Busbin 2000)
  10. Re: Price Change (John Jakovich 2000)
  11. Re: Price Change (Stephen Russo 2000)
  12. Re: Price Change (Glenn Busbin 2000)
  13. Re: Price Change (Glenn Busbin 2000)
  14. Re: Price Change (Stephen Russo 2000)
  15. Re: Price Change (Glenn Busbin 2000)
  16. Re: Price Change (dale 2000)
  17. Re: Price Change (John Butler 2000)
  18. Price Change (Stephen Russo 2000)
  19. Re: Price Change (Glenn Busbin 2000)
  20. Re: Price Change (PCS Technical Support 1999)
  21. Price Change (Bob Minor 1999)
  22. Re: price change help (PCS Technical Support 1998)
  23. price change help (Scott Szretter 1998)
Stephen,the verb your are after here is addlineitem. That means you want to actually add a product to the shopping cart. In this case the product will just so happen to have a negative price (i.e. it's a discount). You can add a lineitem to a shopping cart via the add command or via the [addlineitem] context. Webcat completely takes care of the subtotal for you. You do not need to try to add something to it. I mean you can do what you want another way and actually take the hassle and use all different displays ([my_subtotal], [my_taxtotal], [my_grandtotal], etc.) but this is alot more work because you would have to calculate everything yourself on the fly using [math] etc., and display it all properly while taking care not to display the standard [subtotal] etc., not to mention how you store/archive the orders in db('s), not to mention how you integrate w/WebMerchant if you use that...See? Once you figure out how to add a product with a negative price under certain conditions (the conditions you posted in the first place) , then everything falls into place via webcat autopilot...You might want to reread Glenn's latter posts and SM's most recent post to you in this light...alsoŽStephen Russo wrote:> Glenn, > Two things: > One: Where on the shoppingcart.tpl page do I put the add lineitem: > In the Linitems, In the SetLineItem?understand that [lineitems] is a *loop*. If you stick an [addlineitem] inside the Linitems then you will potentially be (in one hit to the page) adding the product specified as many times as there are existing lineitems already in the cart. Make sure you read the docs on each tag or context you are trying to use. If there is anything on your page which you do not know exactly what it is doing, then study docs and post Q's until you grasp it...> > > Two: How do I know what the subtotal is to add the lineitem. > I know to put a showif but when does it know to compare all the items and > quantities to get the subtotal?[subtotal] is automagic. It does what you would expect: qty*price = extension it adds up the extension for all the lineitems in the cart and displays that value.If you want to know what the subtotal is, then stick this in your page: [subtotal]as long as you are within an [ordefile] context (implicit or explicit), then [subtotal] will show the right value (someone correct me if I am wrong).HTH-John> > > Stephen > > -----Original Message----- > From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On > Behalf Of Glenn Busbin > Sent: Thursday, August 03, 2000 10:32 AM > To: WebCatalog Talk > Subject: Re: Price Change > > >Glen, > >I tried the addlineitem and nothing. Here is my code for the invoice page. > >Again if subtotal > 299 Discount $50. If subtotal > 499 Discount $55. > > > >Any help would be great. > > > >Stephen > > > > This is the Invoice.tpl page. I think you'd be better off adding the > discount to the ShoppingCart.tpl page. After all, that's where all other > items are added to the cart. > > Use the addlineitem inside of a [showif] to the ShoppingCart.tpl page, > ensure that the price change password is set in Prefs and give it a shot. > > I'd try this using only one discount instead of two. If you can get one > working, you'll be able to add the other later and the process will be a > bit less intimidating. > > 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 to Web Archive of this list is at: http://search.smithmicro.com/ John Butler

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:

Semi OT: vbulletin and # viewing - how do that do that? (2003) Associative lookup style? + bit more (1997) math variable security [VERY LONG] (2000) Authorize.Net stopped working for me (2003) Multiple Merchant Accounts? (1997) [Announce]: Web server security and password protection (1997) Silly Question (1997) Error handling for accountNum (1997) [WebDNA] Searching Possible Bug (2009) Single Link browsing (1997) RAM variables (1997) Searching Multiple DBs (1997) [convertchars] problem... (2000) Re:my First Ship table (1998) Problem with version 4 browsers (1998) Why are some admin pages not encrypted? (2000) Frames and WebCat (1997) Lost and Recovered. (1998) How to set triggers (1998) remotely add + sign (1997)