Skip to main content

Remove product from cart


Use this method to remove a product that was added to the shopping cart, during the current session.


This method requires you to set a specific partner using setPartner.


Parameter Type/Description
sessionID Required (String)
  Session identifier, which is the output of the Login method. An exception is thrown if the values are incorrect.
productId Required (Integer)
  Unique product identifier from the Avangate system.
priceOptions Optional (StringArray)

Array of price options codes. These identifiers mark the individual options inside pricing options configuration groups.

This parameter must match exactly the pricing option combination of the product added to the cart in order for the product to be removed.


Partner orders can involve the same product, bot ordered in multiple instances, each with different pricing options.


Can be NULL.

quantity Optional (Integer)
  Defines the number of product units added to cart that should be removed. If no quantity info is provided, the product is completely removed from cart. Can be NULL.


Parameters Type/Description
Result Boolean
  True or false



require('PATH_TO_AUTH'); // Authentication example:
require('PATH_TO_setPartner'); // setPartner example:
require('PATH_TO_addProduct'); // addProduct example:

$productId = 'YOUR_PRODUCT_ID';
$priceOptions = array(
$quantity = YOUR_QUANTITY;

try {
$RemoveProduct= $client->deleteProduct ($sessionID, $productId, $priceOptions, $quantity);
} catch (SoapFault $e) {
echo "ProductDeleted: " . $e->getMessage();
var_dump ("ProductDeleted ", $RemoveProduct);


Error Description


The shopping cart is empty.


There is no product with the specified settings in cart.


  • Was this article helpful?