Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', 1);
- ?>
- <?php
- require_once 'app/Mage.php';
- Mage::app();
- $copypasta = <<< EOC
- <<< EOC
- SKU!
- SKU@
- SKU#
- EOC;
- $skus = explode(PHP_EOL, $copypasta);
- foreach ($skus as $prod) {
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $prod);
- if($product && $product->load('media_gallery')) {
- foreach ($product->getMediaGalleryImages() as $image)
- {
- $file_name = $image->getFile();
- echo "URL" . $file_name;
- echo "#";
- }
- }
- echo "<br/>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement