public function checkAccess($id_customer) { return Product::checkAccessStatic((int) $this->id, (int) $id_customer); }
public function checkProductsAccess() { if (Configuration::get('PS_CATALOG_MODE')) { return true; } foreach ($this->getProducts() as $product) { if (!Product::checkAccessStatic($product['id_product'], $this->id_customer)) { return $product['id_product']; } } return false; }
/** * Check if the product can be accessed by the Customer * * @return bool Indicates if the Customer in the current Cart has access */ public function checkProductsAccess() { if (Configuration::isCatalogMode()) { return true; } foreach ($this->getProducts() as $product) { if (!Product::checkAccessStatic($product['id_product'], $this->id_customer)) { return $product['id_product']; } } return false; }