| @@ 690-701 (lines=12) @@ | ||
| 687 | if (!is_null($id)) { |
|
| 688 | /* @var $Product \Eccube\Entity\Product */ |
|
| 689 | $Product = $this->productRepository->find($id); |
|
| 690 | if (!$Product) { |
|
| 691 | if ($request->isXmlHttpRequest()) { |
|
| 692 | $message = trans('admin.common.delete_error_already_deleted'); |
|
| 693 | ||
| 694 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 695 | } else { |
|
| 696 | $this->deleteMessage(); |
|
| 697 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 698 | ||
| 699 | return $this->redirect($rUrl); |
|
| 700 | } |
|
| 701 | } |
|
| 702 | ||
| 703 | if ($Product instanceof Product) { |
|
| 704 | log_info('商品削除開始', [$id]); |
|
| @@ 757-769 (lines=13) @@ | ||
| 754 | $message = trans('admin.common.delete_error'); |
|
| 755 | } |
|
| 756 | ||
| 757 | if ($request->isXmlHttpRequest()) { |
|
| 758 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 759 | } else { |
|
| 760 | if ($success) { |
|
| 761 | $this->addSuccess($message, 'admin'); |
|
| 762 | } else { |
|
| 763 | $this->addError($message, 'admin'); |
|
| 764 | } |
|
| 765 | ||
| 766 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 767 | ||
| 768 | return $this->redirect($rUrl); |
|
| 769 | } |
|
| 770 | } |
|
| 771 | ||
| 772 | /** |
|