. */ /* */ /**********************************************************************************/ namespace Thelia\Coupon; /** * Created by JetBrains PhpStorm. * Date: 8/19/13 * Time: 3:24 PM * * @package Coupon * @author Guillaume MOREL * */ class CouponBaseAdapter implements CouponAdapterInterface { /** * Return a Cart a CouponManager can process * * @return \Thelia\Model\Cart */ public function getCart() { // TODO: Implement getCart() method. } /** * Return an Address a CouponManager can process * * @return \Thelia\Model\Address */ public function getDeliveryAddress() { // TODO: Implement getDeliveryAddress() method. } /** * Return an Customer a CouponManager can process * * @return \Thelia\Model\Customer */ public function getCustomer() { // TODO: Implement getCustomer() method. } /** * Return Checkout total price * * @return float */ public function getCheckoutTotalPrice() { // TODO: Implement getCheckoutTotalPrice() method. } /** * Return Checkout total postage (only) price * * @return float */ public function getCheckoutPostagePrice() { // TODO: Implement getCheckoutPostagePrice() method. } /** * Return Products total price * * @return float */ public function getCheckoutTotalPriceWithoutDiscountAndPostagePrice() { // TODO: Implement getCheckoutTotalPriceWithoutDiscountAndPostagePrice() method. } /** * Return the number of Products in the Cart * * @return int */ public function getNbArticlesInTheCart() { // TODO: Implement getNbArticlesInTheCart() method. } /** * Return all Coupon given during the Checkout * * @return array Array of CouponInterface */ public function getCurrentCoupons() { $couponFactory = new CouponFactory(); // @todo Get from Session $couponCodes = array('XMAS', 'SPRINGBREAK'); $coupons = array(); foreach ($couponCodes as $couponCode) { $coupons[] = $couponFactory->buildCouponFromCode($couponCode); } return $coupons; } }