| @@ 745-756 (lines=12) @@ | ||
| 742 | if (!is_null($id)) { |
|
| 743 | /* @var $Product \Eccube\Entity\Product */ |
|
| 744 | $Product = $this->productRepository->find($id); |
|
| 745 | if (!$Product) { |
|
| 746 | if ($request->isXmlHttpRequest()) { |
|
| 747 | $message = trans('admin.common.delete_error_already_deleted'); |
|
| 748 | ||
| 749 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 750 | } else { |
|
| 751 | $this->deleteMessage(); |
|
| 752 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 753 | ||
| 754 | return $this->redirect($rUrl); |
|
| 755 | } |
|
| 756 | } |
|
| 757 | ||
| 758 | if ($Product instanceof Product) { |
|
| 759 | log_info('商品削除開始', [$id]); |
|
| @@ 808-820 (lines=13) @@ | ||
| 805 | $message = trans('admin.common.delete_error'); |
|
| 806 | } |
|
| 807 | ||
| 808 | if ($request->isXmlHttpRequest()) { |
|
| 809 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 810 | } else { |
|
| 811 | if ($success) { |
|
| 812 | $this->addSuccess($message, 'admin'); |
|
| 813 | } else { |
|
| 814 | $this->addError($message, 'admin'); |
|
| 815 | } |
|
| 816 | ||
| 817 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 818 | ||
| 819 | return $this->redirect($rUrl); |
|
| 820 | } |
|
| 821 | } |
|
| 822 | ||
| 823 | /** |
|