Ok. I don't want a special category( ex :PCCT_PROMOTIONS). I want all 
categories. So, regarding the code below, it's meant that  
"prodCatalogCategoryTypeId" should be empty to get all categories instead of 
specific categories"pcct"

Secondly, where "Pcct -xxxxxxxxx" comes from or what it means? I search it in 
ofbiz and catalog manager but I don't find it.

<code>
public static List getProdCatalogCategories(ServletRequest request, String 
prodCatalogId, String prodCatalogCategoryTypeId) {
        GenericDelegator delegator = (GenericDelegator) 
request.getAttribute("delegator");
        return getProdCatalogCategories(delegator, prodCatalogId, 
prodCatalogCategoryTypeId);
    }

    public static List getProdCatalogCategories(GenericDelegator delegator, 
String prodCatalogId, String prodCatalogCategoryTypeId) {
        try {
            List prodCatalogCategories = 
EntityUtil.filterByDate(delegator.findByAndCache("ProdCatalogCategory",
                        UtilMisc.toMap("prodCatalogId", prodCatalogId),
                        UtilMisc.toList("sequenceNum", "productCategoryId")), 
true);

            if (UtilValidate.isNotEmpty(prodCatalogCategoryTypeId) && 
prodCatalogCategories != null) {
                prodCatalogCategories = 
EntityUtil.filterByAnd(prodCatalogCategories,
                            UtilMisc.toMap("prodCatalogCategoryTypeId", 
prodCatalogCategoryTypeId));
            }
            return prodCatalogCategories;
        } catch (GenericEntityException e) {
            Debug.logError(e, "Error looking up ProdCatalogCategories for 
prodCatalog with id " + prodCatalogId, module);
        }
        return null;
    }
</code>

-----Message d'origine-----
De : "Harsha Chadhar" <harsha.chad...@tcs.com>
Envoyé : ‎08/‎10/‎2013 10:26
À : "user@ofbiz.apache.org" <user@ofbiz.apache.org>
Cc : "user@ofbiz.apache.org" <user@ofbiz.apache.org>
Objet : RE: list of categories of a given catalog

Please check the method again, it takes catalog Id and returns category 
list. 

For a given  productCatalogId(assuming that you have Catalog details), and 
a prodCatalogCategoryTypeId (can have possible values like PCCT_QUICK_ADD, 
PCCT_PROMOTIONS, PCCT_PURCH_ALLW, PCCT_SEARCH, PCCT_VIEW_ALLW et), 
getProdCatalogCategories() method returns the list of associated 
categories.

-
Harsha 



From:
Antony ADOPO <saius...@gmail.com>
To:
"user@ofbiz.apache.org" <user@ofbiz.apache.org>
Date:
10/08/2013 12:28 PM
Subject:
RE: list of categories of a given catalog



Yes, I saw it.
But "getProdCatalogCategories" permits apparently to take list of product 
for a given category we specify on parameters of this method. I need list 
of categories for a given catalog
Thanks for getStoreCatalogs
 please, help!

-----Message d'origine-----
De : "Harsha Chadhar" <harsha.chad...@tcs.com>
Envoyé : ‎08/‎10/‎2013 07:43
À : "user@ofbiz.apache.org" <user@ofbiz.apache.org>
Cc : "user@ofbiz.apache.org" <user@ofbiz.apache.org>
Objet : Re: list of categories of a given catalog

Hi,
Please refer to CatalogWorker.java for methods : getProdCatalogCategories
() and  getStoreCatalogs().

-Harsha 




From:
Antony Adopo <saius...@gmail.com>
To:
user@ofbiz.apache.org
Date:
10/08/2013 03:22 AM
Subject:
list of categories of a given catalog



Hello Ofbizers,

I hope that you're well

Please, could someone help me gettin the list of categories for a given
catalog . And in the context the list of cataglog for a given store?

I need it because in my home page, I want to print categories for a given
cataglog (like clothes collections) and their related image.

Thanks


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you





Reply via email to