Example #1
0
 /**
  * {@inheritDoc}
  */
 protected function getTables()
 {
     return array(CategoryMapper::getTableName(), ImageMapper::getTableName(), OrderInfoMapper::getTableName(), OrderProductMapper::getTableName(), ProductMapper::getTableName(), ProductMapper::getJunctionTableName());
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function appendQuery(QueryBuilderInterface $queryBuilder, $placeholder)
 {
     $queryBuilder->select($this->getWithDefaults(array('description' => 'content')))->from(ProductMapper::getTableName())->whereEquals('lang_id', "'{$this->getLangId()}'")->andWhereEquals('published', '1')->andWhereLike('title', $placeholder)->orWhereLike('description', $placeholder);
 }
Example #3
0
 /**
  * Decrements product in stock qty
  * 
  * @param string $id
  * @return boolean
  */
 public function decrementProductInStockQtyById($id)
 {
     return $this->db->decrement(ProductMapper::getTableName(), 'in_stock', 1)->whereEquals('id', $id)->execute();
 }