Customer creation
I assume you're using the standard customerCustomerCreate() SOAP v2 Method.
This method is referenced in app/code/core/Mage/Customer/etc/wsdl.xml
(grep for: "customerCustomerCreate").
The method create
is defined in Model/Customer/Api.php
where you can see that the customer/customer
Model is called:
class Mage_Customer_Model_Customer_Api extends Mage_Customer_Model_Api_Resource
{
....
/**
* Create new customer
*
* @param array $customerData
* @return int
*/
public function create($customerData)
{
$customerData = $this->_prepareData($customerData);
try {
$customer = Mage::getModel('customer/customer')
->setData($customerData)
->save();
} catch (Mage_Core_Exception $e) {
$this->_fault('data_invalid', $e->getMessage());
}
return $customer->getId();
}
...
}
The Mage_Customer_Model_Customer_Api_V2
class extends Mage_Customer_Model_Customer_Api
.
So you'll need a bit of effort just to change it for the created customers via SOAP.
The password length is hardcoded in Mage_Customer_Model_Customer_Attribute_Backend_Password
(see: $len = Mage::helper('core/string')->strlen($password);
and if ($len < 6)
).
This seams like a bug or something that was overlooked.
Let me take it step by step.
First take a look at the definition of the catalogCategoryInfo
operation from the wsdl.xml
file inside the Mage_Catalog
module
<operation name="catalogCategoryInfo">
<documentation>Retrieve hierarchical tree of categories.</documentation>
<input message="typens:catalogCategoryInfoRequest"/>
<output message="typens:catalogCategoryInfoResponse"/>
</operation>
You will see that the response has the type catalogCategoryInfoResponse
.
This one looks like this:
<message name="catalogCategoryInfoResponse">
<part name="info" type="typens:catalogCategoryInfo"/>
</message>
This means that it will return one object of type catalogCategoryInfo
. This one is:
<complexType name="catalogCategoryInfo">
<all>
<element name="category_id" type="xsd:string"/>
<element name="is_active" type="xsd:int"/>
<element name="position" type="xsd:string"/>
<element name="level" type="xsd:string"/>
<element name="parent_id" type="xsd:string"/>
<element name="all_children" type="xsd:string"/>
<element name="children" type="xsd:string"/>
<element name="created_at" type="xsd:string" minOccurs="0"/>
<element name="updated_at" type="xsd:string" minOccurs="0"/>
<element name="name" type="xsd:string" minOccurs="0"/>
<element name="url_key" type="xsd:string" minOccurs="0"/>
<element name="description" type="xsd:string" minOccurs="0"/>
<element name="meta_title" type="xsd:string" minOccurs="0"/>
<element name="meta_keywords" type="xsd:string" minOccurs="0"/>
<element name="meta_description" type="xsd:string" minOccurs="0"/>
<element name="path" type="xsd:string" minOccurs="0"/>
<element name="url_path" type="xsd:string" minOccurs="0"/>
<element name="children_count" type="xsd:int" minOccurs="0"/>
<element name="display_mode" type="xsd:string" minOccurs="0"/>
<element name="is_anchor" type="xsd:int" minOccurs="0"/>
<element name="available_sort_by" type="typens:ArrayOfString" minOccurs="0"/>
<element name="custom_design" type="xsd:string" minOccurs="0"/>
<element name="custom_design_apply" type="xsd:string" minOccurs="0"/>
<element name="custom_design_from" type="xsd:string" minOccurs="0"/>
<element name="custom_design_to" type="xsd:string" minOccurs="0"/>
<element name="page_layout" type="xsd:string" minOccurs="0"/>
<element name="custom_layout_update" type="xsd:string" minOccurs="0"/>
<element name="default_sort_by" type="xsd:string" minOccurs="0"/>
<element name="landing_page" type="xsd:int" minOccurs="0"/>
</all>
</complexType>
As you can see there is not image
or thumbnail
element among the ones returned.
I don't know if this is a bug or a feature or someone simple overlooked it.
But here is what you can do. You can create your own module that will add the image attribute in the list of returned values from the method call.
Follow this example. It is for extending the product response, but it works the same for categories.
The idea is to take advantage of the fact that all the wsdl.xml
files from all modules are merged into one big one. You can create your own, and following the same xpath as in the wsdl file for the catalog, add a new attribute to the response.
Best Answer
You can set the base image, small image and thumbnail image like this