sGetAmount example


        $this->View()->assign('paymentBlocked', true);
    }

    /** * Save basket to session */
    public function postDispatch()
    {
        $this->session->set('sBasketCurrency', Shopware()->Shop()->getCurrency()->getId());
        $this->session->set('sBasketQuantity', $this->basket->sCountBasket());
        $amount = $this->basket->sGetAmount();
        $this->session->set('sBasketAmount', empty($amount) ? 0 : array_shift($amount));

        if (($messageType = $this->Request()->query->get('removeMessage')) && $messageType === 'voucher') {
            $this->session->offsetUnset('sBasketVoucherRemovedInCart');
        }

        if ($this->session->offsetExists('sBasketVoucherRemovedInCart')) {
            $this->View()->assign('sBasketVoucherRemovedInCart', true);
        }
    }

    
$modules->System()->sUSERGROUPDATA = $shop->getCustomerGroup()->toArray();
            $modules->System()->sCurrency = $shop->getCurrency()->toArray();
        }

        $this->get(ContextServiceInterface::class)->initializeContext();

        $shopContext = $this->get(ContextServiceInterface::class)->getShopContext();

        $modules->Basket()->sRefreshBasket();
        $modules->Admin()->sGetPremiumShippingcosts($shopContext->getCountry() ? $shopContext->getCountry()->jsonSerialize() : null);

        $amount = $modules->Basket()->sGetAmount();
        $this->get('session')->offsetSet('sBasketAmount', empty($amount) ? 0 : array_shift($amount));
    }
}
foreach ($checkForEsdOnly as $esdCheck) {
            if ($esdCheck['esdarticle']) {
                $esdOnly = true;
            } else {
                $esdOnly = false;
            }
        }
        if (!empty($esdOnly)) {
            return [];
        }

        $sBasketAmount = $this->basketModule->sGetAmount();
        if (empty($sBasketAmount['totalAmount'])) {
            $sBasketAmount = 0;
        } else {
            $sBasketAmount = $sBasketAmount['totalAmount'];
        }
        $sql = ' SELECT p.ordernumber AS premium_ordernumber, startprice, subshopID, a.id AS articleID, a.main_detail_id FROM s_addon_premiums p, s_articles a, s_articles_details d2 WHERE p.ordernumber=d2.ordernumber AND d2.articleID=a.id AND (p.subshopID = ? OR p.subshopID = 0) ORDER BY p.startprice ASC ';

    public function sInsertPremium()
    {
        static $lastPremium;

        $sBasketAmount = $this->sGetAmount();
        $sBasketAmount = empty($sBasketAmount['totalAmount']) ? 0 : $sBasketAmount['totalAmount'];
        $sBasketAmount = (float) $sBasketAmount;

        $addPremium = $this->front->Request()->getQuery('sAddPremium');
        if (empty($addPremium)) {
            $deletePremium = $this->db->fetchCol(
                'SELECT basket.id FROM s_order_basket basket LEFT JOIN s_articles a ON a.id = basket.articleID LEFT JOIN s_articles_details d ON d.id = a.main_detail_id LEFT JOIN s_addon_premiums premium ON IF(a.configurator_set_id IS NULL, premium.ordernumber_export = basket.ordernumber, premium.ordernumber = d.ordernumber ) AND premium.startprice <= ? WHERE basket.modus = 1 AND premium.id IS NULL AND basket.sessionID = ?',
if (!$this->config->get('clearBasketAfterLogout')) {
            $this->moduleManager->Basket()->sRefreshBasket();

            $countries = $this->sGetCountryList();
            $country = reset($countries);
            if (!\is_array($country)) {
                $country = null;
            }

            $this->sGetPremiumShippingcosts($country);

            $amount = $this->moduleManager->Basket()->sGetAmount();
            $this->session->offsetSet('sBasketAmount', empty($amount) ? 0 : array_shift($amount));
        }

        $this->eventManager->notify('Shopware_Modules_Admin_Logout_Successful');
    }

    /** * Attempt to login a user in the frontend * Used for login and registration in frontend, also for user impersonation * from backend * * @param bool $ignoreAccountMode Allows customers who have chosen * the fast registration, one-time login after registration * * @throws Exception If no password encoder is specified * * @return array|false Array with errors that may have occurred, or false if * the process is interrupted by an event */
$view->assign('sShopname', Shopware()->Config()->get('shopName'));
    }

    /** * Returns basket amount * * @return float */
    public function getBasketAmount()
    {
        $amount = Shopware()->Modules()->Basket()->sGetAmount();

        return empty($amount) ? 0 : array_shift($amount);
    }

    /** * Returns current category id * * @param int $default * * @return int */
    
Home | Imprint | This part of the site doesn't use cookies.