Remove a list of Products from the shopping cart
163370
public Completable removeProducts(List<Product> products) {
    List<Product> updatedShoppingCart = new ArrayList<>();
    updatedShoppingCart.addAll(itemsInShoppingCart.getValue());
    updatedShoppingCart.removeAll(products);
    itemsInShoppingCart.onNext(updatedShoppingCart);
    return Completable.complete();
  }
717303
def on_remove(self, widget, data=None):
        """"""

        path_list = None
        if self.view is not None:
            model, path_list = self.tree_view.get_selection().get_selected_rows()
        old_path = self.get_path()
        models = [self.list_store[path][self.MODEL_STORAGE_ID] for path in path_list] if path_list else []
        if models:
            try:
                self.remove_core_elements(models)
            except AttributeError as e:
                self._logger.warning("The respective core element of {1}.list_store couldn't be removed. -> {0}"
                                  "".format(e, self.__class__.__name__))
            if len(self.list_store) > 0:
                self.tree_view.set_cursor(min(old_path[0], len(self.list_store) - 1))
            return True
        else:
            self._logger.warning("Please select an element to be removed.")
544406
def countRemovedDataProducts(self):
        """"""
        return len([item for item, dp in self.wdplv.getItemDPList() if dp.policy == "remove"])
936544
function removeFromList(imageIdIndex) {
    const index = stackPrefetch.indicesToRequest.indexOf(imageIdIndex);

    if (index > -1) {
      // Don't remove last element if imageIdIndex not found
      stackPrefetch.indicesToRequest.splice(index, 1);
    }
  }
382627
def remove(self, pk):
        
        pk = str(pk)
        try:
            del self.items[pk]
        except KeyError:
            raise ItemNotInCart(pk=pk)
        self.update()
434326
def remove_for_target(self, target, products):
    
    for product in products:
      self._products_by_target[target].discard(product)
641389
public function RemoveInvalidItems()
    {
        // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them
        $oBasket = TShopBasket::GetInstance();
        $aValidIds = array();
        $this->GoToStart();
        $aValidShippingGroupItems = array();
        while ($oItem = &$this->Next()) {
            $oBasket->ResetAllShippingMarkers(); // we need to reset the shipping marker on every group call - since we want
            // to consider every single item in the basket

            if ($oItem->isAvailableIgnoreGroupRestriction()) {
                $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id);
                $aValidShippingGroupItems['x'.$oItem->id] = $oItem;
            }
        }
        $oBasket->ResetAllShippingMarkers(); // once we are done, we want to clear the marker again

        // remove any shipping groups that are not allowed to be shown when other shipping groups are available
        $aRealValidIds = array();
        foreach ($aValidIds as $sShippingGroupId) {
            /** @var $oItem TdbShopShippingGroup */
            $oItem = $aValidShippingGroupItems['x'.$sShippingGroupId];
            if ($oItem->allowedForShippingGroupList($aValidIds)) {
                $aRealValidIds[] = $sShippingGroupId;
            }
        }
        $aValidIds = $aRealValidIds;
        unset($aRealValidIds);

        $query = 'SELECT `shop_shipping_group`.*
                  FROM `shop_shipping_group`
                 WHERE ';
        if (count($aValidIds) > 0) {
            $query .= " `shop_shipping_group`.`id` IN ('".implode("','", $aValidIds)."') ";
        } else {
            $query .= ' 1 = 0 ';
        }
        $query .= ' ORDER BY `shop_shipping_group`.`position`';
        $this->Load($query);
    }
1106179
@Override
	public void removeByCProductId(long CProductId) {
		for (CommerceWishListItem commerceWishListItem : findByCProductId(
				CProductId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWishListItem);
		}
	}
117310
public function removeOrphanProducts()
    {
        $write = $this->getConnection();
        $catalogTable = $this->getTable(Schema::EMAIL_CATALOG_TABLE);
        $select = $write->select();
        $select->reset()
            ->from(
                ['c' => $catalogTable],
                ['c.product_id']
            )
            ->joinLeft(
                [
                    'e' => $this->getTable(
                        'catalog_product_entity'
                    ),
                ],
                'c.product_id = e.entity_id'
            )
            ->where('e.entity_id is NULL');

        //delete sql statement
        $deleteSql = $select->deleteFromSelect('c');

        //run query
        $write->query($deleteSql);
    }
1341487
def removeQuery( self ):
        
        items = self.uiQueryTREE.selectedItems()
        tree  = self.uiQueryTREE
        for item in items:
            parent = item.parent()
            if ( parent ):
                parent.takeChild(parent.indexOfChild(item))
            else:
                tree.takeTopLevelItem(tree.indexOfTopLevelItem(item))
        
        self.setQuery(self.query())
1164743
public function cleanSession()
    {
        // remove checkout session parameters
        $this->session->remove('select-delivery');
        $this->session->remove('delivery-id');
        $this->session->remove('existing-delivery-address');
        $this->session->remove('transaction-id');

        // abandon cart
        $this->cartProvider->abandonCart();
    }
120467
public function remove()
    {
        //if user selected not to update modules, skipping all updates
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("noButton")) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("blSkipDeletedExtChecking", true);

            return;
        }

        $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $oModuleList->cleanup();
    }
1315845
static function cleanupList( $productCollectionIDList )
    {
        $db = eZDB::instance();
        $db->begin();
        $inText = $db->generateSQLINStatement( $productCollectionIDList, 'productcollection_id', false, false, 'int' );
        $rows = $db->arrayQuery( "SELECT id FROM ezproductcollection_item WHERE $inText" );
        if ( count( $rows ) > 0 )
        {
            $itemIDList = array();
            foreach ( $rows as $row )
            {
                $itemIDList[] = $row['id'];
            }
            eZProductCollectionItemOption::cleanupList( $itemIDList );
        }
        $db->query( "DELETE FROM ezproductcollection_item WHERE $inText" );
        $db->commit();
    }
927915
function clear() {
  // TODO: Only remove used items
  data = {};
  if (localExists()) {
    try {
      // Clear session storage
      window.sessionStorage.clear();
    } catch (error) {
      _logger2.default.warn({
        description: 'Session storage could not be cleared.', error: error,
        obj: 'storage', func: 'removeItem'
      });
    }
  }
}
166924
@Override
	public void removeByCommercePriceListId(long commercePriceListId) {
		for (CommercePriceEntry commercePriceEntry : findByCommercePriceListId(
				commercePriceListId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceEntry);
		}
	}
840644
public Completable removeProduct(Product product) {
    List<Product> updatedShoppingCart = new ArrayList<>();
    updatedShoppingCart.addAll(itemsInShoppingCart.getValue());
    updatedShoppingCart.remove(product);
    itemsInShoppingCart.onNext(updatedShoppingCart);
    return Completable.complete();
  }
870574
static function cleanupList( $itemIDList )
    {
        $db = eZDB::instance();
        $inText = $db->generateSQLINStatement( $itemIDList, 'item_id', false, false, 'int' );
        $db->query( $q = "DELETE FROM ezproductcollection_item_opt WHERE $inText" );
    }