protected function prepareCart(array &$cart)
    {
        if (!empty($cart['items'])) {

            foreach ($cart['items'] as &$item) {
                $item['currency'] = $cart['currency'];
                $this->prepareCartItem($item);
            }

            $this->setItemTotalFormatted($cart, $this->price);
        }
    }
protected function prepareCart(array &$cart)
    {
        if (!empty($cart['items'])) {

            foreach ($cart['items'] as &$item) {
                $item['currency'] = $cart['currency'];
                $this->prepareCartItem($item);
            }

            $this->setItemTotalFormatted($cart, $this->price);
        }
    }
protected function prepareCart ( array & $ cart ) { if ( ! empty ( $ cart [ 'items' ] ) ) { foreach ( $ cart [ 'items' ] as & $ item ) { $ item [ 'currency' ] = $ cart [ 'currency' ] ; $ this -> prepareCartItem ( $ item ) ; } $ this -> setItemTotalFormatted ( $ cart , $ this -> price ) ; } }
Prepares an array of cart items
@param array $cart
Prepares an array of cart items