Concerning categories: Is it possible to deal with subcategories? A typical scenario is where I have Mens and Womens as subcategories in several other categories...how do we work this without using category_ids?
Concerning categories: Is it possible to deal with subcategories? A typical scenario is where I have Mens and Womens as subcategories in several other categories...how do we work this without using category_ids?
Grrreat work!
please see to _addCategories (I explain it before) This function explode first by slash “/” then by comma “,”
but is there a delimiter for associated products? So do I do something like “Normal”,"price", “associated-Sku1, associated-Sku2”
Or do i make a sepreate line in the csv for each one?
**Never mind. I found the example CSV file from page 2. RTFM
Im trying to use this script and every time I try to run the advanced profile I get an error
# Skip import row, required field “short_description” for new products not defined
Im wondering if anyone else has experienced this and what I can do about it? I attempted to add a field short_description to the end of the csv lines but to no avail.
Hi guys,
I am using Antonios script to import around 18000 records to Magento - at least I am trying to. It doesn’t really work the way I want because of the memory leak which is hidden somewhere within the Magento API and the script fails at 128 MB (or 256 MB respectively). I know that this is not a new discovery but I still wanted to ask how you get around that problem. Raising the PHP memory limit doesn’t seem to be a reasonable option.
Are you doing the import in several steps (files)?
Cheers, Lars_Stecken
I have a weird warning when i try to import a csv:
Just after: Starting catalog/convert_adapter_productimport :: parse
Warning: unlink(/var/www/vhosts/xxxxx.xxx/httpdocs/media/catalog/product/) [function.unlink]: Is a directory in /var/www/vhosts/xxxxx.xxx/httpdocs/app/code/core/Mage/Catalog/Model/Convert/Adapter/Productimport.php
Does anyone know what should i do?
--edit
I don’t have this error message anymore, seems that the csv had a problem :)
I am using Antonio’s script with 1.3.2.1 and ran into a problem while importing configurable products by the provided cron file. associated products didn’t get attached and also when I tried to edit the configurable product in the admin area I got a blank page with this error “Call to a member function getId() on a non-object in Model/Product/Type/Configurable.php on line 221.”
Then I tried to import the same CSV via “Advanced Profile” it worked. So I just commented out the “configurable” part in the cron script and it also worked.
Maybe something has changed in the latest version. Can anybody confirm this behaviour?
I tore my hair out trying to get this to work with 1.3.2.1. I could make a simple sample work, but a full on upload simply stalled without an error message.
After a couple days of playing around, I discovered that the text in my Description field was the problem. The text includes html and raw text. I have not isolated what aspect caused the problem, but the same text uploads fine using the standard import function.
As best I can tell this code does not change the description import. That’s why it took me so long to figure it out where the problem was.
If it works in the standard import, why does it not work with this import?
I solved the issue by NOT using Excel to create the CSV. Excel worked for the std import, but this extension did not like it much.
I am finally getting this script figured out, but still have a couple questions:
1) Each time the script is run, it adds a new option block to a configurable product page. Is there a solution short of deleting the product first?
2) The Gallery import seems to work, except they do not show up. I have read that they have to be enabled, but I have been unable to find out how to do that.
1/ To avoid option block duplication, there’s a $new variable, that set’s to true when a products already exists. This is working fine for me, please look at:
$new = true; // fix for duplicating attributes error if ( $productId ) { $product -> load( $productId ); $new = false; // fix for duplicating attributes error }
and later:
if ( $new ) { // fix for duplicating attributes error $usingAttributeIds[] = $attribute -> getAttributeId(); }
2/ What do you means with Gallery? normal images? special gallery images? This is added by these line:
But a look to this function returns us the complete list of parameters:
/** * Add image to media gallery * * @param string $file file path of image in file system * @param string|array $mediaAttribute code of attribute with type 'media_image', * leave blank if image should be only in gallery * @param boolean $move if true, it will move source file * @param boolean $exclude mark image as disabled in product page view */ public function addImageToMediaGallery($file, $mediaAttribute=null, $move=false, $exclude=true) { $attributes = $this->getTypeInstance(true)->getSetAttributes($this); if (!isset($attributes['media_gallery'])) { return $this; } $mediaGalleryAttribute = $attributes['media_gallery']; /* @var $mediaGalleryAttribute Mage_Catalog_Model_Resource_Eav_Attribute */ $mediaGalleryAttribute->getBackend()->addImage($this, $file, $mediaAttribute, $move, $exclude); return $this; }
so please make some tries, like addding “false” to exclude:
despite, is a better option to add column ‘gallery’ etc to your csv
see you!
snowman58 - 25 June 2009 11:24 AM
I am finally getting this script figured out, but still have a couple questions:
1) Each time the script is run, it adds a new option block to a configurable product page. Is there a solution short of deleting the product first?
2) The Gallery import seems to work, except they do not show up. I have read that they have to be enabled, but I have been unable to find out how to do that.