From 551c132b76bf99860432ffc82faf13d73b169770 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Wed, 11 Sep 2013 11:14:54 +0200 Subject: [PATCH] syntax --- core/lib/Thelia/Core/Thelia.php | 2 +- core/lib/Thelia/TaxEngine/Calculator.php | 12 ++++++------ templates/default_save/category.html | 12 +----------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php index 402059ddd..eb560a484 100755 --- a/core/lib/Thelia/Core/Thelia.php +++ b/core/lib/Thelia/Core/Thelia.php @@ -83,7 +83,7 @@ class Thelia extends Kernel $con = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME); $con->setAttribute(ConnectionWrapper::PROPEL_ATTR_CACHE_PREPARES, true); if ($this->isDebug()) { - //$serviceContainer->setLogger('defaultLogger', \Thelia\Log\Tlog::getInstance()); + $serviceContainer->setLogger('defaultLogger', \Thelia\Log\Tlog::getInstance()); $con->useDebug(true); } } diff --git a/core/lib/Thelia/TaxEngine/Calculator.php b/core/lib/Thelia/TaxEngine/Calculator.php index 66c4fcbbf..e077a24b8 100755 --- a/core/lib/Thelia/TaxEngine/Calculator.php +++ b/core/lib/Thelia/TaxEngine/Calculator.php @@ -67,29 +67,29 @@ class Calculator return $this; } - public function getTaxAmount($amount) + public function getTaxAmount($untaxedPrice) { if(null === $this->taxRulesGroupedCollection) { throw new TaxEngineException('Tax rules collection is empty in Calculator::getTaxAmount', TaxEngineException::UNDEFINED_TAX_RULES_COLLECTION); } - if(false === filter_var($amount, FILTER_VALIDATE_FLOAT)) { + if(false === filter_var($untaxedPrice, FILTER_VALIDATE_FLOAT)) { throw new TaxEngineException('BAD AMOUNT FORMAT', TaxEngineException::BAD_AMOUNT_FORMAT); } $totalTaxAmount = 0; foreach($this->taxRulesGroupedCollection as $taxRule) { $rateSum = $taxRule->getTaxRuleRateSum(); - $taxAmount = $amount * $rateSum * 0.01; + $taxAmount = $untaxedPrice * $rateSum * 0.01; $totalTaxAmount += $taxAmount; - $amount += $taxAmount; + $untaxedPrice += $taxAmount; } return $totalTaxAmount; } - public function getTaxedPrice($amount) + public function getTaxedPrice($untaxedPrice) { - return $amount + $this->getTaxAmount($amount); + return $untaxedPrice + $this->getTaxAmount($untaxedPrice); } } diff --git a/templates/default_save/category.html b/templates/default_save/category.html index 2e216d0c0..0a8e04460 100755 --- a/templates/default_save/category.html +++ b/templates/default_save/category.html @@ -1,9 +1,3 @@ - - - {debugbar_renderHead} - - -

Category page

@@ -148,8 +142,4 @@ {/loop} -
- - {debugbar_render} - - \ No newline at end of file + \ No newline at end of file