You are here

public function UcWishlistManager::isProductInWishlist in UC Wish List 8

Checks the availability of a particular product within a wish list. Returns true, otherwise returns false if product is not found.

Parameters

$wid: refers to a particular wish list id.

$pid: refers to a particular product id.

Return value

bool Returns true if product within list, otherwise false.

File

src/Database/UcWishlistManager.php, line 283

Class

UcWishlistManager
Defines an UcWishlistManager service.

Namespace

Drupal\uc_wishlist\Database

Code

public function isProductInWishlist($wid, $pid) {
  $this->connection
    ->query("SELECT * FROM {uc_wishlist_products} WHERE nid = :pid AND wid = :wid", [
    ':pid' => $pid,
    ':wid' => $wid,
  ]);
  return $this->connection;
}