Remove a product from the basket

@param string $sku
@return void
968796
public function remove($sku)
    {
        $product = $this->pick($sku);

        $this->products->remove($sku);
    }
490966
public function removeStockEntry(string $sku) {
    if (empty($sku)) {
      return;
    }

    // Confirm SKU is not available in any language.
    $query = $this->connection->select('acm_sku_field_data', 'sku');
    $query->condition('sku', $sku);
    $query->addField('sku', 'sku');
    $result = $query->execute()->fetchAssoc();

    if (!empty($result)) {
      return;
    }

    // Remove stock only after SKU is removed in all the languages.
    $this->connection->delete('acm_sku_stock')
      ->condition('sku', $sku)
      ->execute();
  }
24818
public function remove(string $key): void
    {
        $key = $this->prepareKey($key);
        $this->properties = Arr::remove($this->properties, $key);
    }
494497
public function RemoveArticleFromWishlist($sPkgShopWishlistArticleId)
    {
        $oWishlist = &$this->GetWishlist(true);
        $oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance();
        /** @var $oWishlistItem TdbPkgShopWishlistArticle */
        if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishlist_id' => $oWishlist->id, 'id' => $sPkgShopWishlistArticleId))) {
            $oWishlistItem->AllowEditByAll(true);
            $oWishlistItem->Delete();
        }
    }
110053
private function releaseLock(string $sku) {
    $lock_key = self::class . ':' . $sku;
    $this->lock->release($lock_key);
  }
65277
protected function deleteProductClass()
    {
        $this->controlAccess('product_class_delete');

        if ($this->product_class->delete($this->data_product_class['product_class_id'])) {
            $this->redirect('admin/content/product-class', $this->text('Product class has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Product class has not been deleted'), 'warning');
    }
725650
static function removeReferencesToProductCategory( $cartegoryID )
    {
        $db = eZDB::instance();
        $query = "DELETE FROM ezvatrule_product_category WHERE product_category_id=" . (int) $cartegoryID;
        $db->query( $query );
    }
710901
public function refreshStock(string $sku) {
    try {
      $stock = $this->apiWrapper->skuStockCheck($sku);
      $this->processStockMessage($stock);
    }
    catch (\Exception $e) {
      $this->logger->error('Exception occurred while resetting stock for sku: @sku, message: @message', [
        '@sku' => $sku,
        '@message' => $e->getMessage(),
      ]);
    }
  }
128401
public function update($sku, Closure $action)
    {
        $product = $this->pick($sku);

        $product->action($action);
    }
197590
public function update($sku, array $item)
    {
        if ($this->offsetExists($sku)) {
            $item = array_merge($this->offsetGet($sku), $item);

            // update sub-total
            $item[ 'subTotal' ][ 'price' ] = $item[ 'price' ] * $item[ 'quantity' ];
            $item[ 'subTotal' ][ 'weight' ] = $item[ 'weight' ] * $item[ 'quantity' ];

            $this->storage[ $sku ] = $item;

            return true;
        }

        return false;
    }
7249
public function findAllBySku($sku)
    {

        // prepare the params
        $params = array(MemberNames::SKU => $sku);

        // initialize the array for the category product relations
        $categoryProducts = array();

        // load and return the product category relation for the passed product SKU
        $this->categoryProductsBySkuStmt->execute($params);

        // prepare the result by using the category ID as key
        foreach ($this->categoryProductsBySkuStmt->fetchAll(\PDO::FETCH_ASSOC) as $categoryProduct) {
            $categoryProducts[$categoryProduct[MemberNames::CATEGORY_ID]] = $categoryProduct;
        }

        // return the category product relations
        return $categoryProducts;
    }
30004
public function removeProductOptionValue(\Dywee\ProductBundle\Entity\ProductOptionValue $productOptionValue)
    {
        $this->productOptionValues->removeElement($productOptionValue);
    }
702016
public function remove($id)
    {
        $id = (string) $id;

        $this->validateRemove($id);

        if (!$this->has($id)) {
            return;
        }

        unset($this->items[$id]);
    }
1020921
public function show($sku)
    {
        $options = $this->getParams('includes');

        $order = Subbly::api('subbly.order')->find($sku, $options);

        return $this->jsonResponse(array(
            'order' => $this->presenter->single($order),
        ));
    }
309268
public function remove($key)
	{
		if(($item=parent::remove($key))!==null)
			$this->_form->removedElement($key,$item,$this->_forButtons);
	}
2250
public function handle(RemoveFromCart $command)
    {
        $cart = $this->carts->getById(new CartId($command->cartId()));
        $cart->remove(new SKU($command->sku()));
    }
627914
public function sort($product_sku)
    {
        if (!Input::has('sortable')) {
            return $this->jsonErrorResponse('"sortable" is required.');
        }

        $images = Subbly::api('subbly.product_image')->sort(Input::get('sortable'));

        return $this->jsonResponse(array(),
        array(
            'status' => array('message' => 'Product updated'),
        ));
    }