1

All i need is product total no of attributes and their value ...via passing product id(code is given below).

<?php
require_once('../app/Mage.php');
Mage::app();    

$client     = new SoapClient('http://localhost/project/api/soap/?wsdl');


$user_name  = $_POST["user_name"];
$password   = $_POST["password"];
$prod_id    = $_POST["prod_id"];

$response   = array();

$session    = $client->login($user_name, $password);
//$product    = $client->call($session,"catalog_product.info" ,$prod_id);
$listAttributes = $client->call($session,'product.listOfAdditionalAttributes',array('simple',$prod_id));

$response = array(
    "status" => "1",
    "message" => "suceess",
    "products" => $listAttributes
);

ob_start();
header('Content-type: application/json');
header('Pragma: public');
header('Cache-control: private');
header('Expires: -1');

echo json_encode($response);
exit;
?>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.