How to get full product image url in magento ,i need to migrate the data from magento to django so i need to get the product full image url to migrate the site
here is my code
<?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{
echo 'Default Product => ';
$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
print_r($product->getthumbnail());<br/>
print_r($product->getcreated_at());
?>
“get product image woocommerce” Code Answer's php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ), 'single-post-thumbnail' );?>
Try this
$product = Mage::getModel('catalog/product')->load($product_id);
$full_path_url = Mage::helper('catalog/image')->init($product, 'thumbnail');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With