/** * Verifies if the chart has a kind of determined product * * @param integer|\Gabrieljmj\Cart\Product\ProductInterface $product * @return boolean */ public function has($product) { return $product instanceof ProductInterface ? isset($this->products[$product->getId()]) : isset($this->products[$product]); }
/** * Returns the price of all products summed * * @return integer */ public function getPrice() { return $this->product->getPrice() * $this->amount; }