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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user