sGetDispatchBasket example


    public function sGetPremiumDispatches($countryID = null, $paymentID = null, $stateId = null)
    {
        $this->sCreateHolidaysTable();

        $basket = $this->sGetDispatchBasket($countryID$paymentID$stateId);

        $statements = $this->connection->createQueryBuilder()
            ->select('id', 'bind_sql')
            ->from('s_premium_dispatch')
            ->where('active = 1 AND type IN (0)')
            ->andWhere('bind_sql IS NOT NULL AND bind_sql != ""')
            ->execute()
            ->fetchAll(PDO::FETCH_KEY_PAIR);

        if (empty($basket)) {
            return [];
        }
/** * @param array $article * @param array $payment * @param array $country * @param int|string|null $dispatch * * @return float|false */
    public function sGetArticlePremiumShippingcosts($article$payment$country$dispatch = null)
    {
        $basket = $this->sGetDispatchBasket($article$country['id']$payment['id']);
        if (empty($basket)) {
            return false;
        }
        $dispatchData = $this->sGetPremiumDispatch($basket$dispatch);
        if (empty($dispatchData)) {
            return false;
        }

        if ((!empty($dispatchData['shippingfree']) && $dispatchData['shippingfree'] <= $basket['amount'])
            || empty($basket['count_article'])
            || (!empty($basket['shippingfree']) && empty($dispatchData['bind_shippingfree']))
        )
Home | Imprint | This part of the site doesn't use cookies.