Forums / Setup & design / fetch attributes in shop basket

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

fetch attributes in shop basket

Author Message

Martin Ulrich

Thursday 14 October 2004 5:16:30 am

I do a travel site. My travel tours (class product) were illustrated with little images and a description.

Is it possible to fetch description/image etc. in basket.tpl? (I try but did'nt find out how).

{$product_item.object_name} gives the name, but {$product_item.description} naturally not.

something like
attribute_view_gui attribute=$node.object.data_map.description} that works in basket.tpl

Or is it more complicated, and I have to create a new datatype?

Thank you very much for giving me a little hint.
(swear I learn programming in next life ;-)
:-))

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Alex Jones

Thursday 14 October 2004 6:45:31 am

I haven't used the basket much, so I do not know if this will work, but have you tried putting <i>{$product_item|attribute(show)}</i> to see what attributes are available?

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Martin Ulrich

Friday 15 October 2004 3:24:41 am

Thank you, and good morning;-) Its a first step.

there is node_id and contentobject_id. Until know I wasnt able to write a code to show attributes, but I ll try on.
Again thanks.
Sebastian

<b>Attribute 	           Type 	Value</b>
id 	                   string 	151
vat_value 	           string 	16
item_count 	           string 	1
node_id 	           string 	181
object_name 	           string 	'Islandreise Nummer 1'
price_ex_vat 	           double 	379.31034482759
price_inc_vat 	           string 	440
discount_percent 	   string 	0
total_price_ex_vat 	   double 	379.31034482759
total_price_inc_vat 	   integer 	440
item_object 	           object[ezproductcollectionitem] 	Object
>id 	                   string 	151
>productcollection_id 	   string 	46
>contentobject_id 	   string 	186
>item_count 	           string 	1
>price 	                   string 	440
>is_vat_inc 	           string 	1
>vat_value 	           string 	16
>discount 	           string 	0
>contentobject 	           object[ezcontentobject] 	Object
>option_list 	           array 	Array(0)

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Alex Jones

Friday 15 October 2004 6:22:18 am

Perhaps you can run a fetch for <i>$product_item.node_id</i> to gather that information...?

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

bisk

Friday 15 October 2004 7:11:17 am

Try this to get the description in the basket:

{attribute_view_gui attribute=$product_item.item.item_object.contentobject.main_node.data_map.description}

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Martin Ulrich

Friday 15 October 2004 10:20:23 am

cool, it works great, thank you !!!! everybody
and for images I write:

{attribute_view_gui attribute=$product_item.item.item_object.contentobject.main_node.data_map.image.content.data_map.image image_class=small}

found in meantime a solution with:

{let info_list=fetch( content, list, hash( parent_node_id, $product_item.node_id, ...
{section name=infos loop=$info_list max=1}
<div>{attribute_view_gui attribute=$infos:item.parent.object.data_map.image.content.data_map.image image_class=small}

but yours is much better and short ;-O

thank you and good work
S.

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!