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

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:27:52
Script start
Timing: Jan 31 2025 06:27:52
Module start 'layout'
Timing: Jan 31 2025 06:27:52
Module start 'content'
Timing: Jan 31 2025 06:27:52
Module end 'content'
Timing: Jan 31 2025 06:27:52
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.0046 588.2500151.2266
Module start 'layout' 0.00460.0027 739.476636.6641
Module start 'content' 0.00730.0055 776.140690.0313
Module end 'content' 0.01280.0016 866.171933.9922
Script end 0.0144  900.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002215.0743140.0002
Check MTime0.00096.5669140.0001
Mysql Total
Database connection0.00064.396110.0006
Mysqli_queries0.002718.737030.0009
Looping result0.00000.167210.0000
Template Total0.00117.510.0011
Template load0.00085.826710.0008
Template processing0.00021.611110.0002
Override
Cache load0.00063.833210.0006
General
dbfile0.00106.965980.0001
String conversion0.00000.064640.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