1

this is condition rule

I want to add condition rule in the collection product. How to do that. Hope someone help me.[![

public function getLoadedProductCollection()
{
        $this->_limit = (int) $this->getWidgetCfg('limit');
        $type = $this->getTypeFilter();
        $fn = 'get' . ucfirst($type) . 'Products';
        $collection = $this->{$fn}();
        if ($this->_stockConfig->isShowOutOfStock() != 1) {
            $this->_stockFilter->addInStockFilterToCollection($collection);

        }
        $this->_eventManager->dispatch(
            'catalog_block_product_list_collection',
            ['collection' => $collection]
        );

    $conditions = $this->getConditions();
    $conditions->collectValidatedAttributes($collection);
    $this->sqlBuilder->attachConditionToCollection($collection, 
    $conditions);

    return $collection;
}

]2]2 [this is collection]3

this is the product.I did insert in home page

this is an error

0

Your Answer

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

Browse other questions tagged or ask your own question.