Ejemplo n.º 1
0
 /**
  * Verifies the fields in a submitted form.
  * Then adds the item to the users cart 
  * 
  * @return unknown_type
  */
 function addToCart()
 {
     Tienda::load('TiendaControllerProducts', 'controllers.products', array('site' => 'site', 'type' => 'components', 'ext' => 'com_tienda'));
     $controller = new TiendaControllerProducts();
     $controller->addToCart();
     $controller->redirect();
 }
Ejemplo n.º 2
0
 /**
  * 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();
 }