original_string: protected function prepareItem(array $item, array $data)
      {
          $product = $this->product->getBySku($item['sku'], $item['store_id']);
  
          if (empty($product['status']) || $data['store_id'] != $product['store_id']) {
              return array();
          }
  
          $product['price'] = $this->currency->convert($product['price'], $product['currency'], $data['currency']);
  
          $calculated = $this->product->calculate($product);
  
          if ($calculated != $product['price']) {
              $item['original_price'] = $product['price'];
          }
  
          $item['product'] = $product;
          $item['price'] = $calculated;
          $item['total'] = $item['price'] * $item['quantity'];
  
          return $item;
      }
code: protected function prepareItem(array $item, array $data)
      {
          $product = $this->product->getBySku($item['sku'], $item['store_id']);
  
          if (empty($product['status']) || $data['store_id'] != $product['store_id']) {
              return array();
          }
  
          $product['price'] = $this->currency->convert($product['price'], $product['currency'], $data['currency']);
  
          $calculated = $this->product->calculate($product);
  
          if ($calculated != $product['price']) {
              $item['original_price'] = $product['price'];
          }
  
          $item['product'] = $product;
          $item['price'] = $calculated;
          $item['total'] = $item['price'] * $item['quantity'];
  
          return $item;
      }
code_tokens: protected function prepareItem ( array $ item , array $ data ) { $ product = $ this -> product -> getBySku ( $ item [ 'sku' ] , $ item [ 'store_id' ] ) ; if ( empty ( $ product [ 'status' ] ) || $ data [ 'store_id' ] != $ product [ 'store_id' ] ) { return array ( ) ; } $ product [ 'price' ] = $ this -> currency -> convert ( $ product [ 'price' ] , $ product [ 'currency' ] , $ data [ 'currency' ] ) ; $ calculated = $ this -> product -> calculate ( $ product ) ; if ( $ calculated != $ product [ 'price' ] ) { $ item [ 'original_price' ] = $ product [ 'price' ] ; } $ item [ 'product' ] = $ product ; $ item [ 'price' ] = $ calculated ; $ item [ 'total' ] = $ item [ 'price' ] * $ item [ 'quantity' ] ; return $ item ; }
docstring: Prepare a cart item
  @param array $item
  @param array $data
  @return array
docstring_tokens: Prepare a cart item