update changelog and fix cs
This commit is contained in:
@@ -128,6 +128,7 @@ class BaseFacade implements FacadeInterface
|
||||
public function getCartTotalTaxPrice()
|
||||
{
|
||||
$taxCountry = $this->getContainer()->get('thelia.taxEngine')->getDeliveryCountry();
|
||||
|
||||
return $this->getCart()->getTaxedAmount($taxCountry);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ use Thelia\Coupon\FacadeInterface;
|
||||
use Thelia\Condition\ConditionCollection;
|
||||
use Thelia\Condition\ConditionOrganizerInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Assist in writing a CouponInterface
|
||||
*
|
||||
@@ -139,9 +138,9 @@ abstract class CouponAbstract implements CouponInterface
|
||||
* @param bool $isRemovingPostage If Coupon is removing postage
|
||||
* @param bool $isAvailableOnSpecialOffers If available on Product already
|
||||
* on special offer price
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
||||
@@ -76,9 +76,9 @@ interface CouponInterface
|
||||
* @param bool $isRemovingPostage If Coupon is removing postage
|
||||
* @param bool $isAvailableOnSpecialOffers If available on Product already
|
||||
* on special offer price
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
*/
|
||||
public function set(
|
||||
FacadeInterface $facade,
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
namespace Thelia\Coupon\Type;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allow to remove an amount from the checkout total
|
||||
*
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Thelia\Coupon\Type;
|
||||
|
||||
use Thelia\Coupon\FacadeInterface;
|
||||
|
||||
|
||||
/**
|
||||
* @package Coupon
|
||||
* @author Guillaume MOREL <gmorel@openstudio.fr>
|
||||
@@ -59,9 +58,9 @@ class RemoveXPercent extends CouponAbstract
|
||||
* @param bool $isRemovingPostage If Coupon is removing postage
|
||||
* @param bool $isAvailableOnSpecialOffers If available on Product already
|
||||
* on special offer price
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
* @param bool $isEnabled False if Coupon is disabled by admin
|
||||
* @param int $maxUsage How many usage left
|
||||
* @param \Datetime $expirationDate When the Code is expiring
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -104,7 +103,6 @@ class RemoveXPercent extends CouponAbstract
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return round($this->facade->getCartTotalTaxPrice() * $this->percentage/100, 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user