Webshop

Author Message

Evgeniy K

Thursday 27 April 2006 3:30:51 am

Hello.
I'm newbie, and now I'm trying eZ.
Is it possible to sort products at webshop by price attribute on the site pages? And is it possible to sort products randomly (shuffle)?
Thanks.
Sorry for my bad English, I'm Russian.
Best regards.
Evgeniy.

Stuart Fenton

Monday 01 May 2006 1:36:48 pm

You can specify sorting in the fetch statement used to fetch the objects to display. Add the ?sort_by? array to you fetch statement.

Have a look at:
http://ez.no/products/ez_publish/documentation/customization/tips_tricks/fetch_function_examples

Or if your using fetch_alias look at:
http://ez.no/products/ez_publish/documentation/reference/template_functions/miscellaneous/fetch_alias

You could link this to buttons on your screen to sort in the order you want.

As for random ordering their is a contribution called ?Shuffle? which will randomly sort an array.

You can find it here:
http://ez.no/community/contribs/template_plugins/extension_shuffle

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

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 18 2025 19:26:00
Script start
Timing: Jan 18 2025 19:26:00
Module start 'layout'
Timing: Jan 18 2025 19:26:00
Module start 'content'
Timing: Jan 18 2025 19:26:02
Module end 'content'
Timing: Jan 18 2025 19:26:02
Script end

Main resources:

Total runtime1.4494 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.7813152.6094
Module start 'layout' 0.00550.0027 740.390639.3984
Module start 'content' 0.00821.4395 779.7891524.4531
Module end 'content' 1.44770.0016 1,304.24228.2109
Script end 1.4494  1,312.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2503160.0002
Check MTime0.00140.0953160.0001
Mysql Total
Database connection0.00070.046510.0007
Mysqli_queries1.401196.6644540.0259
Looping result0.00050.0347520.0000
Template Total1.414597.620.7072
Template load0.00200.139620.0010
Template processing1.412497.448120.7062
Template load and register function0.00020.010710.0002
states
state_id_array0.00110.077210.0011
state_identifier_array0.00270.189520.0014
Override
Cache load0.00170.1191230.0001
Sytem overhead
Fetch class attribute can translate value0.00080.053520.0004
Fetch class attribute name0.00130.091730.0004
XML
Image XML parsing0.00070.051520.0004
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00090.0612160.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs