Ok it works !! Thank you Jacopo !!!!

I only have a question : when a party logged in the ecommerce site, is this 
association generate the ecommerce browse categories with only the categories 
associated with the party  ?

Regards,

Amine



> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Categories/products and parties
> Date: Thu, 17 Jul 2008 14:32:32 +0200
> 
> You should add to the party 10000 the role of CUSTOMER to avoid that  
> error.
> 
> Jacopo
> 
> On Jul 17, 2008, at 2:28 PM, Amine Benkirane wrote:
> 
> >
> >      Hi,
> >
> > I'm customizing, acutally, an OFBiz ecommerce site. For my specific  
> > needs, I want to associates Categories and products with parties.  
> > Basically, I add a party like customerA (partyId = 10000) and I want  
> > that this customer can only visualize (and buy) the categories and  
> > products which are associated to him.
> >
> > I saw that in the Catalog Manager Application when I browsed my  
> > categories and click on one, there is a parties menu. I thought that  
> > can do my need but when I want to associate party to category (I  
> > select customer for the type), I had this error :
> >
> >
> > The Following Errors Occurred:
> >        ERROR:
> > Could not complete the Add Party to Category
> > [file:/C:/Projets_Eclipse/ofbiz-mars/applications/product/script/org/ 
> > ofbiz/product/category/CategoryServices.xml#addPartyToCategory]
> > process [problem creating the newEntity value: Error while inserting:
> > [GenericEntity:ProductCategoryRole][createdStamp,2008-07-17
> > 14:25:46.005(java.sql.Timestamp)][createdTxStamp,2008-07-17
> > 14:25:44.453(java.sql.Timestamp)][fromDate,2008-07-17
> > 14:25:46.005(java.sql.Timestamp)][lastUpdatedStamp,2008-07-17
> > 14:25:46.005(java.sql.Timestamp)][lastUpdatedTxStamp,2008-07-17
> > 14:25:44.453(java.sql.Timestamp)][partyId,10000(java.lang.String)] 
> > [productCategoryId,snackfood_fr(java.lang.String)] 
> > [roleTypeId,CUSTOMER(java.lang.String)]
> > (SQL Exception while executing the following:INSERT INTO
> > OFBIZ.PRODUCT_CATEGORY_ROLE (PRODUCT_CATEGORY_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_CATEGORY_ROLE'  
> > caused
> > a violation of foreign key constraint 'PROD_CRLE_PTYRLE' for key
> > (10000,CUSTOMER). The statement has been rolled back.))]
> >
> > Did I forgot something to do this association betwwen my categories  
> > and parties ?
> >
> > Regards,
> >
> > Amine
> >
> >
> >
> >
> > _________________________________________________________________
> > Votre correspondant a choisi Hotmail, un e-mail ultra sécurisé.  
> > Créez le votre gratuitement !
> > http://www.windowslive.fr/hotmail/default.asp
> 

_________________________________________________________________
Contrôlez les personnes autorisées à parler à vos enfants sur  MSN / Windows 
Live Messenger !
http://www.windowslive.fr/controleparental/default.asp

Reply via email to