Guest User

Untitled

a guest
Mar 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. $collection = $productCollection->create()
  2. ->addAttributeToSelect('*') >addAttributeToFilter('status',MagentoCatalogModelProductAttributeSourceStatus::STATUS_DISABLED)
  3. ->addAttributeToFilter('small_image', array('neq' => "no_selection"));
  4.  
  5.  
  6. $collectionCount = $collection->count();
  7. var_dump($collectionCount); //Get Collection Count
  8.  
  9. // Print Product Name
  10. foreach ($collection as $product){
  11. echo 'Name = '.$product->getName().'<br>';
  12. }
Add Comment
Please, Sign In to add comment