Re: Counting LineItems
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 32407
interpreted = N
texte = You want the [addlineitem ...] .... [/addlineitem]to be above the [lineitems] loop because you want the discount to appear on the page for the user to see right? (if it was put below then the user would not actually have the discount until after his shopping cart items had already displayed... then for all he knows it doesn't exist.You were getting that error because webcat has a built in security feature that prevents users from manipulating the price (like via an add command in the URL they can manipulate). Price normally comes from the product db or else from the price formula. In your case with this particular item you want to price to be generated on the fly right on the template, so you have to also include the passwordparameter in your [addlineitem] context which tells webcat you are not some remote hacker trying to get the item at whatever price he wants... and so it should stop giving that Error:you are not allowed to change the priceIt may seem like alot, but try to read all the docs. At least read thoroughly what documentation is given for any tags/commands/contexts which you are trying to use while encountering problems. The most up to date (for webcat 3.x) are found here-http://www.smithmicro.com/WebDNAReference/-Johnchas wrote:> thanks - that makes sense..>> --- You wrote:> [addlineitem cart=[cart]&sku=2168]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem]> --- end of quote --->> Still can't get the [addlineitem] to fire... That is to actually display a new lineitem in the CART>> here is what I have.....>> [addlineitem cart=[cart]&sku=2168&db=products.db]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem]>> When I put it up top of the template before the [SetHeader] and [Lineitems] contexts get Error:you are not allowed to change the price>> When I put it below [Lineitems]... I breaks the page and not tables below the sku, desc, price, extension show...>> here is my code (dept of redundancy dept.)>> > > >
Invoice> >> [include file=Fresh_Header.inc]>> [orderfile cart=[cart]]>> >> [SetHeader cart=[cart]]shipVia=[url][__shipVia][/url]&CartIPAddress=[ipAddress][/SetHeader]>> [lineitems]> [SetLineItem cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpret]&textA=[url][lookup db=products.db&lookinfield=sku&value=[url][sku][/url]&returnfield=CDTitle][/url]&textB=[url][lookup db=products.db&lookinfield=sku&value=[url][sku][/url]&returnfield=Type][/url]&textC=[url][lookup db=products.db&lookinfield=sku&value=[url][sku][/url]&returnfield=Tag Line][/url][/SetLineItem]> [/lineitems]>> header40=[header40] >>
Final Invoice
> [
Change Quantities or Shipping |>
Shop Some More ]
>
Your Final Invoice Contains the Following Items
> Your Order Number is #[cart]>
> >> [/orderfile]>> >