public function getDiscount()
    {
        $discount = 0.00;

        $coupons = $this->facade->getCurrentCoupons();

        if (\count($coupons) > 0) {
            $couponsKept = $this->sortCoupons($coupons);

            $discount = $this->getEffect($couponsKept);

            // Just In Case test
            $checkoutTotalPrice = $this->facade->getCartTotalTaxPrice();

            if ($discount >= $checkoutTotalPrice) {
                $discount = $checkoutTotalPrice;
            }
        }

        return $discount;
    }
public function getDiscount()
    {
        $discount = 0.00;

        $coupons = $this->facade->getCurrentCoupons();

        if (\count($coupons) > 0) {
            $couponsKept = $this->sortCoupons($coupons);

            $discount = $this->getEffect($couponsKept);

            // Just In Case test
            $checkoutTotalPrice = $this->facade->getCartTotalTaxPrice();

            if ($discount >= $checkoutTotalPrice) {
                $discount = $checkoutTotalPrice;
            }
        }

        return $discount;
    }
public function getDiscount ( ) { $ discount = 0.00 ; $ coupons = $ this -> facade -> getCurrentCoupons ( ) ; if ( \ count ( $ coupons ) > 0 ) { $ couponsKept = $ this -> sortCoupons ( $ coupons ) ; $ discount = $ this -> getEffect ( $ couponsKept ) ; // Just In Case test $ checkoutTotalPrice = $ this -> facade -> getCartTotalTaxPrice ( ) ; if ( $ discount >= $ checkoutTotalPrice ) { $ discount = $ checkoutTotalPrice ; } } return $ discount ; }
Get Discount for the given Coupons
@api
@return float checkout discount
Get Discount for the given Coupons