daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Jul 17th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top