Forums / Setup & design / How to implement this in eZ publish

How to implement this in eZ publish

Author Message

Aya Brea

Thursday 12 August 2004 10:51:06 am

Hello,

I'm trying to implement following idea in eZ publish, please help some input :)

I have a product class, and another store class with an object relation list attribute named product_list. Of course some products will exist in several store's product_list, when I view a product, how can I get a list of all store that have it in the product_list?

Beside, each store have its own price for each product, so that the price have to be add for the product object when adding to the product_list object list. But the list accept only object (this is right), is there anyway around to solve this problem?

TIA.

Aya Brea

Saturday 14 August 2004 12:38:10 pm

Any body out there??? Please help!!!

Paul Forsyth

Sunday 15 August 2004 2:09:02 am

I dont quite see your problem here.

You have three two classes:

- store
- product

Store contains an object relation list attribute called product_list.

When you add a product to your product_list something doesnt work. Can you explain more?

thanks

paul

--
http://www.visionwt.com

Aya Brea

Monday 16 August 2004 7:03:22 am

No no, when I add an product object to the object relation list. It works.

But the problem is, each store have it own price for a product so I can't have the price tag along with the product, the price have to be tag with the product only when added to the list. That's the problem...

I don't know if you understand me, so this is the example:

There're two products, Monitor and Mouse.
There're two store, Store1 and Store2, both of them have Monitor and Mouse in their product list.

But Store1 sell Monitor for $100 while Store2 sell the Monitor for $200. And so on with the Mouse.

So you see that I can't have a price attribute in the product class, but I don't want to creat two instances of same product to specify prices for them. Also, there's role permission here, store owner have the right to change the price of the product, but they can't edit the product, such as specifications... etc...

I see there's Order field along with each object in the product list, hehehehe, maybe I'll utilize it :D

eZ debug

Timing: Jan 18 2025 22:16:24
Script start
Timing: Jan 18 2025 22:16:24
Module start 'content'
Timing: Jan 18 2025 22:16:24
Module end 'content'
Timing: Jan 18 2025 22:16:24
Script end

Main resources:

Total runtime0.1630 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.8125180.8281
Module start 'content' 0.00810.0063 768.640693.7734
Module end 'content' 0.01440.1486 862.4141522.3281
Script end 0.1630  1,384.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.2751200.0002
Check MTime0.00150.9102200.0001
Mysql Total
Database connection0.00060.392510.0006
Mysqli_queries0.113369.47061410.0008
Looping result0.00150.93121390.0000
Template Total0.148290.910.1482
Template load0.00100.606010.0010
Template processing0.147290.268410.1472
Override
Cache load0.00070.428810.0007
Sytem overhead
Fetch class attribute can translate value0.00090.554510.0009
XML
Image XML parsing0.00020.116510.0002
General
dbfile0.00442.6859200.0002
String conversion0.00000.004830.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs