You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Antony Adopo <sa...@gmail.com> on 2013/11/07 23:29:42 UTC

retrieve one specific category

Hello ofbizers,
please. I want to display all products of my "new products"category in my
home page.
So I created a category with "NEW_PRODUCT" as ID.
my problem:
how to retrieve this category and all products members to display in my
home page? I rode doc but methods are not well documented to understand
what method used.

please could you answer me with a code?

thanks

Re: retrieve one specific category

Posted by Jacques Le Roux <ja...@les7arts.com>.
By default the PROMOTIONS caegory is the one you have to associate your product with for them to show on the main page
https://demo-trunk.ofbiz.apache.org/catalog/control/EditCategory?productCategoryId=PROMOTIONS

This is documented in the
https://cwiki.apache.org/confluence/display/OFBENDUSER/Apache+OFBiz+Business+Setup+Guide
section "Catalog, Category, Product Setup", Point 2 of the 2nd list

Note that, like in most case where it's possible in OFBiz, categories are related by graphes not trees, so you can assign many categories to a product to get the wanted effect. This is explained in this section.
I know you speak French, so you can also have a look at something I wrote long ago here http://www.les7arts.com/assist/OFBiz/Creation%20Catalogue%20de%20produits.htm section "Création des Catégories d'articles"

Unfortunately I never completed this work, to few technical audience in France

HTH

Jacques

Antony Adopo wrote:
> Hello ofbizers,
> please. I want to display all products of my "new products"category in my
> home page.
> So I created a category with "NEW_PRODUCT" as ID.
> my problem:
> how to retrieve this category and all products members to display in my
> home page? I rode doc but methods are not well documented to understand
> what method used.
> 
> please could you answer me with a code?
> 
> thanks

Re: retrieve one specific category

Posted by Rishi Solanki <ri...@gmail.com>.
Antony Adopo,

Add your NEW_PRODUCT category to your catalog using the ProdCatalogCategory
as type PCCT_PROMOTION and then use
CatalogWorker.getCatalogPromotionsCategoryId to get the specific category.
Similar is done at the ecommerce home page what Hans suggested. Please let
me know if more information required.

Imac,

That is fine if you don't want to dig into the code as per community
suggestion but you should not comment like this for one who is getting some
time to help someone. It could be rephrase like "Could you please provide
more pointers .... or something like that". It might be possible that Hans
hint give opportunity to someone to get the answers of all of his/her
hidden questions. So please do not reply unnecessarily to a thread to show
your frustration whenever required please resend the your query for further
discussion or clarification.

Everyone on community would be happy to help further.


Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Fri, Nov 8, 2013 at 11:50 AM, Imac <ed...@hotmail.com> wrote:

> Hans,
>
> I follow this list fairly regularly but being a beginner unfortunately I
> can't contribute as much as I would like. However, after reading your
> response, I feel a comment is necessary.
>
> Your response is counter productive at best and completely insulting and I
> would recommend that if this is the most constructive thing you have to
> say, do us a favour and just keep it to yourself.
>
> I'm not sure way you would waste everyones time and inbox space with such
> a useless response. Is it that perhaps you think yourself above helping
> anyone or that we are simply wasting your time by asking such trivial
> questions and that Ofbiz should best be left to great experts like
> yourself?
>
> You are right when you say OpenSource is great. And what makes it great
> is, it is COMMUNITY EFFORT and not just that you can look at the source
> code.
>
> Just my two cents
>
>
>
> On 11/8/13 2:50 AM, "Hans Bakker" <ma...@antwebsystems.com> wrote:
>
> >Hi Antony
> >
> >the really big advantage of open source is that you can see how it is
> >done in the existing application. Study the e-commerce component and
> >find out how the products are displayed on the home page?
> >
> >Do similar with your category or simply re-use the existing code?
> >
> >Regards,
> >Hans
> >
> >-- AntWebsystems.com quality services with competitive rates....
> >
> >
> >
> >On 11/08/2013 05:29 AM, Antony Adopo wrote:
> >> Hello ofbizers,
> >> please. I want to display all products of my "new products"category in
> >>my
> >> home page.
> >> So I created a category with "NEW_PRODUCT" as ID.
> >> my problem:
> >> how to retrieve this category and all products members to display in my
> >> home page? I rode doc but methods are not well documented to understand
> >> what method used.
> >>
> >> please could you answer me with a code?
> >>
> >> thanks
> >>
> >
> >
>
>
>

Re: retrieve one specific category

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, you are right, I try to keep quiet when I have nothing to say, but sometimes you can't resist to send a RTFM.

