@@ -17,9 +17,15 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface IndexPageInterface extends CrudIndexPageInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 20 | 23 | public function filterByTaxon(string $taxonName): void; |
| 21 | 24 | |
| 22 | 25 | public function hasProductAccessibleImage(string $productCode): bool; |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 24 | 30 | public function showProductPage(string $productName): void; |
| 25 | 31 | } |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Behat\Mink\Session; |
| 19 | 19 | use FriendsOfBehat\PageObjectExtension\Page\SymfonyPage; |
| 20 | 20 | use Sylius\Behat\Service\Accessor\TableAccessorInterface; |
| 21 | -use Sylius\Bundle\MoneyBundle\Formatter\MoneyFormatter; |
|
| 22 | 21 | use Sylius\Bundle\MoneyBundle\Formatter\MoneyFormatterInterface; |
| 23 | 22 | use Sylius\Component\Core\Model\OrderInterface; |
| 24 | 23 | use Symfony\Component\Routing\RouterInterface; |
@@ -195,13 +195,13 @@ |
||
| 195 | 195 | $orderPromotionTotal = 0; |
| 196 | 196 | |
| 197 | 197 | foreach ($rows as $row) { |
| 198 | - $unitOrderPromotion = $row->find('css', 'td:nth-child(4)')->getText(); |
|
| 198 | + $unitOrderPromotion = $row->find('css', 'td:nth-child(4)')->getText(); |
|
| 199 | 199 | $quantity = $row->find('css', 'td:nth-child(6)')->getText(); |
| 200 | 200 | $itemOrderPromotion = (float) trim(str_replace('-$', '', $unitOrderPromotion)) * $quantity; |
| 201 | 201 | $orderPromotionTotal += (int) ($itemOrderPromotion * 100); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - return $this->getFormattedMoney($orderPromotionTotal > 0 ? -1 * $orderPromotionTotal: $orderPromotionTotal); |
|
| 204 | + return $this->getFormattedMoney($orderPromotionTotal > 0 ? -1 * $orderPromotionTotal : $orderPromotionTotal); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | public function hasPromotionDiscount(string $promotionDiscount): bool |