protected function findOrMake()
{
if ($this->current()) {
return $this->current();
}
$this->order = Order::create();
if (Member::config()->login_joins_cart && Member::currentUserID()) {
$this->order->MemberID = Member::currentUserID();
}
$this->order->write();
$this->order->extend('onStartOrder');
Session::set(self::config()->cartid_session_name, $this->order->ID);
return $this->order;
}