You are here

public function UcAjaxCart::hasRequiredAttributes in Ubercart AJAX Cart 7.2

Same name and namespace in other branches
  1. 6.2 uc_ajax_cart.php \UcAjaxCart::hasRequiredAttributes()
1 call to UcAjaxCart::hasRequiredAttributes()
UcAjaxCart::checkKitToCart in ./uc_ajax_cart.extender.inc

File

./uc_ajax_cart.extender.inc, line 87

Class

UcAjaxCart

Code

public function hasRequiredAttributes($product) {
  if (!isset($product->attributes) || !is_array($product->attributes)) {
    return false;
  }
  foreach ($product->attributes as $attribute) {
    if ($attribute->required == "1") {
      return true;
      break;
    }
  }
}