saveTemporaryOrder example

$this->View()->assign('sAmountNet', $this->View()->getAssign('sBasket')[CartKey::AMOUNT_NET_NUMERIC]);

        $this->View()->assign('sPremiums', $this->getPremiums());

        $this->View()->assign('sNewsletter', isset($this->session['sNewsletter']) ? $this->session['sNewsletter'] : null);
        $this->View()->assign('sComment', isset($this->session['sComment']) ? $this->session['sComment'] : null);

        $this->View()->assign('sShowEsdNote', $this->getEsdNote());
        $this->View()->assign('sDispatchNoOrder', $this->getDispatchNoOrder());
        $this->View()->assign('sRegisterFinished', !empty($this->session['sRegisterFinished']));

        $this->saveTemporaryOrder();

        if ($this->getMinimumCharge() || \count($this->View()->getAssign('sBasket')[CartKey::POSITIONS]) <= 0 || $this->View()->getAssign('sInvalidCartItems')) {
            $this->forward('cart');

            return;
        }

        $normalizer = $this->container->get('shopware.components.cart.proportional_cart_normalizer');
        $sOrderVariables = $this->View()->getAssign();
        $sOrderVariables['sBasketView'] = $sOrderVariables['sBasket'];
        $sOrderVariables['sBasket'] = $normalizer->normalize($sOrderVariables['sBasketView']);

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