VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: mtaras on March 04, 2013, 20:09:08 PM

Title: JSON format of product list
Post by: mtaras on March 04, 2013, 20:09:08 PM
Is it possible to get the product list of a category and the category list on JSON format or I have to develop this myself?

Thanks.
Title: Re: JSON format of product list
Post by: Jumbo! on March 05, 2013, 19:21:37 PM
This is the only built in view JSON which I could find for products in VirtueMart: http://docs.virtuemart.net/api-vm2/da/da9/product_2view_8json_8php_source.html

I do not think it is sufficient to create product list out of it. Therefore you probably have to create your own JSON format. Even I am also trying the same but if I try to generate the JSON format using the standard product listing class then it takes a long time to populate the list.
$products = $productModel->getProductListing(false, false, true, true, false, true, $category_id);
So I tried generating the list using own SQL queries but that is also not very fast.

Please let me know if you find a better solution.