WIP Coupon

Default Implementation + Unit test in order to validate the chain
- effect
- application field
- condition
This commit is contained in:
gmorel
2013-08-27 13:28:57 +02:00
parent eae86cd797
commit e971179a60
43 changed files with 1184 additions and 617 deletions

View File

@@ -23,6 +23,8 @@
namespace Thelia\Coupon;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Translation\TranslatorInterface;
use Thelia\Coupon\Type\CouponInterface;
use Thelia\Model\Coupon;
@@ -70,10 +72,11 @@ interface CouponAdapterInterface
/**
* Return Products total price
* CartTotalPrice = Checkout total - discount - postage
*
* @return float
*/
public function getCheckoutTotalPriceWithoutDiscountAndPostagePrice();
public function getCartTotalPrice();
/**
* Return Checkout total postage (only) price
@@ -87,7 +90,7 @@ interface CouponAdapterInterface
*
* @return int
*/
public function getNbArticlesInTheCart();
public function getNbArticlesInCart();
/**
* Return all Coupon given during the Checkout
@@ -114,4 +117,18 @@ interface CouponAdapterInterface
*/
public function saveCoupon(CouponInterface $coupon);
/**
* Return platform Container
*
* @return Container
*/
public function getContainer();
/**
* Return platform TranslatorInterface
*
* @return TranslatorInterface
*/
public function getTranslator();
}