Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <pre>
  2. <?php
  3.  
  4. require_once 'app/Mage.php';
  5. umask(0);
  6. Mage::app('default');
  7.  
  8. function productCallback($args)
  9. {
  10. $product = Mage::getModel('catalog/product');
  11. $product->setData($args['row']);
  12. echo $args['arg1'] . "\n";
  13. echo $product->getId()."\n";
  14. print_r( $product->debug() );
  15. echo "\n";
  16. }
  17.  
  18. $products = Mage::getModel('catalog/product')->getCollection()
  19. ->addAttributeToSelect('id')
  20. ->addAttributeToSelect(array('meta_keyword','meta_description','meta_title'), 'inner');
  21.  
  22. Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('productCallback'), array('arg1' => '===='));
  23.  
  24. ?>
  25. </pre>
Add Comment
Please, Sign In to add comment