Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Mage_Checkout

Module: Shopping Cart API

Resource: cart_product

Method:
  • cart_product.moveToCustomerQuote (SOAP V1)
  • shoppingCartProductMoveToCustomerQuote (SOAP V2)

Allows you to move products from the current quote to a customer quote.

Arguments:

TypeNameDescription
stringsessionIdSession ID
intquoteIdShopping cart ID
arrayproductsDataArray of shoppingCartProductEntity
stringstoreStore view ID or code (optional)

Return:

TypeNameDescription
booleanresultTrue if the product is moved to customer quote

The shoppingCartProductEntity content is as follows:

TypeNameDescription
stringproduct_idProduct ID
stringskuProduct SKU
doubleqtyProduct quantity
associativeArrayoptionsProduct custom options
associativeArraybundle_optionAn array of bundle item options (optional)
associativeArraybundle_option_qtyAn array of bundle items quantity (optional)
ArrayOfStringlinksAn array of links (optional)

Faults:
No Faults.

Examples

Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

$shoppingCartIncrementId = $proxy->call( $sessionId, 'cart.create', array( 'magento_store' ) );
$arrProducts = array(
	array(
		"product_id" => "1",
		"qty" => 2
	),
	array(
		"sku" => "testSKU",
		"quantity" => 4
	)
);
$resultCartProductAdd = $proxy->call(
	$sessionId,
	"cart_product.add",
	array(
		$shoppingCartId,
		$arrProducts
	)
);
$arrProducts = array(
	array(
		"product_id" => "1"
	),
);
$resultCartProductMove = $proxy->call(
	$sessionId,
	"cart_product.moveToCustomerQuote",
	array(
		$shoppingCartId,
		$arrProducts
	)
);

Create the Magento file system owner