protected function submitCartItemsCheckout()
    {
        $items = $this->getSubmitted('cart.items');

        if (empty($items)) {
            return null;
        }

        $errors = array();

        foreach ($items as $sku => $item) {
            $errors += $this->validateCartItemCheckout($sku, $item);
            if (empty($errors)) {
                $this->updateCartQuantityCheckout($sku, $item);
            }
        }

        if (empty($errors)) {
            $this->setSubmitted('cart.action.update', true);
        } else {
            $this->setMessageFormCheckout('cart.danger', $errors);
        }
    }
protected function submitCartItemsCheckout()
    {
        $items = $this->getSubmitted('cart.items');

        if (empty($items)) {
            return null;
        }

        $errors = array();

        foreach ($items as $sku => $item) {
            $errors += $this->validateCartItemCheckout($sku, $item);
            if (empty($errors)) {
                $this->updateCartQuantityCheckout($sku, $item);
            }
        }

        if (empty($errors)) {
            $this->setSubmitted('cart.action.update', true);
        } else {
            $this->setMessageFormCheckout('cart.danger', $errors);
        }
    }
protected function submitCartItemsCheckout ( ) { $ items = $ this -> getSubmitted ( 'cart.items' ) ; if ( empty ( $ items ) ) { return null ; } $ errors = array ( ) ; foreach ( $ items as $ sku => $ item ) { $ errors += $ this -> validateCartItemCheckout ( $ sku , $ item ) ; if ( empty ( $ errors ) ) { $ this -> updateCartQuantityCheckout ( $ sku , $ item ) ; } } if ( empty ( $ errors ) ) { $ this -> setSubmitted ( 'cart.action.update' , true ) ; } else { $ this -> setMessageFormCheckout ( 'cart.danger' , $ errors ) ; } }
Applies an action to the cart items
Applies an action to the cart items