I have a problem. I created a widget where inside <parameters> I have a field with conditions.

<parameter name="products" xsi:type="conditions" visible="true" required="true" sort_order="1"
    <label translate="true">Products</label>

I also have other fields in there and I pull them out using $block->getData('name of data');. And this is where the problem arises. In this conditions I set if is one of and I want to pull it in phtml using $block->getData('products') then I get this error main.CRITICAL: Notice: Trying to access array offset on value of type null.

I expected to get an array with values indicated inside this conditions e.g. there are 6 products selected by SKU. And I wanted to get an array of these SKUs. How to do it? Help please.

enter image description here


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.

Browse other questions tagged or ask your own question.