fix tests, edit reset_install.sh, manage payment modules, change debugbar namespace to theliadebugbar

This commit is contained in:
Etienne Roudeix
2013-09-18 19:51:01 +02:00
parent 16d0985718
commit 891ebcd491
16 changed files with 203 additions and 65 deletions

View File

@@ -32,6 +32,7 @@ use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Exception\TaxEngineException;
use Thelia\Model\CategoryQuery;
use Thelia\Model\CountryQuery;
use Thelia\Model\CurrencyQuery;
@@ -603,9 +604,13 @@ class Product extends BaseI18nLoop
$price = $product->getRealLowestPrice();
$taxedPrice = $product->getTaxedPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
try {
$taxedPrice = $product->getTaxedPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
} catch(TaxEngineException $e) {
$taxedPrice = null;
}
// Find previous and next product, in the default category.
$default_category_id = $product->getDefaultCategoryId();

View File

@@ -151,13 +151,21 @@ class ProductSaleElements extends BaseLoop
$loopResultRow = new LoopResultRow($loopResult, $PSEValue, $this->versionable, $this->timestampable, $this->countable);
$price = $PSEValue->getPrice();
$taxedPrice = $PSEValue->getTaxedPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
try {
$taxedPrice = $PSEValue->getTaxedPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
} catch(TaxEngineException $e) {
$taxedPrice = null;
}
$promoPrice = $PSEValue->getPromoPrice();
$taxedPromoPrice = $PSEValue->getTaxedPromoPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
try {
$taxedPromoPrice = $PSEValue->getTaxedPromoPrice(
CountryQuery::create()->findOneById(64) // @TODO : make it magic
);
} catch(TaxEngineException $e) {
$taxedPromoPrice = null;
}
$loopResultRow->set("ID", $PSEValue->getId())
->set("QUANTITY", $PSEValue->getQuantity())