sDeleteBasket example

return $insertId;
    }

    /** * @deprecated with 5.5, will be removed with 5.7. Use sDeleteBasket instead * * Clear basket for current user */
    public function clearBasket()
    {
        $this->sDeleteBasket();
    }

    /** * Refresh basket after login / currency change * Used in multiple locations * * @throws \Exception * @throws \Enlight_Exception * @throws \Enlight_Event_Exception * @throws \Zend_Db_Adapter_Exception */
    
return true;
    }

    public function logout()
    {
        if ($this->config->get('migrateCartAfterLogin')) {
            Shopware()->Container()->get(CartPersistServiceInterface::class)->prepare();
        }

        if ($this->config->get('clearBasketAfterLogout')) {
            $this->moduleManager->Basket()->sDeleteBasket();
        }

        $this->session->clear();
        $this->regenerateSessionId(true);

        if ($this->config->get('migrateCartAfterLogin')) {
            Shopware()->Container()->get(CartPersistServiceInterface::class)->persist();
        }

        $shop = Shopware()->Shop();

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