You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by shristhi sharma <sh...@gmail.com> on 2008/04/22 01:56:16 UTC

Two root category

I am trying to configure ofbiz for auto parts store. I wish to classify
products into two major categories. General category (Wheels for example)
and brands (Bridgestone).

I am looking sidedeepcategory.bsh, CommonScreens.xml and CategoryWorker.java

Guys, i donno the efficient way of doing this .. i am afraid it will be a
big mess at the end. Any suggestion will be great.

Thanks

Re: Two root category

Posted by Valentina Sirkova <vs...@iguanait.com>.
Quoting shristhi sharma <sh...@gmail.com>:

> I am trying to configure ofbiz for auto parts store. I wish to classify
> products into two major categories. General category (Wheels for example)
> and brands (Bridgestone).
>
> I am looking sidedeepcategory.bsh, CommonScreens.xml and CategoryWorker.java
>
> Guys, i donno the efficient way of doing this .. i am afraid it will be a
> big mess at the end. Any suggestion will be great.
>
> Thanks
>


Hi,
What the others suggested you is  the right approach. Just one  
clarification if  you would like to sell as products what is under  
your brands category and you wonder how to organize your categories  
then it will be useful for you to see these links:   
http://docs.ofbiz.org/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide
The methods in CategoryWorker.java reffered from sidedeepcategory.bsh  
build the product catalog category tree starting from root. You could  
assosiate other categories to the root through ProductCategoryRollup
Valentina :)




Re: Two root category

Posted by Bruno Busco <br...@gmail.com>.
OK,
-SOLVED-
I have found that I need to specify that a party can play a role here
https://localhost:8443/partymgr/control/viewroles?partyId=10000
before linking to a product with that role. (Sorry...)

-Bruno

2008/4/22 Bruno Busco <br...@gmail.com>:

