Ejemplo n.º 1
0
 /**
  * @param null $limit
  * @param null $offset
  * @return array
  */
 public function getItems($limit = null, $offset = null)
 {
     $reviews = array();
     if (ShopgateHelper::checkTable(sprintf('%sproduct_comment', _DB_PREFIX_))) {
         $reviews = Db::getInstance()->ExecuteS(sprintf('SELECT * FROM %sproduct_comment
                                                         WHERE validate = 1 AND deleted = 0%s%s', _DB_PREFIX_, is_int($limit) ? ' LIMIT ' . $limit : '', is_int($offset) ? ' OFFSET ' . $offset : ''));
     }
     return $reviews;
 }
Ejemplo n.º 2
0
 /**
  * @param $itemId
  * @return array
  */
 protected function getTierPricesFromDb($itemId)
 {
     /**
      * check table
      */
     if (ShopgateHelper::checkTable(sprintf('%sspecific_price', _DB_PREFIX_))) {
         $select = sprintf('SELECT * from %sspecific_price WHERE id_product = %s', _DB_PREFIX_, $itemId);
         return Db::getInstance()->ExecuteS($select);
     } else {
         return array();
     }
 }