How do I add new element to the api method catalogProductCreate. The element to add is hardness String
Please Help me
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
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