| @@ 316-320 (lines=5) @@ | ||
| 313 | // 新規登録 |
|
| 314 | log_info('商品規格新規登録開始', array($id)); |
|
| 315 | ||
| 316 | if (count($ProductClasses) > 0) { |
|
| 317 | // 既に登録されていれば最初の画面に戻す |
|
| 318 | log_info('商品規格登録済', array($id)); |
|
| 319 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 320 | } |
|
| 321 | ||
| 322 | $addProductClasses = array(); |
|
| 323 | ||
| @@ 377-381 (lines=5) @@ | ||
| 374 | // 更新 |
|
| 375 | log_info('商品規格更新開始', array($id)); |
|
| 376 | ||
| 377 | if (count($ProductClasses) == 0) { |
|
| 378 | // 商品規格が0件であれば最初の画面に戻す |
|
| 379 | log_info('商品規格が存在しません', array($id)); |
|
| 380 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 381 | } |
|
| 382 | ||
| 383 | $checkProductClasses = array(); |
|
| 384 | $removeProductClasses = array(); |
|
| @@ 483-487 (lines=5) @@ | ||
| 480 | // 削除 |
|
| 481 | log_info('商品規格削除開始', array($id)); |
|
| 482 | ||
| 483 | if (count($ProductClasses) == 0) { |
|
| 484 | // 既に商品が削除されていれば元の画面に戻す |
|
| 485 | log_info('商品規格が存在しません', array($id)); |
|
| 486 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 487 | } |
|
| 488 | ||
| 489 | foreach ($ProductClasses as $ProductClass) { |
|
| 490 | // 登録されている商品規格に削除フラグをセット |
|