Forums / Setup & design / shop options
Martin Ulrich
Wednesday 20 October 2004 3:39:38 am
hi,for my products (travel tours) I'd like to have tour-dates as sub-options
I change my class (product) and add datatype option.
In product full view I can fetch it by {attribute_view_gui attribute=$node.object.data_map.tourdate}can choose my date here, and so far everything is ok.
Now I add the product to basket. And here is my problem. How I can fetch that options in basket? There is a section {section show=$product_item.item.item_object.option_list} in basket. I tried everything: - named my optionfield in class "option_list" - named my optionfield in class "name" "value" "price" (such as it called in the section option_list)
But still there are no product options shown in basket. What do I have done wrong? ;-) (sorry for english)
*thanks*
_______________________ http://artenic.de ARTENIC - Publishing mit allen Mitteln!
Silke Fox
Wednesday 20 October 2004 4:20:19 am
Hi Sepp,
I'm not sure if product options are available in the basket.Did you try something like
{$product_item.item|attribute(show,2)}
in the basket.tpl to find out more?
silke
Wenyue Yu
Wednesday 20 October 2004 4:24:43 am
Hi,
I guess you can use {$product_item.item.item_object.contentobject.data_map.tourdate} to get this attribute in template.
Regards,wenyue
Wednesday 20 October 2004 8:12:54 am
thanks!!! unfortunately no success until now.
{$product_item|attribute(show)} tells :
Attribute Type Value >option_list array Array(0)
so it should work somehow
In ... loop=$basket.items ... I can fetch the options with {attribute_view_gui attribute=$product_item.item.item_object.contentobject.main_node.data_map.tourdate} but it is always the first option selected than.
And it doesnt work in {section show=$product_item.item.item_object.option_list}
however my eyes say they want to have a break for today.
wish you much more success see you next year )
Wednesday 20 October 2004 9:06:36 am
Yeah, Iv done it !!!! :-))
all that was wrong:
In the product-full-view-template where I call the addtobasketaction my {attribute_view_gui attribute=$node.object.data_map.tourdate} had to be WITHIN the form:
{section show=is_unset( $versionview_mode )} <div class="content-action"> <form method="post" action={"content/action"|ezurl}> <div class="attribute-small"> <p> {attribute_view_gui attribute=$node.object.data_map.tourdate} </p> </div> <input type="submit" class="defaultbutton" name="ActionAddToBasket" value="in den Rucksack damit" /> <input type="hidden" name="ContentNodeID" value="{$node.node_id}" /> <input type="hidden" name="ContentObjectID" value="{$node.object.id}" /> <input type="hidden" name="ViewMode" value="full" /> </form> </div> {/section}
good end after all, :-))
Daniela Moreno
Monday 28 March 2005 1:10:45 pm
cool! hey what did u change in basket.tpl?bcuz i get nothing!
Tuesday 29 March 2005 9:53:16 am
a little bit time passed since that, and I done it with 3.5.0 there is nothing to change in basket.tpl (news demo)it was ok and works with demo basket.tpl
for me the probleme was, as mentioned above, the product.tpl with the inputbutton "Add to basket".
There is a form in product.tpl and I forgot to put the identifier (Attribute "option") WITHIN this form.
hi:)
D K
Monday 09 March 2009 3:49:45 am
Can you please explain how to add options. Because I have added options using "Selection". It shows in the product. But once I submit it shows the array(0) in the basket.
Thanks.
http://www.eyepax.com
André R.
Monday 09 March 2009 4:15:11 am
Try with multioption2 data type instead, it is a datatype for the shop.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom