| @@ 212-219 (lines=8) @@ | ||
| 209 | */ |
|
| 210 | public function generateCartItem($ProductClass) |
|
| 211 | { |
|
| 212 | if (!$ProductClass instanceof ProductClass) { |
|
| 213 | $ProductClass = $this->entityManager |
|
| 214 | ->getRepository('Eccube\Entity\ProductClass') |
|
| 215 | ->find($ProductClass); |
|
| 216 | if (!$ProductClass) { |
|
| 217 | throw new CartException('cart.product.delete'); |
|
| 218 | } |
|
| 219 | } |
|
| 220 | $CartItem = new CartItem(); |
|
| 221 | $CartItem |
|
| 222 | ->setClassName('Eccube\Entity\ProductClass') |
|
| @@ 430-437 (lines=8) @@ | ||
| 427 | */ |
|
| 428 | public function setProductQuantity($ProductClass, $quantity) |
|
| 429 | { |
|
| 430 | if (!$ProductClass instanceof ProductClass) { |
|
| 431 | $ProductClass = $this->entityManager |
|
| 432 | ->getRepository('Eccube\Entity\ProductClass') |
|
| 433 | ->find($ProductClass); |
|
| 434 | if (!$ProductClass) { |
|
| 435 | throw new CartException('cart.product.delete'); |
|
| 436 | } |
|
| 437 | } |
|
| 438 | ||
| 439 | if (!$this->isProductDisplay($ProductClass)) { |
|
| 440 | throw new CartException('cart.product.not.status'); |
|