Merge pull request #560 from roadster31/coupon-fix

Coupon fix
This commit is contained in:
Julien
2014-08-01 10:19:47 +02:00
3 changed files with 4 additions and 2 deletions

View File

@@ -118,6 +118,8 @@ class Coupon extends BaseAction implements EventSubscriberInterface
$this->couponManager->clear(); $this->couponManager->clear();
$this->request->getSession()->setConsumedCoupons(array()); $this->request->getSession()->setConsumedCoupons(array());
$this->updateOrderDiscount(null);
} }
/** /**

View File

@@ -93,7 +93,7 @@ class MatchForTotalAmount extends ConditionAbstract
public function isMatching() public function isMatching()
{ {
$condition1 = $this->conditionValidator->variableOpComparison( $condition1 = $this->conditionValidator->variableOpComparison(
$this->facade->getCartTotalPrice(), $this->facade->getCartTotalTaxPrice(),
$this->operators[self::CART_TOTAL], $this->operators[self::CART_TOTAL],
$this->values[self::CART_TOTAL] $this->values[self::CART_TOTAL]
); );

View File

@@ -48,7 +48,7 @@ class MatchForTotalAmountTest extends \PHPUnit_Framework_TestCase
->getMock(); ->getMock();
$stubFacade->expects($this->any()) $stubFacade->expects($this->any())
->method('getCartTotalPrice') ->method('getCartTotalTaxPrice')
->will($this->returnValue($cartTotalPrice)); ->will($this->returnValue($cartTotalPrice));
$stubFacade->expects($this->any()) $stubFacade->expects($this->any())