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 aproduct to the shopping cart. In this case the product will just so happen to have anegative price (i.e. it's a discount). You can add a lineitem to a shopping cart viathe add command or via the [addlineitem] context. Webcat completely takes care of thesubtotal for you. You do not need to try to add something to it. I mean you can dowhat 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 workbecause 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 youintegrate w/WebMerchant if you use that...See? Once you figure out how to add a product with a negative price under certainconditions (the conditions you posted in the first place) , then everything falls intoplace via webcat autopilot...You might want to reread Glenn's latter posts and SM's most recent post to you in thislight...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 theLinitems then you will potentially be (in one hit to the page) adding the productspecified as many times as there are existing lineitems already in the cart. Make sureyou read the docs on each tag or context you are trying to use. If there is anythingon your page which you do not know exactly what it is doing, then study docs and postQ'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 = extensionit 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:
Stephen,the verb your are after here is addlineitem. That means you want to actually add aproduct to the shopping cart. In this case the product will just so happen to have anegative price (i.e. it's a discount). You can add a lineitem to a shopping cart viathe add command or via the [addlineitem] context. Webcat completely takes care of thesubtotal for you. You do not need to try to add something to it. I mean you can dowhat 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 workbecause 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 youintegrate w/WebMerchant if you use that...See? Once you figure out how to add a product with a negative price under certainconditions (the conditions you posted in the first place) , then everything falls intoplace via webcat autopilot...You might want to reread Glenn's latter posts and SM's most recent post to you in thislight...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 theLinitems then you will potentially be (in one hit to the page) adding the productspecified as many times as there are existing lineitems already in the cart. Make sureyou read the docs on each tag or context you are trying to use. If there is anythingon your page which you do not know exactly what it is doing, then study docs and postQ'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 = extensionit 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)