sGetPremiumDispatch example

'sAmountNetNumeric' => $this->sBasketData[CartKey::AMOUNT_NET_NUMERIC],
            'sTaxRates' => $this->sBasketData[CheckoutKey::TAX_RATES] ?? null,
            'ordernumber' => $orderNumber,
            'sOrderDay' => date('d.m.Y'),
            'sOrderTime' => date('H:i'),
            'sComment' => $this->sComment,
            'attributes' => $attributes,
            'sEsd' => $esdOrder,
        ];

        if ($dispatchId) {
            $variables['sDispatch'] = $this->sSYSTEM->sMODULES['sAdmin']->sGetPremiumDispatch($dispatchId);
        }
        if ($this->bookingId) {
            $variables['sBookingID'] = $this->bookingId;
        }

        // Completed - Garbage basket / temporary - order         $this->sDeleteTemporaryOrder();

        $this->db->executeUpdate(
            'DELETE FROM s_order_basket WHERE sessionID=?',
            [$this->getSession()->offsetGet('sessionId')]
        );
$foundOrdersCount = (int) Shopware()->Db()->fetchOne('SELECT FOUND_ROWS()');

        foreach ($orders as $orderKey => $orderValue) {
            $orders[$orderKey]['invoice_amount'] = $this->moduleManager->Articles()
                ->sFormatPrice($orderValue['invoice_amount']);
            $orders[$orderKey]['invoice_amount_net'] = $this->moduleManager->Articles()
                ->sFormatPrice($orderValue['invoice_amount_net']);
            $orders[$orderKey]['invoice_shipping'] = $this->moduleManager->Articles()
                ->sFormatPrice($orderValue['invoice_shipping']);

            $orders = $this->processOpenOrderDetails($orderValue$orders$orderKey);
            $orders[$orderKey]['dispatch'] = $this->sGetPremiumDispatch($orderValue['dispatchID']);
        }

        $orders = $this->eventManager->filter(
            'Shopware_Modules_Admin_GetOpenOrderData_FilterResult',
            $orders,
            [
                'subject' => $this,
                'id' => $this->session->offsetGet('sUserId'),
                'subshopID' => $this->contextService->getShopContext()->getShop()->getId(),
            ]
        );

        

    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']))
        ) {
            if (empty($dispatchData['surcharge_calculation'])) {
                return $payment['surcharge'];
            }

            
Home | Imprint | This part of the site doesn't use cookies.