=== modified file 'data/class/SC_Product.php'
|
|
|
212 | 212 | $arrProductClass = $this->getProductsClassFullByProductId($productId, $has_deleted); |
213 | 213 | |
214 | 214 | $classCats1 = array(); |
215 | | $classCats1[''] = '選択してください'; |
| 215 | $classCats1['__unselected'] = '選択してください'; |
216 | 216 | |
217 | 217 | // 規格1クラス名 |
218 | 218 | $this->className1[$productId] = |
… |
… |
|
233 | 233 | |
234 | 234 | $this->stock_find[$productId] = false; |
235 | 235 | $classCategories = array(); |
236 | | $classCategories['']['']['name'] = '選択してください'; |
237 | | $classCategories['']['']['product_class_id'] = $arrProductClass[0]['product_class_id']; |
| 236 | $classCategories['__unselected']['__unselected']['name'] = '選択してください'; |
| 237 | $classCategories['__unselected']['__unselected']['product_class_id'] = $arrProductClass[0]['product_class_id']; |
238 | 238 | // 商品種別 |
239 | | $classCategories['']['']['product_type'] = $arrProductClass[0]['product_type_id']; |
| 239 | $classCategories['__unselected']['__unselected']['product_type'] = $arrProductClass[0]['product_type_id']; |
240 | 240 | $this->product_class_id[$productId] = $arrProductClass[0]['product_class_id']; |
241 | 241 | // 商品種別 |
242 | 242 | $this->product_type[$productId] = $arrProductClass[0]['product_type_id']; |
… |
… |
|
284 | 284 | $classCats2['product_type'] = $productsClass['product_type_id']; |
285 | 285 | |
286 | 286 | // #929(GC8 規格のプルダウン順序表示不具合)対応のため、2次キーは「#」を前置 |
| 287 | if (SC_Utils_Ex::isBlank($productsClass1)) { |
| 288 | $productsClass1 = '__unselected2'; |
| 289 | } |
287 | 290 | $classCategories[$productsClass1]['#'] = array( |
288 | 291 | 'classcategory_id2' => '', |
289 | 292 | 'name' => '選択してください', |
=== modified file 'data/class/pages/products/LC_Page_Products_List.php'
|
|
|
164 | 164 | $this->productStatus = $this->arrProducts['productStatus']; |
165 | 165 | unset($this->arrProducts['productStatus']); |
166 | 166 | $this->tpl_javascript .= 'var productsClassCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories) . ';'; |
167 | | //onloadスクリプトを設定 |
| 167 | //onloadスクリプトを設定. 在庫ありの商品のみ出力する |
168 | 168 | foreach ($this->arrProducts as $arrProduct) { |
169 | | $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});"; |
| 169 | if ($arrProduct['stock_unlimited_max'] || $arrProduct['stock_max'] > 0) { |
| 170 | $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});"; |
| 171 | } |
170 | 172 | } |
171 | 173 | |
172 | 174 | //カート処理 |
=== modified file 'html/js/products.js'
|
|
|
50 | 50 | } |
51 | 51 | $sele2.append(option); |
52 | 52 | } |
53 | | checkStock($form, product_id, $sele1.val() ? $sele1.val() : '', |
| 53 | checkStock($form, product_id, $sele1.val() ? $sele1.val() : '__unselected2', |
54 | 54 | $sele2.val() ? $sele2.val() : ''); |
55 | 55 | } |
56 | 56 | } |