Documentation

Add

Description and parameters

int CCatalogStore::Add( array arFields);

Method adds new warehouse according to details from arFields array. Static method.

Call parameters

Parameter Description
arFieldsAssociative array with new warehouse parameters, with keys as parameter names and corresponding values. Permitted keys:
    Parameter Description
    ID Warehouse ID for updating.
    arFieldsAssociative with warehouse parameters, with keys as parameter names and corresponding values. Permissible keys:
    • TITLE - warehouse name;
    • ACTIVE - warehouse active ('Y' - yes, 'N' - not active);
    • ADDRESS - warehouse address;
    • DESCRIPTION - warehouse description;
    • GPS_N - GPS coordinate (latitude);
    • GPS_S - GPS coordinate (longitude);
    • IMAGE_ID - warehouse image ID;
    • PHONE - telephone;
    • SCHEDULE - warehouse schedule;
    • XML_ID - warehouse XML_ID for 1C export\импорта;
    • ISSUING_CENTER - Pick-up location (Y/N);
    • SHIPPING_CENTER - Shipping center (Y/N).
    • SITE_ID - site.

    Returned value

    Returns ID for newly created warehouse, if adding is successful, otherwise returns false.

    Examples

    $arFields = Array(
    		"TITLE" => $TITLE,
    		"ACTIVE" => $ACTIVE,
    		"ADDRESS" => $ADDRESS,
    		"DESCRIPTION" => $DESCRIPTION,
    		"IMAGE_ID" => $fid,
    		"GPS_N" => $GPS_N,
    		"GPS_S" => $GPS_S,
    		"PHONE" => $PHONE,
    		"SCHEDULE" => $SCHEDULE,
    		"XML_ID" => $XML_ID,
    	);
    	
    	$ID = CCatalogStore::Add($arFields);


    © «Bitrix24», 2001-2024
    Up