OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions How do i change the Ecommerce Statistics information to a specific user?

This topic contains 2 replies, has 3 voices, and was last updated by sfcable4seo sfcable4seo 1 year, 5 months ago.

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

  • Creator
  • #29658


    Hi everyone!
    I wonder how i can change the Ecommerce Statistics widget so it only shows the information that the seller is responsible for.

    We have Magento integrated with OROcrm.
    In Magento on the “Order” page we have a column that says “Sellers”. Our sellers use the dropdown menu to select themself as the seller and we can then filter it so the seller can see how much he/she has sold for.

    I want the seller to be able to see this info on the Ecommerce Statistics widget.

    Does anyone have an ide on how to fix this?
    At the moment we only get all the orders but i would like to sort it up so the seller can view their own orders in Ecommerce Statistics widget.

    Thank you and have a nice day!

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

    Yurii Muratov

    Hello, oliver3.

    To do this, you can create your own widget based on the Ecommerce Statistics widget and modify queries that select data.

    For example, if MagentoOrder entity have one-to-many relation to user and this relation called sellers, the code you have to implement may be the next:

    – create own class MagentoSellerBigNumberProvider that extends MagentoBigNumberProvider in your bundle (in my example i use Acme\DemoBundle):

    At this class i rewrite some of metrics methods from the parent class and add the limitation on seller relation with addSellerLimitationToQuery function.

    – register this class as new big number (the type of widget) provider. In my example, the alias of this provider will be magento_seller:

    – Add new widget declaration in dashboards.yml file. This widget is a copy of big_numbers_widget widget but with another label and data_provider parameters in items:

    – Clear the cache.

    After that, you will be able to add new widget with title Ecommerce Seller statistics at your dashboard as well as standart Ecommerce Statistics widget.



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

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

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

Yes No