Or even in the simple content, supporting variant
products would require the one:many, many:many
relationship as well

--- Chris Howe <[EMAIL PROTECTED]> wrote:

> I don't think it's as aparent with OFBiz's use of
> description, longDescription, etc as those will all
> basically have one to one relationships between
> product and primary content and in turn the primary
> content will have a one to one relationship with the
> alternate_locale.
> 
> Because it's all one to one, you could feasibly
> eliminate the primary content.  However, when you
> get
> into more advanced product content like taglines, or
> product warnings or satisfaction gaurantee
> statements
> you're going to need content:product - one:many and
> many:many relationships.
> 
> Restricting the description, longDescription to the
> approach David suggested makes it much easier than
> handling two seperate approaches that do the same
> thing.
> 
> --- Si Chen <[EMAIL PROTECTED]> wrote:
> 
> > By the way, David - how does having multiple
> > Contents associated with  
> > primary Content as ALTERNATE_LOCALE give more
> > flexibility than just  
> > associating multiple Content with the Product? 
> > Sorry but I don't  
> > quite see it.
> > 
> > Si
> > 
> > Begin forwarded message:
> > 
> > > From: "David E. Jones (JIRA)" <[EMAIL PROTECTED]>
> > > Date: August 21, 2006 9:58:15 AM PDT
> > > To: [email protected]
> > > Subject: [jira] Commented: (OFBIZ-161) Fix
> > contentwrapper locale  
> > > rendering bug
> > > Reply-To: [email protected]
> > >
> > >     [
> > http://issues.apache.org/jira/browse/OFBIZ-161? 
> > > page=comments#action_12429458 ]
> > >
> > > David E. Jones commented on OFBIZ-161:
> > > --------------------------------------
> > >
> > > Please don't commit this.
> > >
> > > The pattern this uses points to multiple
> > ProductContent records for  
> > > different locales and is not how the Content and
> > related entities  
> > > are meant to be used.
> > >
> > > There should be a single Content record that is
> in
> > turn related to  
> > > other content records through ContentAssoc using
>  
> > > contentAssocTypeId="ALTERNATE_LOCALE".
> > >
> > > Pointing to a single Content record that is in
> > turn related to  
> > > alternate locale content pushes the logic and
> > structure back into  
> > > the content area which makes it more re-usable,
> > and easier to multi- 
> > > purpose the content.
> > >
> > >> Fix contentwrapper locale rendering bug
> > >> ---------------------------------------
> > >>
> > >>                 Key: OFBIZ-161
> > >>                 URL:
> > http://issues.apache.org/jira/browse/OFBIZ-161
> > >>             Project: OFBiz (The Open for
> Business
> > Project)
> > >>          Issue Type: Bug
> > >>          Components: product
> > >>            Reporter: Si Chen
> > >>         Attachments:
> content-wrapper-locale.patch
> > >>
> > >>
> > >> Wanted to check with everybody before
> committing
> > this to make sure  
> > >> I'm not going down the wrong way.
> > >> It seems to me that you should be able to
> create
> > content for  
> > >> products and categories in different languages
> in
> > the Catalog  
> > >> Manager by clicking on the [Content] tab of
> > Product or Category,  
> > >> then click on [Prepare Create] for say,
> > Description or Long  
> > >> Description.  Then you should be able to enter
> a
> > locale, and that  
> > >> content should be the one for that language
> > locale.  However, the  
> > >> Product and Category ContentWrappers were not
> > rendering them.
> > >> After a little digging, it seemed to me the
> > problem was that they  
> > >> were both looking for the ProductContent and  
> > >> ProductCategoryContent entities, then getting
> the
> > first and most  
> > >> recent record of each as the Content to render.
> 
> > There was no  
> > >> filtering of locale of the Content
> entity--hence
> > no way to control  
> > >> which locale was being rendered.
> > >> I made this little patch to change the lookup
> to 
> > 
> > >> ProductContentAndInfo and the comparable
> > Categoryentity.  It   
> > >> fixed it for me, so now I can enter English as
> > en_US and French as  
> > >> fr_FR, and the content for those languages
> would
> > render separately.
> > >> However, one problem is that this content
> lookup
> > is very strict -  
> > >> if you create your content as en, it will not
> > find it as en_US, or  
> > >> vice versa.
> > >> Is this the right way to use the content
> manager?
> > >> Is there a way to make it so that en_ will work
> > for en_US--other  
> > >> than some fancier searching technique?
> > >
> > > -- 
> > > This message is automatically generated by JIRA.
> > > -
> > > If you think it was sent incorrectly contact one
> > of the  
> > > administrators:
> > http://issues.apache.org/jira/secure/ 
> > > Administrators.jspa
> > > -
> > > For more information on JIRA, see:
> > http://www.atlassian.com/ 
> > > software/jira
> > >
> > >
> > 
> > 
> 
> 

Reply via email to