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 password parameter 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]

>
> > > > > > > > > > > > > [lineItems] > > > > > > > > > [/lineItems] > > [addlineitem cart=[cart]&sku=2168&db=products.db]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem] > > > > > > > > > > > > > > > >
Item #QtyProduct #Product NamePriceExtension
[lineIndex][quantity][sku][textA] [textB] [textC]$[price]$[format .2f][math][quantity]*[price][/math][/format]
Subtotal$[subTotal]
[shipVia] Shipping & Handling$[shippingTotal]
Grand Total$[grandTotal]
>

> > Please enter the following information so that we may process your order.

>

>

> > [include file=InvoiceInfo.inc] > >

>

>
> > [/orderfile] > > > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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: Counting LineItems (chas@valley.net (chas) 2000)
  2. Re: Counting LineItems (John Butler 2000)
  3. Re: Counting LineItems (chas@valley.net (chas) 2000)
  4. Re: Counting LineItems (John Butler 2000)
  5. Re: Counting LineItems (chas@valley.net (chas) 2000)
  6. Re: Counting LineItems (John Butler 2000)
  7. Re: Counting LineItems (Kenneth Grome 2000)
  8. Re: Counting LineItems (chas@valley.net (chas) 2000)
  9. Re: Counting LineItems (John Peacock 2000)
  10. Re: Counting LineItems (chas@valley.net (chas) 2000)
  11. Re: Counting LineItems (chas@valley.net (chas) 2000)
  12. Re: Counting LineItems (kalin@el.net 2000)
  13. Re: Counting LineItems (kalin@el.net 2000)
  14. Re: Counting LineItems (Kenneth Grome 2000)
  15. Re: Counting LineItems (kalin@el.net 2000)
  16. Re: Counting LineItems (kalin@el.net 2000)
  17. Re: Counting LineItems (John Butler 2000)
  18. Re: Counting LineItems (John Peacock 2000)
  19. Re: Counting LineItems (chas@valley.net (chas) 2000)
  20. Re: Counting LineItems (John Butler 2000)
  21. Re: Counting LineItems (John Butler 2000)
  22. Re: Counting LineItems (John Butler 2000)
  23. Re: Counting LineItems (John Peacock 2000)
  24. Re: Counting LineItems (chas@valley.net (chas) 2000)
  25. Re: Counting LineItems (John Butler 2000)
  26. Re: Counting LineItems (chas@valley.net (chas) 2000)
  27. Re: Counting LineItems (Brian Boegershausen 2000)
  28. Counting LineItems (chas@valley.net (chas) 2000)
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 password parameter 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]] > > [cart]&sku=2168&db=products.db]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem]> > > [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

> [ [cart]>Change Quantities or Shipping | > [cart]>Shop Some More ]
>

Your Final Invoice Contains the Following Items

> Your Order Number is #[cart]

>
> [cart]> > > > > > > > > > > > > [lineitems] > > > > > > > > > [/lineItems] > > [addlineitem cart=[cart]&sku=2168&db=products.db]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem] > > > > > > > > > > > > > > > >
Item #QtyProduct #Product NamePriceExtension
[lineIndex][quantity][sku][textA] [textB] [textC]$[price]$[format .2f][math][quantity]*[price][/math][/format]
Subtotal$[subTotal]
[shipVia] Shipping & Handling$[shippingTotal]
Grand Total$[grandTotal]
>

> > Please enter the following information so that we may process your order.

>

>

> > [include file=InvoiceInfo.inc] > >

>

>
> > [/orderfile] > > > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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:

Sorry, WebDNA Server Not Running! (2005) Db design question (relational vs. flat?) (1998) Questions about maximum (1999) Sendmail doesn't (was Queertrons?) (1997) Fwd: [WebDNA] function not as expected (2010) emailer don't work (1998) Append File help needed amended (2000) [REFERRER] AND Truncation (1998) New Mac Emailer... (1997) European Dates (1998) RE: Subtotal help (1997) WebDNA & Suse Linux (2004) practicing safe queries.. (2000) server admin problems (2005) Date stamp and purging (1998) Shopping Headers (2005) [WebDNA] Rack Mount Server(s) Available (2009) WC2b15 File Corruption (1997) EXPERT TECH SUPPORT ISSUE: Including a db file *fails* on NT without [flushdatabases] ... (2000) Found, but where? (2001)