sCheckForESD example

/** * @deprecated in 5.6, will be protected in 5.8 * * Check if any electronically distribution product is in basket * * @return bool */
    public function getEsdNote()
    {
        $payment = empty($this->View()->getAssign('sUserData')['additional']['payment']) ? $this->session['sOrderVariables']['sUserData']['additional']['payment'] : $this->View()->getAssign('sUserData')['additional']['payment'];

        return $this->basket->sCheckForESD() && !$payment['esdactive'];
    }

    /** * @deprecated in 5.6, will be protected in 5.8 * * Check if a custom inquiry possibility should displayed on cart page * Compare configured inquiry value with current amount * * @return bool */
    public function getInquiry()
    {
/** * Will be called when no action is supplied */
    public function indexAction()
    {
        $sTarget = $this->Request()->getParam('sTarget', 'account');
        $sTargetAction = $this->Request()->getParam('sTargetAction', 'index');

        $this->View()->assign([
            'sTarget' => $sTarget,
            'sTargetAction' => $sTargetAction,
            'sEsd' => Shopware()->Modules()->Basket()->sCheckForESD(),
            'showNoAccount' => $this->Request()->getParam('showNoAccount', false),
            'accountMode' => $this->Request()->getParam('skipLogin'),
        ]);

        if ($this->shouldRedirectToAccount()) {
            $this->forward('index', 'account');

            return;
        }

        if ($this->shouldRedirectToCheckout()) {
            

    public function sGetPaymentMeanById($id$user = false)
    {
        $id = (int) $id;
        $resetPayment = false;

        $data = $this->db->fetchRow(
            'SELECT * FROM s_core_paymentmeans WHERE id = ?',
            [$id]
        ) ?: [];

        $sEsd = $this->moduleManager->Basket()->sCheckForESD();
        $isMobile = $this->front->Request()->getDeviceType() === 'mobile';

        $customer = $user;
        if (!\is_array($customer)) {
            $customer = [];
        }

        $paymentId = $data['id'] ?? null;

        // Check for risk management         // If rules match, reset to default payment mean if this payment mean was not
Home | Imprint | This part of the site doesn't use cookies.