Commit 01147039 authored by romanb's avatar romanb

[2.0] Simplifying code.

parent 8ccb7df1
...@@ -61,11 +61,9 @@ class ECommerceCart ...@@ -61,11 +61,9 @@ class ECommerceCart
if ($this->customer !== null) { if ($this->customer !== null) {
$customer = $this->customer; $customer = $this->customer;
$this->customer = null; $this->customer = null;
if ($customer->getCart() !== null) {
$customer->removeCart(); $customer->removeCart();
} }
} }
}
public function getCustomer() { public function getCustomer() {
return $this->customer; return $this->customer;
......
...@@ -68,9 +68,7 @@ class ECommerceCustomer ...@@ -68,9 +68,7 @@ class ECommerceCustomer
if ($this->cart !== null) { if ($this->cart !== null) {
$cart = $this->cart; $cart = $this->cart;
$this->cart = null; $this->cart = null;
if ($cart->getCustomer() !== null) {
$cart->removeCustomer(); $cart->removeCustomer();
} }
} }
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment