Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lee committed Feb 11, 2019
2 parents 0d82370 + 7fbf199 commit 20e3387
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Helper/DbHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function getAllStores() : array
$tableName = $this->getTableName('store');
$sql = "SELECT * FROM `".$tableName."` "
. "ORDER BY `store_id`";

$arrRows = $this->sqlRead($sql);
if (!is_array($arrRows)) {
return [];
Expand Down Expand Up @@ -291,6 +291,16 @@ protected function setTaxCalculation($taxRateId, $taxRuleId, $taxClassId)
$this->sqlWrite($sql);
}

public function setProductToCategory($arrCategoryProduct)
{
$table = $this->getTableName('catalog_category_product');

$sql = "INSERT INTO `".$table."` "
. "(`category_id`, `product_id`, `position`) "
. "VALUES "
. implode(", ", $arrCategoryProduct).";";
$this->sqlWrite($sql);
}

public function loadExistingAttributeSets()
{
Expand Down

0 comments on commit 20e3387

Please sign in to comment.