> I am trying to do the same:
> I have some products, defined some parties (actually Party groups) and now
> I am trying to associate the products to these parties with a Vendor role.
> In https://localhost:8443/catalog/control/addPartyToProduct
> if I select a role different from "Not Applicable" I get the following
> error:
>
> ERROR: Could not complete the Add Party to Product
> [file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
> process [problem creating the newEntity value: Error while inserting:
> [GenericEntity:ProductRole][createdStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_ROLE
> (PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
> VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE' caused
> a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
> (10001,VENDOR). The statement has been rolled back.))]
>
> I am using an ofbiz installation in which I have only loaded the seeds. Is
> there some other step I am missing?
>
> Thank you,
> -Bruno
>
> 2008/4/22 Raj Saini <ra...@gmail.com>:
>
> Divide your product in general categories. And use the parties tab to add
> > manufacturer role to a product. You can use get a list of manufacturers from
> > the product and role association entity (I don't remember exactly but I
> > think it is ProductRole ).
> >
> > Thanks,
> >
> > Raj
> >
> >
> > shristhi sharma wrote:
> >
> > > I am trying to configure ofbiz for auto parts store. I wish to
> > > classify
> > > products into two major categories. General category (Wheels for
> > > example)
> > > and brands (Bridgestone).
> > >
> > > I am looking sidedeepcategory.bsh, CommonScreens.xml and
> > > CategoryWorker.java
> > >
> > > Guys, i donno the efficient way of doing this .. i am afraid it will
> > > be a
> > > big mess at the end. Any suggestion will be great.
> > >
> > > Thanks
> > >
> > >
> > >
> >
> >
>

Re: Two root category

Posted by Raj Saini <ra...@gmail.com>.
You are right, brand field is simple text. I am also not sure what could 
be the purpose it.

However, there is also a OEM field on product page. OEM stands for 
"Original Equipment Manufacturer". I am not sure what is the intended 
use of this field but it looks most suitable to me. You can create a 
Party Group for each manufacturer and associate with product using OEM 
field.

Thanks,

Raj

Bruno Busco wrote:
> Suppose my products are tyres and I would like to show in the product detail
> screen a little brand logo (goodyear, bridgestone etc.) and this should be
> clickable and take to the brand web site.
> What is the best way to implement?
> I have seen a "brand" field in the product page but I am confused about
> using this field (that seems to be a simple string) or link the product to a
> "Party group" that can have the web site and logo associated to it.
> If this second solution should be used do you suggest to define a new party
> role for what I have to do or may be some already exists?
>
> Thank you,
> -Bruno
>
> 2008/4/23 Raj Saini <ra...@gmail.com>:
>
>   
>> Have you created new roles if they do not exists? You will also need to
>> associate those roles to your party in party manager before you associate a
>> party in catalog manager. Party lookup catalog manager shows all the roles,
>> instead it should show only roles the selected party is member. Therefore,
>> be careful to choose only role which your party is associated in party
>> manager.
>>
>> Raj
>>
>> Bruno Busco wrote:
>>
>>     
>>> I am trying to do the same:
>>> I have some products, defined some parties (actually Party groups) and
>>> now I
>>> am trying to associate the products to these parties with a Vendor role.
>>> In https://localhost:8443/catalog/control/addPartyToProduct
>>> if I select a role different from "Not Applicable" I get the following
>>> error:
>>>
>>> ERROR: Could not complete the Add Party to Product
>>>
>>> [file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
>>> process [problem creating the newEntity value: Error while inserting:
>>> [GenericEntity:ProductRole][createdStamp,2008-04-22
>>> 21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
>>> 21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
>>> 21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
>>> 21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
>>>
>>> 21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
>>> (SQL Exception while executing the following:INSERT INTO
>>> OFBIZ.PRODUCT_ROLE
>>> (PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
>>> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
>>> CREATED_TX_STAMP)
>>> VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE'
>>> caused
>>> a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
>>> (10001,VENDOR). The statement has been rolled back.))]
>>>
>>> I am using an ofbiz installation in which I have only loaded the seeds.
>>> Is
>>> there some other step I am missing?
>>>
>>> Thank you,
>>> -Bruno
>>>
>>> 2008/4/22 Raj Saini <ra...@gmail.com>:
>>>
>>>
>>>
>>>       
>>>> Divide your product in general categories. And use the parties tab to
>>>> add
>>>> manufacturer role to a product. You can use get a list of
>>>> manufacturers from
>>>> the product and role association entity (I don't remember exactly but
>>>> I
>>>> think it is ProductRole ).
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>>
>>>> shristhi sharma wrote:
>>>>
>>>>
>>>>
>>>>         
>>>>> I am trying to configure ofbiz for auto parts store. I wish to
>>>>> classify
>>>>> products into two major categories. General category (Wheels for
>>>>> example)
>>>>> and brands (Bridgestone).
>>>>>
>>>>> I am looking sidedeepcategory.bsh, CommonScreens.xml and
>>>>> CategoryWorker.java
>>>>>
>>>>> Guys, i donno the efficient way of doing this .. i am afraid it will
>>>>> be
>>>>> a
>>>>> big mess at the end. Any suggestion will be great.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>         
>>>
>>>       
>>     
>
>   


Re: Two root category

Posted by Bruno Busco <br...@gmail.com>.
Suppose my products are tyres and I would like to show in the product detail
screen a little brand logo (goodyear, bridgestone etc.) and this should be
clickable and take to the brand web site.
What is the best way to implement?
I have seen a "brand" field in the product page but I am confused about
using this field (that seems to be a simple string) or link the product to a
"Party group" that can have the web site and logo associated to it.
If this second solution should be used do you suggest to define a new party
role for what I have to do or may be some already exists?

Thank you,
-Bruno

2008/4/23 Raj Saini <ra...@gmail.com>:

> Have you created new roles if they do not exists? You will also need to
> associate those roles to your party in party manager before you associate a
> party in catalog manager. Party lookup catalog manager shows all the roles,
> instead it should show only roles the selected party is member. Therefore,
> be careful to choose only role which your party is associated in party
> manager.
>
> Raj
>
> Bruno Busco wrote:
>
> > I am trying to do the same:
> > I have some products, defined some parties (actually Party groups) and
> > now I
> > am trying to associate the products to these parties with a Vendor role.
> > In https://localhost:8443/catalog/control/addPartyToProduct
> > if I select a role different from "Not Applicable" I get the following
> > error:
> >
> > ERROR: Could not complete the Add Party to Product
> >
> > [file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
> > process [problem creating the newEntity value: Error while inserting:
> > [GenericEntity:ProductRole][createdStamp,2008-04-22
> > 21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
> > 21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
> > 21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
> > 21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
> >
> > 21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
> > (SQL Exception while executing the following:INSERT INTO
> > OFBIZ.PRODUCT_ROLE
> > (PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
> > LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
> > CREATED_TX_STAMP)
> > VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE'
> > caused
> > a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
> > (10001,VENDOR). The statement has been rolled back.))]
> >
> > I am using an ofbiz installation in which I have only loaded the seeds.
> > Is
> > there some other step I am missing?
> >
> > Thank you,
> > -Bruno
> >
> > 2008/4/22 Raj Saini <ra...@gmail.com>:
> >
> >
> >
> > > Divide your product in general categories. And use the parties tab to
> > > add
> > > manufacturer role to a product. You can use get a list of
> > > manufacturers from
> > > the product and role association entity (I don't remember exactly but
> > > I
> > > think it is ProductRole ).
> > >
> > > Thanks,
> > >
> > > Raj
> > >
> > >
> > > shristhi sharma wrote:
> > >
> > >
> > >
> > > > I am trying to configure ofbiz for auto parts store. I wish to
> > > > classify
> > > > products into two major categories. General category (Wheels for
> > > > example)
> > > > and brands (Bridgestone).
> > > >
> > > > I am looking sidedeepcategory.bsh, CommonScreens.xml and
> > > > CategoryWorker.java
> > > >
> > > > Guys, i donno the efficient way of doing this .. i am afraid it will
> > > > be
> > > > a
> > > > big mess at the end. Any suggestion will be great.
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>

Re: Two root category

Posted by Raj Saini <ra...@gmail.com>.
Have you created new roles if they do not exists? You will also need to 
associate those roles to your party in party manager before you 
associate a party in catalog manager. Party lookup catalog manager shows 
all the roles, instead it should show only roles the selected party is 
member. Therefore, be careful to choose only role which your party is 
associated in party manager.

Raj
Bruno Busco wrote:
> I am trying to do the same:
> I have some products, defined some parties (actually Party groups) and now I
> am trying to associate the products to these parties with a Vendor role.
> In https://localhost:8443/catalog/control/addPartyToProduct
> if I select a role different from "Not Applicable" I get the following
> error:
>
> ERROR: Could not complete the Add Party to Product
> [file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
> process [problem creating the newEntity value: Error while inserting:
> [GenericEntity:ProductRole][createdStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_ROLE
> (PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
> VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE' caused
> a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
> (10001,VENDOR). The statement has been rolled back.))]
>
> I am using an ofbiz installation in which I have only loaded the seeds. Is
> there some other step I am missing?
>
> Thank you,
> -Bruno
>
> 2008/4/22 Raj Saini <ra...@gmail.com>:
>
>   
>> Divide your product in general categories. And use the parties tab to add
>> manufacturer role to a product. You can use get a list of manufacturers from
>> the product and role association entity (I don't remember exactly but I
>> think it is ProductRole ).
>>
>> Thanks,
>>
>> Raj
>>
>>
>> shristhi sharma wrote:
>>
>>     
>>> I am trying to configure ofbiz for auto parts store. I wish to classify
>>> products into two major categories. General category (Wheels for
>>> example)
>>> and brands (Bridgestone).
>>>
>>> I am looking sidedeepcategory.bsh, CommonScreens.xml and
>>> CategoryWorker.java
>>>
>>> Guys, i donno the efficient way of doing this .. i am afraid it will be
>>> a
>>> big mess at the end. Any suggestion will be great.
>>>
>>> Thanks
>>>
>>>
>>>
>>>       
>>     
>
>   


Re: Two root category

Posted by Bruno Busco <br...@gmail.com>.
I am trying to do the same:
I have some products, defined some parties (actually Party groups) and now I
am trying to associate the products to these parties with a Vendor role.
In https://localhost:8443/catalog/control/addPartyToProduct
if I select a role different from "Not Applicable" I get the following
error:

ERROR: Could not complete the Add Party to Product
[file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
process [problem creating the newEntity value: Error while inserting:
[GenericEntity:ProductRole][createdStamp,2008-04-22
21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
(SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_ROLE
(PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE' caused
a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
(10001,VENDOR). The statement has been rolled back.))]

I am using an ofbiz installation in which I have only loaded the seeds. Is
there some other step I am missing?

Thank you,
-Bruno

2008/4/22 Raj Saini <ra...@gmail.com>:

> Divide your product in general categories. And use the parties tab to add
> manufacturer role to a product. You can use get a list of manufacturers from
> the product and role association entity (I don't remember exactly but I
> think it is ProductRole ).
>
> Thanks,
>
> Raj
>
>
> shristhi sharma wrote:
>
> > I am trying to configure ofbiz for auto parts store. I wish to classify
> > products into two major categories. General category (Wheels for
> > example)
> > and brands (Bridgestone).
> >
> > I am looking sidedeepcategory.bsh, CommonScreens.xml and
> > CategoryWorker.java
> >
> > Guys, i donno the efficient way of doing this .. i am afraid it will be
> > a
> > big mess at the end. Any suggestion will be great.
> >
> > Thanks
> >
> >
> >
>
>

Re: Two root category

Posted by Raj Saini <ra...@gmail.com>.
Divide your product in general categories. And use the parties tab to 
add manufacturer role to a product. You can use get a list of 
manufacturers from the product and role association entity (I don't 
remember exactly but I think it is ProductRole ).

Thanks,

Raj

shristhi sharma wrote:
> I am trying to configure ofbiz for auto parts store. I wish to classify
> products into two major categories. General category (Wheels for example)
> and brands (Bridgestone).
>
> I am looking sidedeepcategory.bsh, CommonScreens.xml and CategoryWorker.java
>
> Guys, i donno the efficient way of doing this .. i am afraid it will be a
> big mess at the end. Any suggestion will be great.
>
> Thanks
>
>