Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
How I mananged to import products with multiple-images and multiple-languages
 
MonoMachines
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-05-17
New York
 
hyteckit - 01 September 2008 12:58 AM


Most likely your description has funky characters that is causing problems with serialize and unserializing your data.

Thanks for the feedback...it was on 8/29...but I think that you were right.  I ran everything from the old database through a couple of functions to clean them up and I have gotten rid of almost all the errors.  I used
$image = trim( preg_replace( ‘/\r\n/’, ‘’, trim($image) ) );
...and removed tabs in a second line…
$image = preg_replace( ‘/\t/’, ‘’, $image ) ;

Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Member
 
Total Posts:  60
Joined:  2008-08-15
 

In relation to the extension - not sure i this is the right place to post?

I’m running 1.1.5 and have followed the instructions in this thread. However, the error I get is this:

* Starting profile execution, please wait…
* Warning: Please don’t close window during importing/exporting data

There seems to be some path issue - any idea why it isn’t working?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  152
Joined:  2008-04-01
Los Angeles, CA
 
benfrain.com - 16 September 2008 09:01 AM

In relation to the extension - not sure i this is the right place to post?

I’m running 1.1.5 and have followed the instructions in this thread. However, the error I get is this:

* Starting profile execution, please wait…
* Warning: Please don’t close window during importing/exporting data

* Starting Mage_Dataflow_Model_Convert_Adapter_Io :: load
* Loaded successfully: “/home/buyit247/domains/buyit247.com/public_html/magento/var/import/exported_products.csv”
* Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
* Declared adapter catalog/convert_adapter_gallery not found
* Finished profile execution.

There seems to be some path issue - any idea why it isn’t working?

Have you downloaded and installed my extension?

Seems like the extension is not found.

 Signature 

Current Project:
GeekGears.com - Accessories for your iPod, iPhone, MP3 Players, Cell Phone, PDA, GPS Devices, Digital Camera, and more.
Extension: Product Gallery Importer, Enhanced Search

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Member
 
Total Posts:  60
Joined:  2008-08-15
 

it’s installed. here is what it says in Magento connect page:

Channel: connect.magentocommerce.com/community

Package Name Installed Actions Summary
Product_Gallery_Importer 1.1 (stable) Product Gallery Importer lets you import products with multiple product images from a CSV file.

Is that as it should be?

 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  152
Joined:  2008-04-01
Los Angeles, CA
 
benfrain.com - 16 September 2008 12:45 PM

it’s installed. here is what it says in Magento connect page:

Channel: connect.magentocommerce.com/community

Package Name Installed Actions Summary
Product_Gallery_Importer 1.1 (stable) Product Gallery Importer lets you import products with multiple product images from a CSV file.

Is that as it should be?

Permissions of the extension must be readable.

Clear cache.

 Signature 

Current Project:
GeekGears.com - Accessories for your iPod, iPhone, MP3 Players, Cell Phone, PDA, GPS Devices, Digital Camera, and more.
Extension: Product Gallery Importer, Enhanced Search

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Member
 
Total Posts:  60
Joined:  2008-08-15
 

Where does this file live in the folder hierarchy? I have tried going to:

magento\downloader\pearlib\download\product_gallery_importer-1.1\ and setting all the folders and the Gallery.php file to 777 but it doesn’t allow me to perform the action.

Whilst the folders are all 777, the Gallery.php file won’t change from 666

Have tried with both Dreamweaver and Transmit.

 
Magento Community Magento Community
Magento Community
Magento Community
 
peerus
Member
 
Total Posts:  37
Joined:  2008-09-14
 

Hi! I’ve got the same problem “Declared adapter catalog/convert_adapter_gallery not found”

I’ve installed Product Gallery Importer via Magento connect.
Created advanced profile
But when i try to import file Magento reports “Declared adapter catalog/convert_adapter_gallery not found”

/app/code/core/Mage/Catalog/Model/Convert/Adapter/Gallery.php
Owner: rw
Group: rw
Other: r

What i’m doing wrong?

 Signature 

Magento fan concerned by
Multi Images import http://www.magentocommerce.com/boards/viewthread/6220/
Customer group pricing http://www.magentocommerce.com/boards/viewthread/108/

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  160
Joined:  2008-01-15
France
 

Here is basically what the extension does. If you hack the file Product then you’ll be able to use the gallery field in any existing profile that uses the product adapter (instead of the gallery adapter):

