Re: Am I going senile? (Price recalc based on quantity)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13724
interpreted = N
texte = OK, I figured out my problem. I needed to remove the passwrod security for changing an item's price at runtime.Is there any way to allow a change by hardcoded WEBDNA but not by URL-passing?Luke At 6:42 PM 10/2/97, you wrote: >I've been pouring back over the docs about SetLineItem and it seems like I >am not allowed to set the price here. I know that it worked in a previous >version. Could that be a change with 2.01? > >Luke > > >At 12:22 AM 10/2/97, you wrote: >>OK, >> >>Last month, Marc gave this excellent suggestion, which I implemented and >>things started working. Now I'm back to work on the project after a slight >>hiatus and hard drive crash, and my solution seems to have stopped working. > >My pricecalc formula calculates price based on quantity. But it's not >successfully setting the price in the first [lineitems] context. > >> >>I'm copying Marc's message and then my code. Any help would be greatly >>appreciated. >> >>Yours in Success, >> >>Luke Melia >>Upline >> >>At 1:15 PM 8/27/97, you wrote: >>>Luke - >>> >>>How are you displaying the cart, and where is the [setlineitem] context >>>relative to this? If it's somewhere inside the same [lineitems] loop >>>you're using to display the cart, what normally happens is that you are >>>displaying the cart file, but then also modifying that cart file. When >>>you reload that page you'll see the changes, but you'll also modify the >>>cart file yet again. >>> >>>I've found it's easier to do two [lineitems] loops - one to do your >>>[setlineitem] changes, then another farther down the page to actually >>>display the contents of the cart (now that the cart file has been changed >>>by the earlier [setlineitems] context). If you do it this way, you'll >>>probably want to use two [orderfile] contexts directly on the template >>>instead of using a $showcart command in the URL to get to that template, >>>so that these will be processed in the correct order. >>> >>>I hope this helps and/or makes some sense, >>> >>>Marc Eagle >>>StarNine Technologies >>>http://www.smithmicro.com/ >> >> >> >> >> >>Your Upline Resources Shopping Cart >> >> >> >>[orderfile cart=[cart]] >>[lineItems] >>[SetLineItem cart=[cart]&index=[lineindex]&db=upline.db]price=[include >>incs/pricecalc.inc][/setlineitem] >>[/lineItems] >>[/orderfile] >> >>

Shopping Cart

>> >>

Your Shopping Cart contains the following items

>> >>
>> >> >> >> >> >> >> >> >> >> >> >> >> >>[orderfile cart=[cart]] >>[lineItems] >> >> >> >> >> >> >> >>[/lineItems] >> >> >> >>
Title>HREF=Discounts.tmpl$ShowCart?db=upline.db&cart=[cart]&UserName=[UserName]>Qt >>y >>< >>/A>PriceLine Total 
>[title]>HREF=Discounts.tmpl$ShowCart?db=upline.db&cart=[cart]&UserName=[UserName]>[q >>u >>a >>ntity]$[price]$[format .2f][math][quantity]*[price][/math][/format]>href=ShoppingCart.tmpl$remove?db=upline.db&sku=[url][sku][/url]&cart=[cart]&U >>s >>e >>rName=[UserName]>Remove Item [lineIndex]
Subtotal$[subTotal] 
>>Shipping: >>Ship product to this state: >>[/orderfile] >> >>
>> >>[include incs/Footer.inc] >> >> >>___________________________________________________________________________ >>For software for Network Marketers, check out http://www.kaizensoft.com >>Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com >>___________________________________________________________________________ >> ============================ Luke Melia >>|| Was it for this my || >>|| life I sought? || Snail Mail: >>|| Maybe so and || 106 South St. Suite 209 >>|| maybe not... || Charlottesville, VA 22902 >> ===========PHISH============ (804) 963-2608 > > >___________________________________________________________________________ >For software for Network Marketers, check out http://www.kaizensoft.com >Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com >___________________________________________________________________________ > ============================ Luke Melia >|| Was it for this my || >|| life I sought? || Snail Mail: >|| Maybe so and || 106 South St. Suite 209 >|| maybe not... || Charlottesville, VA 22902 > ===========PHISH============ (804) 963-2608 ___________________________________________________________________________ For software for Network Marketers, check out http://www.kaizensoft.com Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com ___________________________________________________________________________ ============================ Luke Melia || Was it for this my || || life I sought? || Snail Mail: || Maybe so and || 106 South St. Suite 209 || maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608 Associated Messages, from the most recent to the oldest:

    
  1. Re: Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  2. Re: Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  3. Re: Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  4. Re: Am I going senile? (Price recalc based on quantity) (Grant Hulbert 1997)
  5. Re: Am I going senile? (Price recalc based on quantity) (Grant Hulbert 1997)
  6. Re: Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  7. Re: Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  8. Am I going senile? (Price recalc based on quantity) (Luke Melia 1997)
  9. Re: Am I going senile? (Price recalc based on quantity) (Grant Hulbert 1997)
