Merge branch 'master' into tax

Conflicts:
	core/lib/Thelia/Config/Resources/action.xml
	core/lib/Thelia/Controller/Admin/AddressController.php
	core/lib/Thelia/Controller/Admin/CustomerController.php
	core/lib/Thelia/Controller/Admin/ModuleController.php
This commit is contained in:
Etienne Roudeix
2013-10-21 17:48:13 +02:00
100 changed files with 1333 additions and 491 deletions

View File

@@ -60,7 +60,14 @@ class CartItem extends BaseCartItem
}
}
$this->setQuantity($value);
$this->addQuantity($value);
return $this;
}
public function addQuantity($quantity)
{
$this->setQuantity($this->getQuantity() + $quantity);
return $this;
}

View File

@@ -56,7 +56,7 @@ class ConfigQuery extends BaseConfigQuery {
public static function getPageNotFoundView()
{
return self::read("page_not_found_view", '404');
return self::read("page_not_found_view", '404.html');
}
public static function getPassedUrlView()

View File

@@ -13,6 +13,9 @@ class Country extends BaseCountry
public function toggleDefault()
{
if($this->getId() === null) {
throw new \RuntimeException("impossible to just uncheck default country, choose a new one");
}
CountryQuery::create()
->filterByByDefault(1)
->update(array('ByDefault' => 0));
@@ -47,6 +50,10 @@ class Country extends BaseCountry
public function preDelete(ConnectionInterface $con = null)
{
if($this->getByDefault()) {
return false;
}
$this->dispatchEvent(TheliaEvents::BEFORE_DELETECOUNTRY, new CountryEvent($this));
return true;