Created
August 16, 2018 17:04
-
-
Save mokanfar/f12ded0d582fc0554a7f233764cad5f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
//to overwrite limit but you need first to increase your memory limit | |
$collection = Mage::getModel('catalog/product')->getCollection() | |
->addAttributeToSelect('*') // select all attributes | |
->setPageSize(5000) // limit number of results returned | |
->setCurPage(1); // set the offset (useful for pagination) | |
// we iterate through the list of products to get attribute values | |
foreach ($collection as $product) { | |
//customer group id 1 price as follows: | |
$product->setCustomerGroupId(1); | |
echo $product->getSku(); | |
echo ','; | |
echo (float) $product->getFinalPrice(); //get price as cast to float | |
echo '<br />'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment