
If you Have Product Name and get product details for import product csv use this. Create php file and put code
<?php require_once '../app/Mage.php'; Mage::app(); $row = 1; echo '
‘; if (($handle = fopen(“Yourcsvname.csv”, “r”)) !== FALSE) { while (($data = fgetcsv($handle, 1000, “,”)) !== FALSE) { $num = count($data); //echo ” $num fields in line $row: n”; $row++; for ($c=0; $c < $num; $c++) { echo ”; echo ‘”; $product_collection = Mage::getResourceModel(‘catalog/product_collection’) ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘name’,$data[$c]) ->load(); foreach ($product_collection as $product) { echo ‘”; //exit; } echo ”; } } fclose($handle); } echo ‘
‘.$data[$c]. “ | ‘.$product->getSku() . “ |
‘; ?>
After this same location put your CSV File. In csv File your product Name must be compulsory and save this. You Get your csv product all Details.
About Author:
Kalpesh Chavada
Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.
