Forums / Setup & design / fetch attributes in shop basket

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!

eZ debug

Timing: Jan 19 2025 04:52:23
Script start
Timing: Jan 19 2025 04:52:23
Module start 'content'
Timing: Jan 19 2025 04:52:24
Module end 'content'
Timing: Jan 19 2025 04:52:24
Script end

Main resources:

Total runtime0.9641 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.9688180.8359
Module start 'content' 0.00650.8079 769.8047610.4609
Module end 'content' 0.81440.1496 1,380.2656341.0859
Script end 0.9640  1,721.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3972210.0002
Check MTime0.00150.1522210.0001
Mysql Total
Database connection0.00090.096110.0009
Mysqli_queries0.889092.20422050.0043
Looping result0.00220.23142030.0000
Template Total0.934796.920.4673
Template load0.00210.223020.0011
Template processing0.932596.716520.4662
Template load and register function0.00010.013310.0001
states
state_id_array0.00100.108410.0010
state_identifier_array0.00100.108820.0005
Override
Cache load0.00180.1863360.0000
Sytem overhead
Fetch class attribute can translate value0.00140.146340.0004
Fetch class attribute name0.00130.132070.0002
XML
Image XML parsing0.00100.099540.0002
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00290.3051270.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs