How do i hide products on the home page only that have no image
-
30-09-2020 - |
문제
I am looking for a way to hide all products that have no images on the home page only, whilst i do have image place overs setup with my logo, it just does not look right. I use a data content provider where products get imported on a daily basis and when new products are imported it takes some time for the data and images to show.
해결책
As option, use observer for event controller_action_layout_load_before. In observer check controller and route names like this
if(Mage::app()->getRequest()->getControllerName()=='page' && Mage::app()->getRequest()->getRouteName()='cms')
and after filter collection
$collection->addAttributeToFilter('small_image', array('neq' => "no_selection"));
제휴하지 않습니다 magento.stackexchange