sDeleteArticle example

/** * Delete a product from cart - * * request param "sDelete" = id from s_basket identifying the product to delete * Forward to cart / confirmation page after success * * @return void */
    public function deleteArticleAction()
    {
        if ($this->Request()->getParam('sDelete')) {
            $this->basket->sDeleteArticle($this->Request()->getParam('sDelete'));
        }
        $this->redirect(['action' => $this->Request()->getParam('sTargetAction', 'index')]);
    }

    /** * Change quantity of a certain product * * request param "sArticle" = The product to update * request param "sQuantity" = new quantity * Forward to cart / confirm view after success * * @return void */

    public function sUpdateVoucher()
    {
        $voucher = $this->sGetVoucher();
        if ($voucher) {
            $this->sDeleteArticle('voucher');
            if (\is_array($this->sAddVoucher($voucher['code']))) {
                $this->session->offsetSet('sBasketVoucherRemovedInCart', true);
            }
        }
    }

    /** * Insert basket discount * Used only internally in sBasket::sGetBasket() * * @throws \Enlight_Exception * @throws \Enlight_Event_Exception * @throws \Zend_Db_Adapter_Exception */
Home | Imprint | This part of the site doesn't use cookies.