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!

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

eZ debug

Timing: Jan 31 2025 10:09:15
Script start
Timing: Jan 31 2025 10:09:15
Module start 'layout'
Timing: Jan 31 2025 10:09:15
Module start 'content'
Timing: Jan 31 2025 10:09:15
Module end 'content'
Timing: Jan 31 2025 10:09:15
Script end

Main resources:

Total runtime0.0218 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 588.1328151.2109
Module start 'layout' 0.00690.0044 739.343836.6641
Module start 'content' 0.01130.0087 776.007898.2813
Module end 'content' 0.02000.0017 874.289137.9922
Script end 0.0217  912.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003013.7179140.0002
Check MTime0.00135.8636140.0001
Mysql Total
Database connection0.00104.782410.0010
Mysqli_queries0.004018.186230.0013
Looping result0.00000.109410.0000
Template Total0.00125.410.0012
Template load0.00094.351210.0009
Template processing0.00020.981610.0002
Override
Cache load0.00062.974510.0006
General
dbfile0.003415.745880.0004
String conversion0.00000.054740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs