Esempio n. 1
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= 'pageJs';
     $js .= '.load({});';
     return $js;
 }
Esempio n. 2
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $searchCriteria = array();
     $searchCriteria['productId'] = isset($_REQUEST['productid']) ? trim($_REQUEST['productid']) : '';
     $dateFrom = isset($_REQUEST['from']) ? trim($_REQUEST['from']) : trim(UDate::now()->modify('-11 month'));
     $dateTo = isset($_REQUEST['to']) ? trim($_REQUEST['to']) : trim(UDate::now());
     $searchCriteria['dateRange'] = array('from' => $dateFrom, 'to' => $dateTo);
     $js .= 'pageJs';
     $js .= '.load(' . json_encode($searchCriteria) . ');';
     return $js;
 }
Esempio n. 3
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $searchCriteria = array();
     $searchCriteria['productIds'] = isset($_REQUEST['productids']) ? explode(',', str_replace(' ', '', $_REQUEST['productids'])) : array();
     $dateStepBy = isset($_REQUEST['step']) ? trim($_REQUEST['step']) : '+1 week';
     $dateFrom = isset($_REQUEST['from']) ? trim($_REQUEST['from']) : trim(UDate::now()->modify('-10 week'));
     $dateTo = isset($_REQUEST['to']) ? trim($_REQUEST['to']) : trim(UDate::now());
     $searchCriteria['dateRange'] = array('from' => $dateFrom, 'to' => $dateTo, 'step' => $dateStepBy);
     $searchCriteria['showPrice'] = isset($_REQUEST['showprice']) && trim($_REQUEST['showprice']) === '1';
     $js .= 'pageJs';
     $js .= '.load(' . json_encode($searchCriteria) . ');';
     return $js;
 }