Skip to Content
author's profile photo Former Member
Former Member

HOw to get products of a category using OCC v2?

Hi,

I have created a basesite with product catalog and content catalog, I have added three categories and three products in each categories. But I am not able to get any output when I use the URI to get all products for a category https://localhost:9002/rest/v2/base_site/products/search is failing and gives totalcount and totalpages as '0' in JSON result

whereas I am able to get the products for the existing stores like apparel-uk and electronics.

Please help me on this.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 25, 2015 at 08:57 PM

    Hi Rajeen,

    The URI which you're hitting is for searching products from solr , it will not fetch any products for categories. As you've not indexed your products you're not able to fetch any results when you hit it. As the OOTB products have been indexed , you're able to search them.

    Thanks, Sandeep

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2015 at 07:12 AM

    Hi, URL for fetching the products which of specific category

    http://localhost:9001/rest/v2/{baseSiteId}/catalogs/{catalogName}/{catalogVersion}}/categories/{categoryCode}

    FYI

    https://wiki.hybris.com/display/release5/Migrating+to+OCC+v2

    Regards, Chaitanya

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.