When for instance it's late and you are stuck with an issue a client is waiting for tomorrow morning, fill your case... ;)

BTW It's good to sentence others, but it's better to help them
I also can feel you had something to say, so you are welcome.

Jacques

On Friday, November 08, 2013 7:20 AM [GMT+1=CET],
Imac <ed...@hotmail.com> wrote:

> Hans,
> 
> I follow this list fairly regularly but being a beginner unfortunately I
> can't contribute as much as I would like. However, after reading your
> response, I feel a comment is necessary.
> 
> Your response is counter productive at best and completely insulting and I
> would recommend that if this is the most constructive thing you have to
> say, do us a favour and just keep it to yourself.
> 
> I'm not sure way you would waste everyones time and inbox space with such
> a useless response. Is it that perhaps you think yourself above helping
> anyone or that we are simply wasting your time by asking such trivial
> questions and that Ofbiz should best be left to great experts like
> yourself?
> 
> You are right when you say OpenSource is great. And what makes it great
> is, it is COMMUNITY EFFORT and not just that you can look at the source
> code.
> 
> Just my two cents
> 
> 
> 
> On 11/8/13 2:50 AM, "Hans Bakker" <ma...@antwebsystems.com> wrote:
> 
>> Hi Antony
>> 
>> the really big advantage of open source is that you can see how it is
>> done in the existing application. Study the e-commerce component and
>> find out how the products are displayed on the home page?
>> 
>> Do similar with your category or simply re-use the existing code?
>> 
>> Regards,
>> Hans
>> 
>> -- AntWebsystems.com quality services with competitive rates....
>> 
>> 
>> 
>> On 11/08/2013 05:29 AM, Antony Adopo wrote:
>>> Hello ofbizers,
>>> please. I want to display all products of my "new products"category in
>>> my
>>> home page.
>>> So I created a category with "NEW_PRODUCT" as ID.
>>> my problem:
>>> how to retrieve this category and all products members to display in my
>>> home page? I rode doc but methods are not well documented to understand
>>> what method used.
>>> 
>>> please could you answer me with a code?
>>> 
>>> thanks

Re: retrieve one specific category

Posted by Imac <ed...@hotmail.com>.
Hans,

I follow this list fairly regularly but being a beginner unfortunately I
can't contribute as much as I would like. However, after reading your
response, I feel a comment is necessary.

Your response is counter productive at best and completely insulting and I
would recommend that if this is the most constructive thing you have to
say, do us a favour and just keep it to yourself.

I'm not sure way you would waste everyones time and inbox space with such
a useless response. Is it that perhaps you think yourself above helping
anyone or that we are simply wasting your time by asking such trivial
questions and that Ofbiz should best be left to great experts like
yourself?

You are right when you say OpenSource is great. And what makes it great
is, it is COMMUNITY EFFORT and not just that you can look at the source
code.

Just my two cents 



On 11/8/13 2:50 AM, "Hans Bakker" <ma...@antwebsystems.com> wrote:

>Hi Antony
>
>the really big advantage of open source is that you can see how it is
>done in the existing application. Study the e-commerce component and
>find out how the products are displayed on the home page?
>
>Do similar with your category or simply re-use the existing code?
>
>Regards,
>Hans
>
>-- AntWebsystems.com quality services with competitive rates....
>
>
>
>On 11/08/2013 05:29 AM, Antony Adopo wrote:
>> Hello ofbizers,
>> please. I want to display all products of my "new products"category in
>>my
>> home page.
>> So I created a category with "NEW_PRODUCT" as ID.
>> my problem:
>> how to retrieve this category and all products members to display in my
>> home page? I rode doc but methods are not well documented to understand
>> what method used.
>>
>> please could you answer me with a code?
>>
>> thanks
>>
>
>



Re: retrieve one specific category

Posted by Hans Bakker <ma...@antwebsystems.com>.
Hi Antony

the really big advantage of open source is that you can see how it is 
done in the existing application. Study the e-commerce component and 
find out how the products are displayed on the home page?

Do similar with your category or simply re-use the existing code?

Regards,
Hans

-- AntWebsystems.com quality services with competitive rates....



On 11/08/2013 05:29 AM, Antony Adopo wrote:
> Hello ofbizers,
> please. I want to display all products of my "new products"category in my
> home page.
> So I created a category with "NEW_PRODUCT" as ID.
> my problem:
> how to retrieve this category and all products members to display in my
> home page? I rode doc but methods are not well documented to understand
> what method used.
>
> please could you answer me with a code?
>
> thanks
>