Re: Colors in cart
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 41295
interpreted = N
texte = BTW, did you change the showif in your shoppingcart page, like I provided in the example?...[showif [action]=add][addlineitemcart=[cart]&sku=[sku]&db=[db]]quantity=[_quantity]&texta=[selectedsizes]&textb=[selectedcolors]&textc=[style][/addlineitem][/showif]in place of [showif [command]=add]That would have made the page come up blank if you didn't change it.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