Documentation

Add

Description and parameters

bool|int CCatalogStoreProduct::Add( array arFields);

Method adds a remaining product stock according to data from array arFields. Static method.

Call parameters

Parameter Description
arFieldsAssociative array with parameters with keys as parameter names and corresponding values. Permitted keys:
  • PRODUCT_ID - product ID;
  • STORE_ID - warehouse ID;
  • AMOUNT - product amount;

Returned value

Returns record ID on successful adding, otherwise returns false.

Examples

$arFields = Array(
		"PRODUCT_ID" => 71,
		"STORE_ID" => 1,
		"AMOUNT" => 50,
	);
	
	$ID = CCatalogStoreProduct::Add($arFields);

© «Bitrix24», 2001-2024
Up