Add
Description and parameters
int CCatalogGroup::Add( array arFields );
The method adds a new price type. This method stores both all the language-dependent and independent parameters. Additionally, you can specify user groups allowed to view and purchase products at prices of this type. Non-static method.
Parameters
Parameter | Description |
---|---|
arFields | Associative array with the parameters of the new price type. In this array, keys are the parameter names. Permissible parameters:
|
Returned value
Returns code for added price type or false otherwise.
Examples
<? $arFields = array( "NAME" => "retail", "SORT" => 100, "USER_GROUP" => array(2, 4), // visible to members of groups of 2 and 4 "USER_GROUP_BUY" => array(2), // purchase price // only members of group 2 "USER_LANG" => array( "en" => "Retail" ) ); $ID = CCatalogGroup::Add($arFields); if ($ID<=0) echo "Error adding price type"; ?>
© «Bitrix24», 2001-2024