Example #1
0
 public function checkAccess($id_customer)
 {
     return Product::checkAccessStatic((int) $this->id, (int) $id_customer);
 }
Example #2
0
 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;
 }
Example #3
0
 /**
  * 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;
 }