OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Product attribute value in the category page

This topic contains 2 replies, has 2 voices, and was last updated by  Ryan Hoang 6 months ago.

  • Creator
    Topic
  • #37615

    Ryan Hoang
    Participant

    Hello,

    How to get the product attribute value in the category page ?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #37631
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    The category page is also known as a product listing page use search engine to render the datagrid with products.
    The is a requirement to render attribute on the product listing page – the attribute should be searchable, you can define this behavior during attribute creation
    There are 2 ways to add a column to the datagrid, first an easy one:
    Create a file “/Resources/config/oro/datagrids.yml” in your bundle and define new column there, first by adding to the search query
    for example:

    Another, more complex but flexible option is to use the datagrid listener

    #37633

    Ryan Hoang
    Participant

    Hello Andrey Yatsenko,

    I will try it.

    Thanks you so much.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No