/www/suiclean/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php

After $product->setStockData($stockData); Add:
        
#BEGIN CUSTOM import gallery images
        
$galleryData explode(';',$importData["gallery"]);
        foreach(
$galleryData as $gallery_img)
        
{
            
if(file_exists(Mage::getBaseDir('media') . DS 'import' $gallery_img)) {
                
try {
                    $product
->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $gallery_imgnullfalsefalse);
                
}
                
catch (Exception $e{}                
            }
        }
        
#END CUSTOM

 Signature 

I have finally found the best web hosting ever for Magento! 1 second max pageload with my website, for less than 10€ a month… And a very good support. I strongly advise you to try them : Rackspeed.de, there is even a 7 days free trial.
Erwin Mayer Foundation

 
Magento Community Magento Community
Magento Community
Magento Community
 
peerus
Member
 
Total Posts:  37
Joined:  2008-09-14
 
mayerwin - 21 September 2008 03:08 AM

Here is basically what the extension does. If you hack the file Product then you’ll be able to use the gallery field in any existing profile that uses the product adapter (instead of the gallery adapter):

/www/suiclean/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php
...

We are on the same way =) Thank you!

If i import the same file two times, i’ll get gallery with image duplicates? Is there any way to fix it?

i’m not very good in php-programming. Is this right direction? http://www.magentocommerce.com/wiki/doc/webservices-api/api#product_images_api

 Signature 

Magento fan concerned by
Multi Images import http://www.magentocommerce.com/boards/viewthread/6220/
Customer group pricing http://www.magentocommerce.com/boards/viewthread/108/

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  160
Joined:  2008-01-15
France
 

Yes, you will have it duplicated. I found another hack for this, which does the following: if the image already exists in destination directory (media/catalog/products), it replaces it.

/www/suiclean/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php 
Before $destFile 
dirname($file) . $ioObject->dirsep(), (l460), Replace:

        
$destFile dirname($file) . $ioObject->dirsep()
                  . 
Varien_File_Uploader::getNewFileName($this->_getConfig()->getMediaPath($file));

With:
        
#BEGIN CUSTOM
        
$destFile $file;
        
//$destFile = dirname($file) . $ioObject->dirsep()
        //          . Varien_File_Uploader::getNewFileName($this->_getConfig()->getMediaPath($file));
        #END CUSTOM

And you can also make sure “exclude” is specified for image, thumbnail and small_image fields (otherwise I have seen that they can appear in the gallery, which is not desirable), by doing the following:

/www/suiclean/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php

Replace
:
    
$product->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fields);
With:
    
$product->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fieldsfalsetrue);
Again, let’s hope it will be smoother in future Magento releases!

I have also found a hack to make possible put several different stores (separated by commas) in the “store” field.

 Signature 

I have finally found the best web hosting ever for Magento! 1 second max pageload with my website, for less than 10€ a month… And a very good support. I strongly advise you to try them : Rackspeed.de, there is even a 7 days free trial.
Erwin Mayer Foundation

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendan.
Sr. Member
 
Total Posts:  182
Joined:  2008-07-16
Sydney, Australia
 

mayerwin thanks for the tips on this

brendan

 Signature 

magento 1.1.6
PHP Version 5.2.6
http://www.getstuff.com.au

 
Magento Community Magento Community
Magento Community
Magento Community
 
peerus
Member
 
Total Posts:  37
Joined:  2008-09-14
 

I’m trying to follow this instructions, because of update issues.
http://www.magentocommerce.com/wiki/groups/174/changing_and_customizing_magento_code
http://www.magentocommerce.com/wiki/how-to/customize_part_of_configuration

I followed this steps
1. Create new dir app/code/local/Peerus/Catalog/Model/Convert/Adapter
2. Put Gallery.php into this dir Edit it Mage_Catalog_Model_Convert_Adapter_Gallery -> Peerus_Catalog_Model_Convert_Adapter_Gallery
3. Edit app/etc/local.xml
Add
<modules>
<DriveBike_Catalog>
<active>true</active>
<codePool>local</codePool>
</DriveBike_Catalog>
</modules>

Add (i’ve tried different variants of this block)
<models>
<gallery>
<class>Peerus_Catalog_Model_Convert_Adapter</class>
</gallery>
</models>

I also tried to create app/code/{codePool}/{moduleName}/etc/config.xml

