Wednesday 17 September 2003 3:45:07 am
Yes, but not ... :-)
> You are nearly there. This code should add an object > to the basket. Remember that I have your code in a loop (and I'm newbie on web programming). If I put the form sentences (<form ...> and </form>) outside the loop, when I push any button the form always send the ContentObjectID for last product. I have a question: Can I put <form ..> and </form> inside the loop (as below)? If I can do, I have a form for each product? (So I have a ContentObjectID for each product). It is possible in HTML?
{let products=fetch(....)} {section name=Product loop:$products}
{let content_object=$node.object}
<form action={"/content/action/"|ezurl} method="post">
<input type="hidden" name="ContentObjectID" value="{$content_object.id}" />
<input type="submit" name="ActionAddToBasket" value="Add to basket">
</form> {/let}
{/section} {/let}
Thanks in advance. Adolfo Barragan
P.S. I put this question in two forum becaus I'm not sure what is the appropiate. Excuse me.
|