Home  >  Q&A  >  body text

Shopware 6 Administration: Reading listFilterOptions() of SwProductList from Custom Plugin Component

Version Shopware 6.4.20

My custom plugin imports a component by overriding SwProductDetail. Imported components require the filterOptions of SwProductList.

How to read the list of SwProductList in the above component?

P粉615829742P粉615829742375 days ago393

reply all(1)I'll reply

  • P粉005105443

    P粉0051054432023-09-19 17:59:45

    // myComponent.js
    
    ...
    const fnFilterOptions = Shopware.Component.getComponentRegistry().get('sw-product-list').computed.listFilterOptions;
    const filters = fnFilterOptions.call(this)
    ...

    reply
    0
  • Cancelreply