嗨,我已经用我的代码获得了完整的缓存缩略图和主图像路径但我想获得相对*图像的完整缓存路径* 也请提出一些想法
<?php
@ob_start();
@session_start();
ini_set('display_errors', 1);
//for order update
include '../../../../app/Mage.php';
Mage::app('default');
echo '<pre>';
if(isset($_REQUEST['productid'])){
$productId = $_REQUEST['productid'];
}else{
$productId = '12402'; // product ID 10 is an actual product, and used here for a test
}
$product = Mage::getModel('catalog/product')->load($productId); //load the product
echo 'product_id '.'=>'.$product->getId().'<br/>';
echo 'created_at '.'=>'.$product->getcreated_at().'<br/>';
echo 'description '.'=>'.$product->getdescription().'<br/>';
echo 'short_description '.'=>'.$product->getshort_description().'<br/>';
echo 'sku'.'=>'.$product->getsku().'<br/>';
'media_gallery'.'=>'.$product->getmedia_gallery().'<br/>';
print_r($product->getmedia_gallery());
?>
<?php
$image = Mage::helper('catalog/image')->init($product, 'image');
$image1 = str_replace('/webApps/migration/productapi/new/','/',$image);
//echo '<img id="image" src="'.$image1.'" />';
echo 'image => '.$image1.'<br/>';
$thumbnail = Mage::helper('catalog/image')->init($product, 'thumbnail');
$thumbnail1 = str_replace('/webApps/migration/productapi/new/','/',$thumbnail);
echo 'thumbnail => '.$thumbnail1.'<br/>';
?>