When you enter /admin/catalog/product/ - products grid is fetched from /admin/mui/index/render/?namespace=product_listing&filters[placeholder]=true&filters[store_id]=1&paging[pageSize]=20&paging[current]=1&sorting[field]=entity_id&sorting[direction]=asc&isAjax=true (this URL is generated by JS).

Need method to pass the request variable to the URL responsible for loading products grid. I mean that entering: /admin/catalog/product/whatever/123/ will fetch data grid from URL /admin/mui/index/render/?namespace=product_listing&filters[placeholder]=true&filters[store_id]=1&paging[pageSize]=20&paging[current]=1&sorting[field]=entity_id&sorting[direction]=asc&whatever=123&isAjax=true

I tried to change XML config for:

<item name="imports" xsi:type="array"> <item name="exports" xsi:type="array">

But it doesn't affect the URL structure. Do you have any clear ideas for resolving the problem?

  • Did you get solution for this case? May 27, 2017 at 10:28
  • I didn't solved this in magento way however I've added JS file that is copy of module responsible for search - this fetches URL and passes variable to "chips" - that Magento by default uses for building URL. (view/base/web/js/grid/vendor/variable.js). If I find any better solution - I'll submit it as resolution.
    – Łukasz
    May 28, 2017 at 20:47
  • I got a solution here : magento.stackexchange.com/a/155316/34070 May 29, 2017 at 8:53
  • Already knew this solution - and (at least on 2.1.2) it didn't work as expected.
    – Łukasz
    May 29, 2017 at 10:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.