sSaveOrder example

$order->sAmount = $basket[CheckoutKey::AMOUNT];
            $order->sAmountWithTax = !empty($basket[CartKey::AMOUNT_WITH_TAX_NUMERIC]) ? $basket[CartKey::AMOUNT_WITH_TAX_NUMERIC] : $basket[CartKey::AMOUNT_NUMERIC];
            $order->sAmountNet = $basket[CartKey::AMOUNT_NET_NUMERIC];
            $order->sShippingcosts = $basket[CheckoutKey::SHIPPING_COSTS];
            $order->sShippingcostsNumeric = $basket[CheckoutKey::SHIPPING_COSTS_WITH_TAX];
            $order->sShippingcostsNumericNet = $basket[CheckoutKey::SHIPPING_COSTS_NET];
            $order->bookingId = $transactionId;
            $order->dispatchId = Shopware()->Session()->get('sDispatch');
            $order->sNet = empty($user['additional']['charge_vat']);
            $order->uniqueID = $paymentUniqueId;
            $order->deviceType = $this->Request()->getDeviceType();
            $orderNumber = $order->sSaveOrder();
        }

        if (!empty($orderNumber) && !empty($paymentStatusId)) {
            $this->savePaymentStatus($transactionId$paymentUniqueId$paymentStatusId$sendStatusMail);
        }

        return $orderNumber;
    }

    /** * Saves the payment status an sends and possibly sends a status email. * * @param string $transactionId * @param string $paymentUniqueId * @param int $paymentStatusId * @param bool $sendStatusMail */
$order->sBasketData = $normalizer->normalize($this->View()->getAssign('sBasket'));
        $order->sAmount = $this->View()->getAssign('sBasket')[CheckoutKey::AMOUNT];
        $order->sAmountWithTax = !empty($this->View()->getAssign('sBasket')[CartKey::AMOUNT_WITH_TAX_NUMERIC]) ? $this->View()->getAssign('sBasket')[CartKey::AMOUNT_WITH_TAX_NUMERIC] : $this->View()->getAssign('sBasket')[CartKey::AMOUNT_NUMERIC];
        $order->sAmountNet = $this->View()->getAssign('sBasket')[CartKey::AMOUNT_NET_NUMERIC];
        $order->sShippingcosts = $this->View()->getAssign('sBasket')[CheckoutKey::SHIPPING_COSTS];
        $order->sShippingcostsNumeric = $this->View()->getAssign('sBasket')[CheckoutKey::SHIPPING_COSTS_WITH_TAX];
        $order->sShippingcostsNumericNet = $this->View()->getAssign('sBasket')[CheckoutKey::SHIPPING_COSTS_NET];
        $order->dispatchId = $this->session['sDispatch'];
        $order->sNet = !$this->View()->getAssign('sUserData')['additional']['charge_vat'];
        $order->deviceType = $this->Request()->getDeviceType();

        return $order->sSaveOrder();
    }

    /** * @deprecated in 5.6, will be protected in 5.8 * * Used in ajax add cart action * Check availability of product and return info / error - messages * * @param string $orderNumber product order number * @param int $quantity quantity * * @return string|null */
Home | Imprint | This part of the site doesn't use cookies.