getCustomerInformationByOrderId example

$order = $this->getOrderForStatusMail($orderId);
        $orderDetails = $this->getOrderDetailsForStatusMail($orderId);

        $dispatch = null;
        if (!empty($order['dispatchID'])) {
            $dispatch = $this->db->fetchRow(' SELECT id, name, description FROM s_premium_dispatch WHERE id=? ', [$order['dispatchID']]);
        }

        $user = $this->getCustomerInformationByOrderId($orderId);

        if (empty($order) || empty($orderDetails) || empty($user)) {
            return null;
        }

        $repository = $this->modelManager->getRepository(Shop::class);
        $shopId = is_numeric($order['language']) ? $order['language'] : $order['subshopID'];
        // The (sub-)shop might be inactive by now, so that's why we use `getById` instead of `getActiveById`         $shop = $repository->getById($shopId);
        if ($shop === null) {
            throw new ModelNotFoundException(Shop::class$shopId);
        }
Home | Imprint | This part of the site doesn't use cookies.