cart page

This commit is contained in:
Etienne Roudeix
2013-09-16 11:14:23 +02:00
parent bc14de9218
commit 2857d0621c
6 changed files with 39 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Base\CartItem as BaseCartItem;
use Thelia\Model\ConfigQuery;
use Thelia\Core\Event\CartEvent;
use Thelia\TaxEngine\Calculator;
class CartItem extends BaseCartItem
{
@@ -64,4 +65,15 @@ class CartItem extends BaseCartItem
return $this;
}
public function getTaxedPrice(Country $country)
{
$taxCalculator = new Calculator();
return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPrice()), 2);
}
public function getTaxedPromoPrice(Country $country)
{
$taxCalculator = new Calculator();
return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPromoPrice()), 2);
}
}