protected function getDeliveryInformation(Customer $customer = null)
    {
        $address = null;
        // get the selected delivery address
        if (null !== $addressId = $this->getCurrentRequest()->getSession()->getOrder()->getChoosenDeliveryAddress()) {
            if (null !== $address = AddressQuery::create()->findPk($addressId)) {
                $this->isCustomizable = false;
                return [$address, $address->getCountry(), null];
            }
        }

        // get country from customer addresses
        if (null !== $customer) {
            $address = AddressQuery::create()
                ->filterByCustomerId($customer->getId())
                ->filterByIsDefault(1)
                ->findOne()
            ;

            if (null !== $address) {
                $this->isCustomizable = false;

                return [$address, $address->getCountry(), null];
            }
        }

        // get country from cookie
        $cookieName = ConfigQuery::read('front_cart_country_cookie_name', 'fcccn');
        if ($this->getCurrentRequest()->cookies->has($cookieName)) {
            $cookieVal = $this->getCurrentRequest()->cookies->getInt($cookieName, 0);
            if (0 !== $cookieVal) {
                $country = CountryQuery::create()->findPk($cookieVal);
                if (null !== $country) {
                    return [null, $country, null];
                }
            }
        }

        // get default country for store.
        try {
            $country = Country::getDefaultCountry();

            return [null, $country, null];
        } catch (\LogicException $e) {
            ;
        }

        return [null, null, null];
    }