Please give me a example how to create magento login and register webservice json format i am trying to develop but can not got any solutions i got product service like this way:
function random_products($limit){
$json = array('success' => true);
$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToSelect(array('name', 'thumbnail', 'price')); //feel free to add any other attribues you need.
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
$products->getSelect()->order('RAND()')->limit($limit);
foreach($products as $product){
$json['products'][] = array(
'id' => $product->getId(),
'name' => $product->getName(),
'href' => $product->getProductUrl(),
'thumb' => (string)Mage::helper('catalog/image')->init($product, 'thumbnail'),
'pirce' => Mage::helper('core')->currency($product->getPrice(), true, false) //." ".$currencyCode,
);
}
retu $json;
}
so i need login and register same way please
