catalog.store.add
Scope: catalog Permissions to execute: for all
catalog.store.add(fields)
Method adds a warehouse.
Returns ID for added warehouse on success.
Parameters
Parameter | Type | Description |
---|---|---|
fields | array | Added warehouse parameters. |
Example
BX24.callMethod( 'catalog.store.add', { fields: { 'title': 'Warehouse 1', 'sort': '100', 'active': 'Y', 'issuingCenter': 'Y', 'shippingCenter': 'Y', 'code': 'store_1', 'address': '76th, Lane st.', 'phone': '(555) 555-1234', 'schedule': 'Mon-Fri from 9:00 to 20:00, Sat-Sun from 11:00 to 18:00', 'xmlId': 'store_1', } }, function(result) { if(result.error()) console.error(result.error()); else console.log(result.data()); } );
$result = CRest::call( 'catalog.store.add', [ 'fields' => [ 'title' => 'Warehouse 1', 'sort' => '100', 'active' => 'Y', 'issuingCenter' => 'Y', 'shippingCenter' => 'Y', 'code' => 'store_1', 'address': '76th, Lane st.', 'phone': '(555) 555-1234', 'schedule': 'Mon-Fri from 9:00 to 20:00, Sat-Sun from 11:00 to 18:00', 'xmlId' => 'store_1', ], ] ); echo '<pre>'; print_r($result); echo '</pre>';
© «Bitrix24», 2001-2024