isGet example


        if ($this->Request()->getParam('sUniqueID') && !empty($this->session['sOrderVariables'])) {
            $sql = ' SELECT transactionID as sTransactionumber, ordernumber as sOrderNumber FROM s_order WHERE temporaryID=? AND userID=? ';

            $order = Shopware()->Db()->fetchRow($sql[$this->Request()->getParam('sUniqueID')Shopware()->Session()->get('sUserId')]);

            if (empty($order)) {
                if ($this->Request()->isGet()) {
                    $this->forward('confirm');

                    return;
                }
            } else {
                $this->View()->assign($order);
                $orderVariables = $this->session['sOrderVariables']->getArrayCopy();

                if (!empty($orderVariables['sOrderNumber'])) {
                    $orderVariables['sAddresses']['billing'] = $this->getOrderAddress($orderVariables['sOrderNumber'], 'billing');
                    $orderVariables['sAddresses']['shipping'] = $this->getOrderAddress($orderVariables['sOrderNumber'], 'shipping');
                    


        /** @var Enlight_Controller_Action $controller */
        $controller = $args->getSubject();
        $request = $controller->Request();

        // do not check internal sub-requests or validated requests         if ($request->getAttribute('_isSubrequest') || $request->getAttribute(self::CSRF_WAS_VALIDATED)) {
            return;
        }

        if ($request->isGet() && !$this->isProtected($controller)) {
            return;
        }

        if ($request->isPost() && $request->isXmlHttpRequest()) {
            return;
        }

        // skip whitelisted actions         if ($this->isWhitelisted($controller)) {
            return;
        }

        


    /** * @deprecated - Will be private with Shopware 5.8 * * @return bool */
    protected function shouldRedirect(Request $request, Shop $shop)
    {
        return // for example: template preview, direct shop selection via url             (
                $request->isGet()
                && $request->getQuery('__shop') !== null
                && (int) $request->getQuery('__shop') !== (int) $shop->getId()
            )
            // for example: shop language switch             || (
                $request->isPost()
                && $request->getPost('__shop') !== null
                && $request->getPost('__redirect') !== null
            )
        ;
    }

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