How do enable the RADIO BUTTONS in a bulk upload ..please SEE ATTACHED IMAGE!
I am able to upload everything but cant seem to figure out how to enable those buttons.
Thank You
I’m having this same issue. Import goes well with all data, but the No image radio buttons are checked on import. Why is defaulting to have no image? I could manually go through and check all of the radio buttons, but it would take quite a long time.
Any help would be very much appreciated.
Here is a sample of the import csv i used. Its about all i have left hanging around. Haven’t really messed with Magento in a while. I think i had the same issue, also. I had to set the store field to admin and status field has to be Enabled. Hope this helps.
Thank you, I figured this out last night after much trial and error. I compared some of my other imports that had been successful and realized that I needed to change the store to admin. While I’m glad this worked, what a pain that it wouldn’t check off the radio buttons automatically when you import pictures to a store view. This is very frustrating and I think it probably needs to be considered a bug. I loath to think of when I want to import to a store view . . . maybe I’m missing something here.
This will basically download the images record by record to the ‘/media/import’ directory and import the image when you run the Import All Products profile.
I use the following field names for the image fields and populate them with the appropriate urls: image, small_image, thumbnail
Open ‘/httpdocs/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php’ and change the following code:
Now just run the regular product import profile and import the csv with the urls for the image fields.
If someone can make these changes w/o modifying the core Magento code, please do so and let me know how.
Does this mean that the image is copied from the remote url to your own magento server? (So you only have to import the remote urls for each product once and if the remote url was deleted the images will still remain on your own server?)
Does this mean that the image is copied from the remote url to your own magento server? (So you only have to import the remote urls for each product once and if the remote url was deleted the images will still remain on your own server?)
Or does this code make a link to the remote url?
Yes, the image is copied to your server. You would have to manually delete the images if you didn’t need them after importing. The import does overwrite an image if an image with the same name already exists.
After the import all the images without spaces copied over and are working great. But images with spaces are being copied to the server with the spaces replaced with underscores and they are empty image files.
For anyone trying to use my method, unless you just need to copy the images locally to your server, a better method is posted here. I haven\’t tested it, but it sounds like a much better idea.
After the import all the images without spaces copied over and are working great. But images with spaces are being copied to the server with the spaces replaced with underscores and they are empty image files.
OK. I added the code to the new 1.5.0.1 ver. of Magento and successfully ran some imports. I also fixed the issue with having spaces in the names of the urls.
Here’s what to do:
In ‘app\code\core\Mage\Catalog\Model\Convert\Adapter\Product.php’ beginning on line 691
Replace this
foreach ($product->getMediaAttributes() as $mediaAttributeCode => $mediaAttribute) { if (isset($importData[$mediaAttributeCode])) { $file = $importData[$mediaAttributeCode]; if (trim($file) && !$mediaGalleryBackendModel->getImage($product, $file)) { $arrayToMassAdd[] = array('file' => trim($file), 'mediaAttribute' => $mediaAttributeCode); } } }
With this
foreach ($product->getMediaAttributes() as $mediaAttributeCode => $mediaAttribute) { if (isset($importData[$mediaAttributeCode])) { $file = $importData[$mediaAttributeCode]; if (trim($file) && !$mediaGalleryBackendModel->getImage($product, $file)) { // Start Of Code To Import Images From Urls $path_parts = pathinfo($file); $html_filename = DS . $path_parts['basename']; $fullpath = Mage::getBaseDir('media') . DS . 'import' . $html_filename; $ch = curl_init(str_replace(" ","%20",$file)); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); $rawdata=curl_exec($ch); curl_close ($ch); if(file_exists($fullpath)) { unlink($fullpath); } $fp = fopen($fullpath,'x'); fwrite($fp, $rawdata); fclose($fp); $arrayToMassAdd[] = array('file' => trim($html_filename), 'mediaAttribute' => $mediaAttributeCode); // End Of Code To Import Images From URLs } } }
OK. I added the code to the new 1.5.0.1 ver. of Magento and successfully ran some imports. I also fixed the issue with having spaces in the names of the urls.
Here’s what to do:
In ‘app\code\core\Mage\Catalog\Model\Convert\Adapter\Product.php’ beginning on line 691
Replace this
foreach ($product->getMediaAttributes() as $mediaAttributeCode => $mediaAttribute) { if (isset($importData[$mediaAttributeCode])) { $file = $importData[$mediaAttributeCode]; if (trim($file) && !$mediaGalleryBackendModel->getImage($product, $file)) { $arrayToMassAdd[] = array('file' => trim($file), 'mediaAttribute' => $mediaAttributeCode); } } }
With this
foreach ($product->getMediaAttributes() as $mediaAttributeCode => $mediaAttribute) { if (isset($importData[$mediaAttributeCode])) { $file = $importData[$mediaAttributeCode]; if (trim($file) && !$mediaGalleryBackendModel->getImage($product, $file)) { // Start Of Code To Import Images From Urls $path_parts = pathinfo($file); $html_filename = DS . $path_parts['basename']; $fullpath = Mage::getBaseDir('media') . DS . 'import' . $html_filename; $ch = curl_init(str_replace(" ","%20",$file)); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); $rawdata=curl_exec($ch); curl_close ($ch); if(file_exists($fullpath)) { unlink($fullpath); } $fp = fopen($fullpath,'x'); fwrite($fp, $rawdata); fclose($fp); $arrayToMassAdd[] = array('file' => trim($html_filename), 'mediaAttribute' => $mediaAttributeCode); // End Of Code To Import Images From URLs } } }
Hi,
I buy the modul and it\’s working fine. But now I have a problem with Magenot Lightbox extention -> I can not \"exlude\" images and they are appeared twice .
Any help pleasee.
Hi,
I buy the modul and it\’s working fine. But now I have a problem with Magenot Lightbox extention -> I can not \"exlude\" images and they are appeared twice .
Any help pleasee.
Thanks for the feedback Lukso. It’s surprising that noone has noticed this yet. We’re working on a fix for it. Should be completed by today.
At this very moment I use the solution that Jackiellowery gave. Although it works great, I have the following problem…
Jackiellowery\’s code copies the images from the remote url to the media/catalog/product directory on our magento server. Because we have about 20.000 products, the server get\’s full. Hiring a bigger server would be too expensive.
But the disadvantage of that solution is, you have to edit every single file where images are being displayed. And there are a lot of files where images are being displayed (view, list, upsell, crosssell, relative, compare, cart, search, etc etc etc..... and don\’t forget all blocks!)
That\’s why I\’m figuring.. would it be possible to alter the app>code>core in such a way, that you don\’t have to edit al those files???
I already gave it a shot, but I got stuck. This is what I figured out… (I use magento 1.5 by the way)
In template>catalog>product>view.phtml it calls the image box with:
<?php echo $this->getChildHtml(\'media\') ?>
In template>catalog>product>view>media.phtml it calls the image with:
if ($imageFile) { $this->setImageFile($imageFile); } else { // add for work original size $this->_getModel()->setBaseFile( $this->getProduct()->getData($this->_getModel()->getDestinationSubdir()) ); } return $this; }
This redirects to the function “setBaseFile” in app>code>core>Mage>Catalog>Model>Product>Image.php
public function setBaseFile($file) { $this->_isBaseFilePlaceholder = false;
if ($imageFile) { $this->setImageFile($imageFile); } else { // add for work original size $this->_getModel()->setBaseFile( $this->getProduct()->getData($this->_getModel()->getDestinationSubdir()) ); } return $this; }
This redirects to the function “setBaseFile” in app>code>core>Mage>Catalog>Model>Product>Image.php
public function setBaseFile($file) { $this->_isBaseFilePlaceholder = false;