I have 50k products in my website and want update tier price . i have existing tier price for products, but based on existing product price i need to update customer price.
i have created external root file and created one function.
like in magento1 i did
$products = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('id') ->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', 4) ->addAttributeToSort('created_at', 'desc'); Mage::getSingleton('core/resource_iterator')->walk( $products->getSelect(), array(array($this, '_Callback')),array() );
same thing i want with magento2 how to possible with magento2 collection, i want only call _Callback function with magento2 product collection so that it can work collection walk iteratorly.
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$productcollection = $productCollection->addAttributeToSelect('name')->addAttributeToSelect('price')->addAttributeToSelect('entity_id')->setOrder('entity_id','ASC')->load();
Please give me solution.