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