Am I going senile? (Price recalc based on quantity)
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13694
interpreted = N
texte = OK,Last month, Marc gave this excellent suggestion, which I implemented andthings started working. Now I'm back to work on the project after a slighthiatus and hard drive crash, and my solution seems to have stopped working.I'm copying Marc's message and then my code. Any help would be greatlyappreciated.Yours in Success,Luke MeliaUplineAt 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=[includeincs/pricecalc.inc][/setlineitem][/lineItems][/orderfile]
Shopping Cart
Your Shopping Cart contains the following items
[include incs/Footer.inc]