문제

How can I choose multiple products by SKU in a widget?

도움이 되었습니까?

해결책

The best way would be to use the Conditions class that is used for the Catalog Product List widget. Code can be found in vendor/magento/module-catalog-widget/etc/widget.xml but the main bit you need is:

<parameter name="condition" xsi:type="conditions" visible="true" required="true" sort_order="10"
           class="Magento\CatalogWidget\Block\Product\Widget\Conditions">
    <label translate="true">Conditions</label>
</parameter>

You could then choose something like I've done in the image below and would have the flexibility to filter by other attributes if you wanted to.

Choose multiple SKUs

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top