Fetch related to URL

Author Message

Jorge estévez

Monday 24 September 2007 7:53:43 am

I have this multisite to develop...

One site / 4 languages / 4 designs / one database / category and
products to be seen related to the URL used to access the site

The site will be used from 4 different countries with it's own design,
depending on the URL's access to the site I should change the design,
this is solved via it's own siteaccess, but also I must show or not
certain categories of products.

Now, this sounds quite simple but the only idea I have is to add Check
Marks attributes to the Category Class and associate them with the URL's
they can be accessed from.

This will allow me to make fetches of category trees, but I must first
check from what URL I have been visited from and get, while comparing
(via fetch), the Category Objects and his check marks to allow or not to
be added to the array by the fetch function when getting the objects.

This is very inefficient and surely will consume extra time as being the
fetch function a very used code all arround the site.

I cannot use roles because things could be very complicated due to the
constant changes of the categories status as from who they are going to
be seen (from witch URL), so I assume check marks that will relate the
category with the URL could solve this issue.

So I need some Ideas of a simple way of handling this... "URL versus Fetch"

I was wondering if I could set up (only once for each session) several
global variables (that will be "active" for each user session) and
knowing the status of the variables I could implement a better fetch or
else. But I am not sure if this could be an efficient piece of algorithm.

Anyway if someone has a similar problem or a better idea it will be nice
to hear from you.

Thanks...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

André R.

Tuesday 25 September 2007 12:45:34 am

Hi!
Could you break your quistion down to a few lines?
I guess you have 4x4 siteacesses or are you using some other mechanisme to detect settings?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 06:17:18
Script start
Timing: Jan 31 2025 06:17:18
Module start 'layout'
Timing: Jan 31 2025 06:17:18
Module start 'content'
Timing: Jan 31 2025 06:17:18
Module end 'content'
Timing: Jan 31 2025 06:17:18
Script end

Main resources:

Total runtime0.0123 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.0043 588.0313151.1953
Module start 'layout' 0.00430.0018 739.226636.6172
Module start 'content' 0.00610.0050 775.843890.1250
Module end 'content' 0.01100.0012 865.968833.9922
Script end 0.0122  899.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002117.1149140.0001
Check MTime0.00097.6481140.0001
Mysql Total
Database connection0.00064.776210.0006
Mysqli_queries0.001815.053230.0006
Looping result0.00000.081610.0000
Template Total0.00097.710.0009
Template load0.00075.842910.0007
Template processing0.00021.791510.0002
Override
Cache load0.00054.018310.0005
General
dbfile0.001411.231280.0002
String conversion0.00000.033040.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