| @@ 190-198 (lines=9) @@ | ||
| 187 | */ |
|
| 188 | public function addProduct($ProductClass, $quantity = 1) |
|
| 189 | { |
|
| 190 | if (!$ProductClass instanceof ProductClass) { |
|
| 191 | $ProductClassId = $ProductClass; |
|
| 192 | $ProductClass = $this->em |
|
| 193 | ->getRepository(ProductClass::class) |
|
| 194 | ->find($ProductClassId); |
|
| 195 | if (is_null($ProductClass)) { |
|
| 196 | return false; |
|
| 197 | } |
|
| 198 | } |
|
| 199 | ||
| 200 | $ClassCategory1 = $ProductClass->getClassCategory1(); |
|
| 201 | if ($ClassCategory1 && !$ClassCategory1->isVisible()) { |
|
| @@ 223-231 (lines=9) @@ | ||
| 220 | ||
| 221 | public function removeProduct($ProductClass) |
|
| 222 | { |
|
| 223 | if (!$ProductClass instanceof ProductClass) { |
|
| 224 | $ProductClassId = $ProductClass; |
|
| 225 | $ProductClass = $this->em |
|
| 226 | ->getRepository(ProductClass::class) |
|
| 227 | ->find($ProductClassId); |
|
| 228 | if (is_null($ProductClass)) { |
|
| 229 | return false; |
|
| 230 | } |
|
| 231 | } |
|
| 232 | ||
| 233 | $removeItem = new CartItem(); |
|
| 234 | $removeItem->setPrice($ProductClass->getPrice01IncTax()); |
|