You are here

public function UcWishlistManager::updateWantedQuantity in UC Wish List 8

The wish list gets updated on altering the allotted quantity of any product within the list by invoking this function and passing the wpid and qty variables as parameters.

Parameters

$wpid: refers to a particular wish list product id.

$qty: refers to the quantity assigned to the corresponding wish list product.

Return value

int An updated wish list product quantity.

File

src/Database/UcWishlistManager.php, line 250

Class

UcWishlistManager
Defines an UcWishlistManager service.

Namespace

Drupal\uc_wishlist\Database

Code

public function updateWantedQuantity($wpid, $qty) {
  $this->connection
    ->update('uc_wishlist_products')
    ->fields([
    'qty' => $qty,
  ])
    ->condition('wpid', $wpid, '=')
    ->execute();
}