numero = 41294
interpreted = N
texte = it is adding the product twice because you are adding it with the command add, and then with the with the addlineitem context. If youwant to use the context in the shoppingcart page, make sure that your context appears before your cart display in the code. You mayneed to set the mimeheaders in the shoppincart page not to cache also (look in the archives for this code). For simplicity, if youwant to stick with just the command, get rid of the addlineitem context in the shoppingcart page and rename your select menus like... and This should do it. Sorry if I'm making this confusing!stephen wrote:> I tried the code and the shopping cart comes up blank.> If I change action to command and value equals add, then I get it to come up but it is adding the product twice.>> S->> -----Original Message-----> From: Robert Wade [mailto:robert@outboundcreative.com]> Sent: Tuesday, July 09, 2002 11:30 AM> To: WebCatalog Talk> Subject: Re: Colors in cart>> Well, I can tell a few things that are wrong here.>> - You are sending the add command to the next page, and you are also using an addlineitem context. These both accomplish the same> task. I would remove the add command. As a rule, I always use contexts rather than commands when available. If you need to> determine what happens on your shoppincart page when accessed, change command to action or something like that. Then use> [showif [action]=add]. action is not a webdna tag, so it will be treated as a simple variable, and will work with your showif to> determine what happens on that page.>> - Somewhere on the page, you need to specify a quantity of the product being added, as in a hidden input variable, or a text input,> or you can hardcode it in the addlineitem context on the shoppincart page. The test you ran would have actually added a quantity of> the text [quantity] since there was no variable passed.>> Try this code instead.... (don't forget to remove linebreaks caused by the email app)>> ====================>
> > ========================> And in your shoppincart page use this....>> [showif [action]=add]> [addlineitem> cart=[cart]&sku=[sku]&db=[db]]quantity=[_quantity]&texta=[selectedsizes]&textb=[selectedcolors]&textc=[style][/addlineitem]> [/showif]>> ( I wasn't sure what [style] was so I put it in textc. You can remove that part if you need. You don't need the formvariables loop> UNLESS you are planning on adding multiple items with one click. If you do this you have to re-do how you name your select menus> and then pull the values out in the addlineitem. for instance your select name might be