Re: Cart questions
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13880
interpreted = N
texte = >1. I am using addlineitem at the beginning of my template to add all the>sku's passed to the template to build my cart. Further down the in code>on that same page I want to be able to display all the lineitems in the>cartThere's a weird technical reason for it, but the workaround is to enclose the second lineitems loop inside an OrderFile context, like so: [OrderFile [cart]]...[lineItems]..[/lineitems]..[/OrderFile]>2. Is there a way to prevent duplicate sku's in the cart. I do not want>to add the item if it is already in the cart. How does one search the>cart?Name your incoming sku inSKU (so you can distinguish it from the LineItems' SKU), and search for it using showif[LineItems] [ShowIf [inSKU]=[SKU]]...[/ShowIf][/LineItems]>3 Subtotal always displays 0.00 how is that calculated. I can open the>formulas.db and they look OK. Any Ideas?Does GrandTotal show up?>4. When I try to set the price with the addlineitem it tells me I dont>have permission to do that. I am having trouble with the price lookup in>the formulas.db, it does not return the price because webcat doesnt seem>to have the correct sku when the formula executes.How are you looking up price? You can't just put [price] in, because the formula is not in the context of a lineitem at that point. Have you tried [lookup db=catalog.txt&lookInField=sku&value=[sku]&returnField=price]?Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>1. I am using addlineitem at the beginning of my template to add all the>sku's passed to the template to build my cart. Further down the in code>on that same page I want to be able to display all the lineitems in the>cartThere's a weird technical reason for it, but the workaround is to enclose the second lineitems loop inside an OrderFile context, like so: [OrderFile
[cart]]...
[lineitems]..[/lineitems]..[/OrderFile]>2. Is there a way to prevent duplicate sku's in the cart. I do not want>to add the item if it is already in the cart. How does one search the>cart?Name your incoming sku inSKU (so you can distinguish it from the LineItems' SKU), and search for it using showif
[lineitems] [ShowIf [inSKU]=[SKU]]...[/ShowIf][/LineItems]>3 Subtotal always displays 0.00 how is that calculated. I can open the>
formulas.db and they look OK. Any Ideas?Does GrandTotal show up?>4. When I try to set the price with the addlineitem it tells me I dont>have permission to do that. I am having trouble with the price lookup in>the
formulas.db, it does not return the price because webcat doesnt seem>to have the correct sku when the formula executes.How are you looking up price? You can't just put [price] in, because the formula is not in the context of a lineitem at that point. Have you tried [lookup db=catalog.txt&lookInField=sku&value=[sku]&returnField=price]?Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Grant Hulbert
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:
WCS Newbie question (1997)
[OT] On a side note.. (2003)
Max Record length restated as maybe bug (1997)
Time/date formatting %X doesn't work ... (1997)
rotating thumbnails (1997)
db Translation (2002)
Cut off from the list and can't get an answer to the confused re:QTY price updating question (1998)
Help! WebCat2 bug (Ben's input) (1997)
ANother SHOWIF problem (1997)
[OT] Test - THE ANSWER (2003)
[WebDNA] Pinterest kinda site? (2013)
Tax & Shipping (1997)
FAX orders (1996)
GuestBook example (1997)
WebSTAR 2.1 freezes my Mac (1997)
Setting up WebCatalog with Retail Pro data (1996)
the dreaded unitShipCost (2003)
Bugs in IE 6.0 ? (2003)
Multiple Merchant Accounts? (1997)
Document Contains no data, or showcart error. (1997)