You are here

public function UcAjaxCart::hasItemInCart in Ubercart AJAX Cart 7.2

Same name and namespace in other branches
  1. 6.2 uc_ajax_cart.php \UcAjaxCart::hasItemInCart()

File

./uc_ajax_cart.extender.inc, line 15

Class

UcAjaxCart

Code

public function hasItemInCart($nodeID) {
  $cartContent = $this
    ->getCartContents();
  foreach ($cartContent as $item) {
    if ($item->nid == $nodeID) {
      return true;
    }
  }
}