OK, I figured out my problem. I needed to remove the passwrod security for changing an item's price at runtime.Is there any way to allow a change by hardcoded WEBDNA but not by URL-passing?Luke At 6:42 PM 10/2/97, you wrote: >I've been pouring back over the docs about SetLineItem and it seems like I >am not allowed to set the price here. I know that it worked in a previous >version. Could that be a change with 2.01? > >Luke > > >At 12:22 AM 10/2/97, you wrote: >>OK, >> >>Last month, Marc gave this excellent suggestion, which I implemented and >>things started working. Now I'm back to work on the project after a slight >>hiatus and hard drive crash, and my solution seems to have stopped working. > >My pricecalc formula calculates price based on quantity. But it's not >successfully setting the price in the first [lineitems] context. > >> >>I'm copying Marc's message and then my code. Any help would be greatly >>appreciated. >> >>Yours in Success, >> >>Luke Melia >>Upline >> >>At 1:15 PM 8/27/97, you wrote: >>>Luke - >>> >>>How are you displaying the cart, and where is the [setlineitem] context >>>relative to this? If it's somewhere inside the same [lineitems] loop >>>you're using to display the cart, what normally happens is that you are >>>displaying the cart file, but then also modifying that cart file. When >>>you reload that page you'll see the changes, but you'll also modify the >>>cart file yet again. >>> >>>I've found it's easier to do two [lineitems] loops - one to do your >>>[setlineitem] changes, then another farther down the page to actually >>>display the contents of the cart (now that the cart file has been changed >>>by the earlier [setlineitems] context). If you do it this way, you'll >>>probably want to use two [orderfile] contexts directly on the template >>>instead of using a $showcart command in the URL to get to that template, >>>so that these will be processed in the correct order. >>> >>>I hope this helps and/or makes some sense, >>> >>>Marc Eagle >>>StarNine Technologies >>>http://www.smithmicro.com/ >> >> >> >> >> >>Your Upline Resources Shopping Cart >> >> >> >>[orderfile cart=[cart]] >>[lineitems] >>[SetLineItem cart=[cart]&index=[lineindex]&db=upline.db]price=[include >>incs/pricecalc.inc][/setlineitem] >>[/lineItems] >>[/orderfile] >> >>

Shopping Cart

>> >>

Your Shopping Cart contains the following items

>> >>
>> >>[cart]> >> >> >> >> >> >> >> >> >> >> >> >>[orderfile cart=[cart]] >>[lineitems] >> >> >> >> >> >> >> >>[/lineItems] >> >> >> >>
Title>HREF=Discounts.tmpl$ShowCart?db=upline.db&cart=[cart]&UserName=[username]>Qt >>y >>< >>/A>PriceLine Total 
>[title]>HREF=Discounts.tmpl$ShowCart?db=upline.db&cart=[cart]&UserName=[username]>[q >>u >>a >>ntity]$[price]$[format .2f][math][quantity]*[price][/math][/format]>href=ShoppingCart.tmpl$remove?db=upline.db&sku=[url][sku][/url]&cart=[cart]&U >>s >>e >>rName=[username]>Remove Item [lineIndex]
Subtotal$[subTotal] 
>>Shipping: >>Ship product to this state: >>[/orderfile] >> >>
>> >>[include incs/Footer.inc] >> >> >>___________________________________________________________________________ >>For software for Network Marketers, check out http://www.kaizensoft.com >>Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com >>___________________________________________________________________________ >> ============================ Luke Melia >>|| Was it for this my || >>|| life I sought? || Snail Mail: >>|| Maybe so and || 106 South St. Suite 209 >>|| maybe not... || Charlottesville, VA 22902 >> ===========PHISH============ (804) 963-2608 > > >___________________________________________________________________________ >For software for Network Marketers, check out http://www.kaizensoft.com >Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com >___________________________________________________________________________ > ============================ Luke Melia >|| Was it for this my || >|| life I sought? || Snail Mail: >|| Maybe so and || 106 South St. Suite 209 >|| maybe not... || Charlottesville, VA 22902 > ===========PHISH============ (804) 963-2608 ___________________________________________________________________________ For software for Network Marketers, check out http://www.kaizensoft.com Upline is Online: http://www.upline.com * NOW!: http://www.slight-edge.com ___________________________________________________________________________ ============================ Luke Melia || Was it for this my || || life I sought? || Snail Mail: || Maybe so and || 106 South St. Suite 209 || maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608 Luke Melia

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:

WC2f3 (1997) No Answer on Web Merchant Problem? (2001) [WebDNA] ONLY the FIRST continuous run of numeric chars? (2008) [WebDNA] Passing a text variable via copyfile (2019) PCS Frames-Default page is solution! (1997) Sendmail (1997) Hotmail and HTML emails (2003) WebCat for mass emailings (1997) [OT] Linux -> Winderz (2005) [WebDNA] An unknown error occurred: TemplateNotFound /Library/WebServerB/Real_Estate/index.html (2019) WebDelivery (1998) Buying sans cart (1997) WebCat2 - Getting to the browser's username/password data (1997) [WebDNA] Clean URLS job - will pay (2010) off topic - dna snipets (1997) WebCatalog 2.0 b 15 mac (1997) insert graphic in email (2000) error: Too many nested [xxx] contexts (1997) [WebDNA] Virtual server (2011) autocommit problem (1998)