Skip to content

Commit

Permalink
Merge pull request #168 from nanasess/fix-classname
Browse files Browse the repository at this point in the history
商品一覧/詳細で規格名が表示され無いのを修正
  • Loading branch information
ryo-endo authored Oct 12, 2017
2 parents 2c71fb0 + c4132dd commit 5d4589d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions data/class/SC_Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class SC_Product
public $classCategories = array();
public $stock_find;
/** 規格1クラス名 */
public $className1 = '';
public $className1 = [];
/** 規格2クラス名 */
public $className2 = '';
public $className2 = [];
/** 規格1が設定されている */
public $classCat1_find;
/** 規格2が設定されている */
Expand Down Expand Up @@ -404,10 +404,10 @@ public function getProductsClass($productClassId)

// 税込計算
if (!SC_Utils_Ex::isBlank($arrProduct['price01'])) {
$arrProduct['price01_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price01'], $arrProduct['product_id'], $productClassId);
$arrProduct['price01_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price01'], $arrProduct['product_id'], $productClassId);
}
if (!SC_Utils_Ex::isBlank($arrProduct['price02'])) {
$arrProduct['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price02'], $arrProduct['product_id'], $productClassId);
$arrProduct['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProduct['price02'], $arrProduct['product_id'], $productClassId);
}

return $arrProduct;
Expand Down Expand Up @@ -698,7 +698,8 @@ public function getProductDispConditions($tablename = null)
* @param bool $include_hidden
* @return array
*/
public function getCategoryIds($product_id, $include_hidden = false) {
public function getCategoryIds($product_id, $include_hidden = false)
{
if ($this->isValidProductId($product_id, $include_hidden)) {
$objQuery =& SC_Query_Ex::getSingletonInstance();
$category_id = $objQuery->getCol('category_id', 'dtb_product_categories', 'product_id = ?', array($product_id));
Expand All @@ -718,7 +719,8 @@ public function getCategoryIds($product_id, $include_hidden = false) {
* @param bool $include_deleted
* @return bool
*/
public function isValidProductId($product_id, $include_hidden = false, $include_deleted = false) {
public function isValidProductId($product_id, $include_hidden = false, $include_deleted = false)
{
$where = '';
if (!$include_hidden) {
$where .= 'status = 1';
Expand Down

0 comments on commit 5d4589d

Please sign in to comment.