What i’m doing wrong?

There is plan to modify gallery import to create “Catalog price rules” to solve my pricing problem http://www.magentocommerce.com/boards/viewreply/62011/

 Signature 

Magento fan concerned by
Multi Images import http://www.magentocommerce.com/boards/viewthread/6220/
Customer group pricing http://www.magentocommerce.com/boards/viewthread/108/

 
Magento Community Magento Community
Magento Community
Magento Community
 
peerus
Member
 
Total Posts:  37
Joined:  2008-09-14
 

Almost there!!

1. Create

app/etc/modules/Peerus_Catalog.xml
with following content
<?xml version="1.0"?>
<config>
  <
modules>
    <
Peerus_Catalog>
      <
codePool>local</codePool>
      <
active>true</active>
    </
Peerus_Catalog>
  </
modules>
</
config>

2. Create

app/code/local/Peerus/Catalog/etc/config.xml
with following content
<?xml version="1.0"?>
<config>
  <global>
    <
models>
      <
peerus_catalog>
        <class>
Peerus_Catalog_Model</class>
      </
peerus_catalog>
    </
models>
  </global>
</
config>

3. Create

app/code/local/Peerus/Catalog/Model/Convert/Adapter/Drive.php

with your custom import code. Content should look like

class Peerus_Catalog_Model_Convert_Adapter_Drive
    
extends Mage_Eav_Model_Convert_Adapter_Entity
{
...
}

4. Create advanced import

<action type="dataflow/convert_adapter_io" method="load">
    <var 
name="type">file</var>
    <var 
name="path">var/import</var>
    <var 
name="filename"><![CDATA[export_all_products.csv]]></var>
    <var 
name="format"><![CDATA[csv]]></var>
</
action>

<
action type="dataflow/convert_parser_csv" method="parse">
    <var 
name="delimiter"><![CDATA[,]]></var>
    <var 
name="enclose"><![CDATA["]]></var>
    <var name="
fieldnames">true</var>
    <var name="
number_of_records">1</var>
    <var name="
decimal_separator"><![CDATA[.]]></var>
    <var name="
adapter">[b]peerus_catalog/convert_adapter_drive[/b]</var>
    <var name="
method">parse</var>
</action>

5. You got it!

If somebody knows how to override catalog/convert_adapter_product. Please help me!!!

I tried following way (sorry i can’t mark changes in code blocks).
1. Create

app/etc/modules/Peerus_Catalog.xml

Content

<?xml version="1.0"?>
<config>
  <
modules>
    <
Peerus_Catalog>
      <
codePool>local</codePool>
      <
active>true</active>
    </
Peerus_Catalog>
  </
modules>
</
config>

2. Create

app/code/local/Peerus/Catalog/etc/config.xml

Content

<?xml version="1.0"?>
<config>
  <global>
    <
models>
      
[b]<catalog>
<
rewrite>
        <
convert_adapter_product>Peerus_Catalog_Model_Convert_Adapter_Product</convert_adapter_product>
</
rewrite>
      </
catalog>[/b]
    
</models>
  </global>
</
config>

3. Create

app/code/local/Peerus/Catalog/Model/Convert/Adapter/[b]Product.php[/b]

Content is like

[b]class Peerus_Catalog_Model_Convert_Adapter_Product
    
extends Mage_Catalog_Model_Convert_Adapter_Product
{
...
}
[
/b]

 Signature 

Magento fan concerned by
Multi Images import http://www.magentocommerce.com/boards/viewthread/6220/
Customer group pricing http://www.magentocommerce.com/boards/viewthread/108/

 
Magento Community Magento Community
Magento Community
Magento Community
 
_Lobo_
Member
 
Total Posts:  31
Joined:  2008-04-10
 

How to upload multiple products with multiple images (image1-thumb-small image) and tier prices?

Thanks on advance for any help

Image Attachments
Enitity.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
peerus
Member
 
Total Posts:  37
Joined:  2008-09-14
 

Everything is fine in my previous post! The problem was caused by cache.

If you need you can just rewrite catalog/convert_adapter_product class and don’t use advanced profiles.

 Signature 

Magento fan concerned by
Multi Images import http://www.magentocommerce.com/boards/viewthread/6220/
Customer group pricing http://www.magentocommerce.com/boards/viewthread/108/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53155 users|529 users currently online|107161 forum posts