| @@ 400-404 (lines=5) @@ | ||
| 397 | // 新規登録 |
|
| 398 | log_info('商品規格新規登録開始', array($id)); |
|
| 399 | ||
| 400 | if (count($ProductClasses) > 0) { |
|
| 401 | // 既に登録されていれば最初の画面に戻す |
|
| 402 | log_info('商品規格登録済', array($id)); |
|
| 403 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 404 | } |
|
| 405 | ||
| 406 | $addProductClasses = array(); |
|
| 407 | ||
| @@ 461-465 (lines=5) @@ | ||
| 458 | // 更新 |
|
| 459 | log_info('商品規格更新開始', array($id)); |
|
| 460 | ||
| 461 | if (count($ProductClasses) == 0) { |
|
| 462 | // 商品規格が0件であれば最初の画面に戻す |
|
| 463 | log_info('商品規格が存在しません', array($id)); |
|
| 464 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 465 | } |
|
| 466 | ||
| 467 | $checkProductClasses = array(); |
|
| 468 | $removeProductClasses = array(); |
|
| @@ 567-571 (lines=5) @@ | ||
| 564 | // 削除 |
|
| 565 | log_info('商品規格削除開始', array($id)); |
|
| 566 | ||
| 567 | if (count($ProductClasses) == 0) { |
|
| 568 | // 既に商品が削除されていれば元の画面に戻す |
|
| 569 | log_info('商品規格が存在しません', array($id)); |
|
| 570 | return $app->redirect($app->url('admin_product_product_class', array('id' => $id))); |
|
| 571 | } |
|
| 572 | ||
| 573 | foreach ($ProductClasses as $ProductClass) { |
|
| 574 | // 登録されている商品規格に削除フラグをセット |
|