Topic
  • 2 replies
  • Latest Post - ‏2013-09-02T11:04:15Z by Sodi83
Sodi83
Sodi83
47 Posts

Pinned topic How to get product category ID in product JSP page?

‏2013-07-12T15:45:58Z |

Dear All,

after rewriting products URLs for SEO purposes, I am not able to display the product category in the breadcrumb of product page, cause WCParam.categoryId is now empty in product page.

Is there a way, having storeId, catalogId, and productId, to get the categoryId, so that I can use it instead of WCParam.categoryId in my breadcrumb fragment in product page?

Is there a cleaner solution?

Thank you in advance,

Mirco

  • Sodi83
    Sodi83
    47 Posts
    ACCEPTED ANSWER

    Re: How to get product category ID in product JSP page?

    ‏2013-09-02T11:04:15Z  
    • Sodi83
    • ‏2013-07-22T09:22:22Z

    Nobody help? :-(

    Solved by adding categoryId entry in WCParam map via JSTL at the top of ProductDisplay.jsp.

    WCParam.categoryId value was set equal to the value of the available categoryId variable.

    Hope this could be helpful to someone.

    Thanks anyway,

    Mirco

  • Sodi83
    Sodi83
    47 Posts

    Re: How to get product category ID in product JSP page?

    ‏2013-07-22T09:22:22Z  

    Nobody help? :-(

  • Sodi83
    Sodi83
    47 Posts

    Re: How to get product category ID in product JSP page?

    ‏2013-09-02T11:04:15Z  
    • Sodi83
    • ‏2013-07-22T09:22:22Z

    Nobody help? :-(

    Solved by adding categoryId entry in WCParam map via JSTL at the top of ProductDisplay.jsp.

    WCParam.categoryId value was set equal to the value of the available categoryId variable.

    Hope this could be helpful to someone.

    Thanks anyway,

    Mirco