You are here

public function UcAjaxCart::hasRequiredAttributes in Ubercart AJAX Cart 6.2

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

File

./uc_ajax_cart.php, line 101

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;
    }
  }
}