if ($customerId > 0) { $customerId = $customerId; } else { $customerId = $this->customerSession->getId(); }