/** * Determine if the product string passed in is a product URL * @param string $url The URL string * @return boolean If true, then it's indeed a product */ protected function isProductUrl($url) { $product = $this->products->getByUrl($url); if ($product) { return true; } return false; }