Using option_list in basket webshop (ezpublish 4.0)

Author Message

Sophie Beaupuis

Friday 04 September 2009 3:14:45 am

Hello,

I'm a little new in eZ Publish technology..

I have troubles whith basket and multioption2.

First, in the html form that post data to the basket (via AddToBasket). Is it right to use something like eZOption['set_{$options.id}] for the "name" attribute of <input> tag ? This is what I've infer from kernel php code.... No error displayed... but don't know if it's actualy right..

Second, the ezBasket.items.item_object.option_list are always empty even if the corresponding session variables are not...

I can't find any examples in product.tpl, basket.tpl or other webshop related template..

Sorry for my english, but it's not my mother tongue...

Hope someone can help..

Sophie Beaupuis

Sunday 06 September 2009 6:18:31 am

After some hours of analyse on the kernel code :

The form structure used to add objects with multioption attribute to basket is something like :

<form method="post" action={"content/action"|ezurl}>
<input name="eZOption[{$node.object.data_map.multioption2.id}][{$multioptions.id}] value="[{$options.option_id}]">
<input type="submit" class="defaultbutton" name="ActionAddToBasket" value="Add to Basket" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
</form>

Hope this will be usefull for someone else

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.