VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on June 02, 2016, 14:52:59 PM

Title: Get product object in json format through Ajax
Post by: balai on June 02, 2016, 14:52:59 PM
Is there any way to get a product object in json format, from the front-end of my site?
Title: Re: Get product object in json format through Ajax
Post by: Studio 42 on June 02, 2016, 15:37:36 PM
Yes, call the product model with a plugin, module using ajax(com_ajax for eg.) or use a system plugin.  but it's not really safe. Because VM product object include all details.
So best is to use own way or remove all datas to hide to users.
Title: Re: Get product object in json format through Ajax
Post by: balai on June 03, 2016, 11:35:11 AM
QuoteYes, call the product model with a plugin, module using ajax(com_ajax for eg.) or use a system plugin.  but it's not really safe. Because VM product object include all details.

Thanks for the tip.
More details about the com_ajax can be found here:
https://docs.joomla.org/Using_Joomla_Ajax_Interface