OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform How to delete YourPrice from frontend's product-search-grid?

This topic contains 5 replies, has 2 voices, and was last updated by  Frank 2 months, 3 weeks ago.

  • Creator
    Topic
  • #40236

    Frank
    Participant

    Hi there,

    I want to show visitors (who has been NOT LOGGED IN), listed price only.

    How to remove ‘YourPrice’-listing from Product-search-frontend for them?

    Thanks
    Frank

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

    Hi Frank,

    You have to add the layout update in
    {BundleName}/Resources/views/layouts/blank/imports/oro_product_price/hide_your_price.yml
    with the content

    And additionally, override the js view used for frontend price rendering vendor/oro/commerce/src/Oro/Bundle/PricingBundle/Resources/public/js/app/views/list-item-product-prices-subview.js
    In the overridden view you have to remove this if https://github.com/oroinc/orocommerce/blob/master/src/Oro/Bundle/PricingBundle/Resources/public/js/app/views/list-item-product-prices-subview.js#L103-L105 as the current JS view doesn’t work when your price is removed.
    Here we have an example of overriding similar JS files https://github.com/oroinc/orocommerce-sample-extensions/blob/master/src/Demo/Bundle/PricingBundle/Resources/views/layouts/default/config/requirejs.yml

    #40252

    Frank
    Participant

    Hi Andrey,

    thanks a lot.

    Content, you suggested above for
    {BundleName}/Resources/views/layouts/blank/imports/oro_product_price/hide_your_price.yml

    is empty???

    May be, I am wrong .. but how this should work?

    Thanks
    Frank

    #40254
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    Sorry for that, I fixed the comment, looks like there is an issue with the editor in the forum.

    #40255

    Frank
    Participant

    Great!

    You help me a lot, really!

    Kind regards
    Frank

    #40256

    Frank
    Participant

    Final statement:
    It works like a clockwerk!

    Learned a lot. Thanks.
    Frank.

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

You must be logged in to reply to this topic.

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

Yes No