/**
  * Get a json list of products
  * @api
  */
 function getList()
 {
     $response = array();
     $model = $this->getModel($this->get('suffix'));
     parent::_setModelState();
     $products = $model->getList();
     echo json_encode($products);
     // Close the application.
     JFactory::getApplication()->close();
 }
 /**
  * Verifies the fields in a submitted form.
  * Then adds the item to the users cart
  *
  * @return unknown_type
  */
 function addToCart()
 {
     Citruscart::load('CitruscartControllerProducts', 'controllers.products', array('site' => 'site', 'type' => 'components', 'ext' => 'com_citruscart'));
     $controller = new CitruscartControllerProducts();
     $controller->addToCart();
     $controller->redirect();
 }