Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Category image import with SOAP API v2
 
YniVerse
Jr. Member
 
Total Posts:  1
Joined:  2013-01-21
 

Hello list,
I try to import categories with images and thumbnails by using the SOAP API v2. How can I import images? For products it’s clear and I have done that, but is it possible for Categories?
When I do:
$result = $proxy->catalogCategoryInfo($sessionId, ‘2522’);
(that category does have image and thumbnail) the $result only shows te following array:

stdClass Object
(
[category_id] => 2522
[is_active] => 1
[position] => 21
[level] => 2
[parent_id] => 3
[all_children] => 2522
[children] =>
[created_at] => 2013-03-10 22:12:41
[updated_at] => 2013-03-10 22:31:56
[name] => test of het wetkt
[url_key] => test-of-het-wetkt
[path] => 1/3/2522
[url_path] => test-of-het-wetkt.html
[display_mode] => PRODUCTS
[is_anchor] => 0
[available_sort_by] => Array
(
)

[custom_design] => default/iphone
[page_layout] => three_columns
[default_sort_by] => position
[landing_page] => 5
)

No images. When I try to insert it as follows:
// create new category
$result = $proxy->catalogCategoryCreate($sessionId, 3, array(
‘name’ => $categoryInfo[’name’],
‘is_active’ => 1,
‘position’ => 1,
//<!-- position parameter is deprecated, category anyway will be positioned in the end of list
//and you can not set position directly, use catalog_category.move instead -->
‘available_sort_by’ => array(’position’),
‘custom_design’ => null,
‘custom_apply_to_products’ => null,
‘custom_design_from’ => null,
‘custom_design_to’ => null,
‘custom_layout_update’ => null,
‘default_sort_by’ => ‘position’,
// ‘description’ => $categoryInfo[’description’],
‘display_mode’ => null,
‘is_anchor’ => 0,
‘landing_page’ => null,
‘image’ => ‘./media/catalog/category/pigUniversalPillows.jpg’,
// ‘meta_description’ => $categoryInfo[’meta_description’],
// ‘meta_keywords’ => $categoryInfo[’meta_keywords’],
// ‘meta_title’ => $categoryInfo[’meta_title’],
// ‘page_layout’ => ‘two_columns_left’,
// ‘url_key’ => $categoryInfo[’url_key’],
‘include_in_menu’ => 1,
));
echo $result;
The catagory ID is given, but no images are seen.Does anybody know How I can solve this problem? I want to insert more than 500 categories with images.

 
Magento Community Magento Community
Magento Community
Magento Community
 
prospero21
Jr. Member
 
Total Posts:  1
Joined:  2011-04-13
 

Solution:

In the app\code\core\Mage\Catalog\etc\wsdl.xml you add, within the catalogCategoryEntityCreate the following element:

<element name="image" type="xsd:ArrayOfString" minOccurs="0"/>

This should solve your problem.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top