ssossossossosso

Forums

Forums OroCommerce Display product list in frontend in mode no-image-view

This topic contains 3 replies, has 3 voices, and was last updated by  Merlin 1 month ago.

  • Creator
    Topic
  • #33315

    msalmi.kais
    Participant

    Application and environment details:
    Product: OroCommerce Version:1.4
    Operating system : Ubuntu 16.04 Server (64 bits)
    Web server name : Apache 2.4.7
    Database server : MySQL 5.5.57
    PHP version: 7.1

    Hello,
    how to display product list in frontend in mode {“row-view” mode: “no-image-view”} by default

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #33340

    mmiasnikov
    Moderator

    Hello, Msalmi.kais.

    At the moment there is no possibility to configure this parameter in UI. So, to achieve this goal, you have to make some customisation code. Namely:

    The default frontend grid view theme at the moment defined in the \Oro\Bundle\ProductBundle\DataGrid\DataGridThemeHelper::getDefaultView() method. So, to change the default view of frontend product grid you have to make the following in your own bundle:

    1) Create your own YourDataGridThemeHelper class, inherited from \Oro\Bundle\ProductBundle\DataGrid\DataGridThemeHelper

    2) Redefine getDefaultView() method to get self::VIEW_LIST mode (instead of current self::VIEW_GRID)

    3) Decorate ‘oro_product.datagrid_theme_helper’ service with your new YourDataGridThemeHelper class (for detailed description of Symfony service decoration, please, see How To Decorate Services article).

    #33343

    msalmi.kais
    Participant

    Thank’s for help

    #33355

    Merlin
    Participant

    This Work for us:
    services.yml

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

You must be logged in to reply to this topic.