original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Applies an action to the cart items
docstring_tokens: Applies an action to the cart items