I have a Custom module which have customer mapped with certain products , I want to show a custom listing of those products with layered navigation
After Extending product list block in my custom block and changing
public function getLoadedProductCollection()
{
return $this->_getProductCollection()->addAttributeToFilter('sku',array('nin'=> $this->getSku()));
}
On list.phtml
$_productCollection = $block->getLoadedProductCollection();
print_r($_productCollection->getData());
echo"</pre>";
give a Filter collection, But when i Iterate it with
foreach ($_productCollectionTest as $_productTest) {
echo"<pre>";
print_r($_productTest->getData());
echo"</pre>";
}
I get a unfiltered Result