Re: Why is my easy [AddLineItems] NOT working??
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34546
interpreted = N
texte = > Yes, it now works, and I've added it to my more complicated ADD commands. It> now adds multiple products, quantities, and SKUs perfectly from the one form.> BUT the product name [PRODUCT] (which is a field in the database) simply> displays as WebCatalog on each line...... rather the [PRODUCT]. Does anyone> know why?Yup.[lineitems] displays the contents of the cart. [product] is a field in yourdatabase, but it is not one of the lineitems nor one of the cart headers. Soyou wouldn't expect lineitems to display it UNLESS, you either set one ofthe texta-e fields in the cart to the product name. So lets say you have aproduct fubar with a sku of 001. Your code would look something like:[addlineitem db=test.db&cart=[cart]&sku=001]quantity=1&texta=fubar[/addlineitem]Try it!Of course you only have 5 text fields so you're SOL if you have more thanfive products in your db.The alternative way is to store them in the cart header (since there are 40header fields in each cart) like so:[addlineitem db=test.db&cart=[cart]&sku=001]quantity=1&header1=fubar[/addlineitem]And then retrieve them like so:[lineitems]
[sku] | [header1] | [price] | [/lineitems]The best advice I can give you is to add and item to a cart from a template,and then go and actually open the shopping cart file with a text editor andsee how it changes. Add a different item and repeat. It'll help youunderstand more completely what actually happens when you add something to ashopping cart.-- Will StarckProduct and Technical SupportNovaDerm.comhttp://www.novaderm.comtechs@novaderm.comToll free support line: 800-378-1740-------------------------------------------------------------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:
> Yes, it now works, and I've added it to my more complicated ADD commands. It> now adds multiple products, quantities, and SKUs perfectly from the one form.> BUT the product name [PRODUCT] (which is a field in the database) simply> displays as WebCatalog on each line...... rather the [PRODUCT]. Does anyone> know why?Yup.[lineitems] displays the contents of the cart. [product] is a field in yourdatabase, but it is not one of the lineitems nor one of the cart headers. Soyou wouldn't expect lineitems to display it UNLESS, you either set one ofthe texta-e fields in the cart to the product name. So lets say you have aproduct fubar with a sku of 001. Your code would look something like:[addlineitem db=test.db&cart=[cart]&sku=001]quantity=1&texta=fubar[/addlineitem]Try it!Of course you only have 5 text fields so you're SOL if you have more thanfive products in your db.The alternative way is to store them in the cart header (since there are 40header fields in each cart) like so:[addlineitem db=test.db&cart=[cart]&sku=001]quantity=1&header1=fubar[/addlineitem]And then retrieve them like so:[lineitems]