undocumented shop fetch function "order"

Author Message

Monica Giambitto

Wednesday 20 October 2010 2:20:53 am

I'm developing an e-commerce solution for a customer of ours.

I needed to get information, in the template part, about the order the basket was referring to. Searching through the reference manual wasn't of any help, because the fetch functions listed for the shop module didn't mention anything about it.

I just give it a try and wrote down this

 {def $order=fetch('shop', 'order', $basket.order_id)}

and there it was!

Adding this to the documentation could be of great help.

Heath

Wednesday 20 October 2010 2:34:12 am

Hello Monica,

Welcome to the eZ Publish Community!

Could we trouble you to also file an issue tracker enhancement request for this improvement to the documentation?

Thank you for sharing your find with everyone :)

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Heath

Wednesday 20 October 2010 4:51:55 am

FYI,

For those that care to know.

There are many un-documented features

like fetch functions in the eZ Publish kernel.

For example in the kernel/shop module there are also these undocumented fetch functions.

  • order_status_history_count
  • order_status_history
  • user_country
  • current_wish_list

Just to name a few [0]

Cheers,

Heath

[0] From: kernel/shop/function_definition.php

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Gaetano Giunta

Monday 08 November 2010 1:08:03 pm

...and the ggsysinfo extension will gleefully list all of the available fetch functions for you. And all module views too!

http://projects.ez.no/ggsysinfo/gallery/admin_interface_screenshots/list_of_available_fetch_functions

Principal Consultant International Business
Member of the Community Project Board

Monica Giambitto

Wednesday 06 April 2011 6:05:08 am

"

Could we trouble you to also file an issue tracker enhancement request for this improvement to the documentation?

Thank you for sharing your find with everyone :)

"

I'm sorry, I was a noob as for share.ez.no and didn't follow the discussion. I just filed the request.

Thank you very much for letting me know about the others fetch function and for replying me so kindly!

Monica Giambitto

Wednesday 06 April 2011 6:06:37 am

"

...and the ggsysinfo extension will gleefully list all of the available fetch functions for you. And all module views too!

"

This is a great extension, Gaetano. I saw it installed in our ez instance, but since it wasn't activated and, my bad, for lack of curiosity, I didn't bother to give it a look. I'll surely use it in the future, thank you.

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 30 2025 00:44:55
Script start
Timing: Jan 30 2025 00:44:55
Module start 'layout'
Timing: Jan 30 2025 00:44:55
Module start 'content'
Timing: Jan 30 2025 00:44:55
Module end 'content'
Timing: Jan 30 2025 00:44:55
Script end

Main resources:

Total runtime0.0144 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.0058 588.1484151.2109
Module start 'layout' 0.00580.0033 739.359436.6563
Module start 'content' 0.00910.0038 776.015698.8125
Module end 'content' 0.01300.0014 874.828137.9766
Script end 0.0144  912.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002517.6039140.0002
Check MTime0.00128.0177140.0001
Mysql Total
Database connection0.00117.291210.0011
Mysqli_queries0.002617.709630.0009
Looping result0.00000.118910.0000
Template Total0.00117.710.0011
Template load0.00095.948910.0009
Template processing0.00021.717110.0002
Override
Cache load0.00064.155810.0006
General
dbfile0.00031.961580.0000
String conversion0.00000.089240.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