1

How do I add new element to the api method catalogProductCreate. The element to add is hardness String

Please Help me

2

If your element is a product attribute, Magento is ready to handle with the Soap API. The catalogProductCreate method has additional_attributes parameter. You can use it to set one or more values to your attribute using single_data or multi_data.

Example: Add a manufacturer info

$newProduct->name = "product name";
$newProduct->description = "description";
$newProduct->short_description = "desc";
$newProduct->status = "1";
$newProduct->price = "99";
$newProduct->tax_class_id = "2";

$newProduct->additional_attributes = array(
    'single_data' => array(
         array(
             'key' => 'manufacturer',
             'value' => 'Company INC',
         ),
     )
);    
/* you can add other additional attributes here like $manufacturer using multi_data parameters */

I believe this is enough to solve your problem. But if you really need create a new element in method, you need some customization. You can follow the howto below to create a custom module to override API: https://wiki.magento.com/display/m1wiki/How+to+Override+an+Existing+API+Class+with+Additional+Functionality#wsdl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.