OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Override no_image.png from Product

This topic contains 2 replies, has 2 voices, and was last updated by  HulTh 5 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #32984

    HulTh
    Participant

    Hello,

    are any possibility’s to override the no_image.png from the Product?

    Best regards

    Merlin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #32985

    Andrey Yatsenko
    Moderator

    Hi Merlin,

    Yes it’s possible.

    1) For product view page override OroProductBundle/views/image_macros.html.twig you can do this in application level just by putting file to
    app/Resources/OroProductBundle/views/ folder
    Here at urlFromString function you should replace {% set file = ” %} with your value.

    2) For product grid you need to decorate a listener Oro\Bundle\ProductBundle\EventListener\FrontendProductDatagridListener and set the new value to DEFAULT_IMAGE constant

    2) To override no_image.png at featured categories at any bundle add new layout update yml file at Resources/views/layouts/blank/oro_frontend_root/ with single instruction @setBlockTheme to set new .twig.html file that you should place near the layout update file to override _featured_category_image_widget block, the code there can be like that, depending on a version of orocommerce you use it can be different

    #32986

    HulTh
    Participant

    Hey Andrey,

    i had done it a little bit different but Thanks that helps.

    Best regards

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

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top