Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

商品一覧/詳細で規格名が表示され無いのを修正 #168

Merged
merged 2 commits into from
Oct 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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