public function getCountOfProduct(tpyProductInterface $product)
 {
     $count = 0;
     foreach ($this->getItems() as $item) {
         if ($item->getProductIdentifier() == $product->getUid()) {
             return $item->getCount();
         }
     }
     return 0;
 }
Example #2
0
 /**
  * get count of a specific product
  * @param tpyProductInterface $product
  * @return int Count of product
  */
 public function getCountOfProduct(tpyProductInterface $product)
 {
     return $this->_items[$product->getUid()]['count'];
 }