| @@ 391-395 (lines=5) @@ | ||
| 388 | // 新規登録 |
|
| 389 | log_info('商品規格新規登録開始', array($id)); |
|
| 390 | ||
| 391 | if (count($ProductClasses) > 0) { |
|
| 392 | // 既に登録されていれば最初の画面に戻す |
|
| 393 | log_info('商品規格登録済', array($id)); |
|
| 394 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 395 | } |
|
| 396 | ||
| 397 | $addProductClasses = array(); |
|
| 398 | ||
| @@ 452-456 (lines=5) @@ | ||
| 449 | // 更新 |
|
| 450 | log_info('商品規格更新開始', array($id)); |
|
| 451 | ||
| 452 | if (count($ProductClasses) == 0) { |
|
| 453 | // 商品規格が0件であれば最初の画面に戻す |
|
| 454 | log_info('商品規格が存在しません', array($id)); |
|
| 455 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 456 | } |
|
| 457 | ||
| 458 | $checkProductClasses = array(); |
|
| 459 | $removeProductClasses = array(); |
|
| @@ 558-562 (lines=5) @@ | ||
| 555 | // 削除 |
|
| 556 | log_info('商品規格削除開始', array($id)); |
|
| 557 | ||
| 558 | if (count($ProductClasses) == 0) { |
|
| 559 | // 既に商品が削除されていれば元の画面に戻す |
|
| 560 | log_info('商品規格が存在しません', array($id)); |
|
| 561 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 562 | } |
|
| 563 | ||
| 564 | foreach ($ProductClasses as $ProductClass) { |
|
| 565 | // 登録されている商品規格を非表示 |
|