src/Eccube/Service/PurchaseFlow/InvalidItemException.php 1 location
|
@@ 39-50 (lines=12) @@
|
| 36 |
|
/** |
| 37 |
|
* @return InvalidItemException |
| 38 |
|
*/ |
| 39 |
|
public static function fromProductClass($errorMessage, ProductClass $ProductClass) |
| 40 |
|
{ |
| 41 |
|
$productName = $ProductClass->getProduct()->getName(); |
| 42 |
|
if ($ProductClass->hasClassCategory1()) { |
| 43 |
|
$productName .= ' - '.$ProductClass->getClassCategory1()->getName(); |
| 44 |
|
} |
| 45 |
|
if ($ProductClass->hasClassCategory2()) { |
| 46 |
|
$productName .= ' - '.$ProductClass->getClassCategory2()->getName(); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
return new self($errorMessage, ['%product%' => $productName]); |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|
src/Eccube/Service/PurchaseFlow/Processor/SaleLimitMultipleValidator.php 1 location
|
@@ 71-82 (lines=12) @@
|
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
protected function formatProductName(ProductClass $ProductClass) |
| 72 |
|
{ |
| 73 |
|
$productName = $ProductClass->getProduct()->getName(); |
| 74 |
|
if ($ProductClass->hasClassCategory1()) { |
| 75 |
|
$productName .= ' - '.$ProductClass->getClassCategory1()->getName(); |
| 76 |
|
} |
| 77 |
|
if ($ProductClass->hasClassCategory2()) { |
| 78 |
|
$productName .= ' - '.$ProductClass->getClassCategory2()->getName(); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
return $productName; |
| 82 |
|
} |
| 83 |
|
} |
| 84 |
|
|
src/Eccube/Service/PurchaseFlow/Processor/StockMultipleValidator.php 1 location
|
@@ 74-85 (lines=12) @@
|
| 71 |
|
} |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
protected function formatProductName(ProductClass $ProductClass) |
| 75 |
|
{ |
| 76 |
|
$productName = $ProductClass->getProduct()->getName(); |
| 77 |
|
if ($ProductClass->hasClassCategory1()) { |
| 78 |
|
$productName .= ' - '.$ProductClass->getClassCategory1()->getName(); |
| 79 |
|
} |
| 80 |
|
if ($ProductClass->hasClassCategory2()) { |
| 81 |
|
$productName .= ' - '.$ProductClass->getClassCategory2()->getName(); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
return $productName; |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|