int CCatalogGroup::Add( array arFields );
The method Add 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.
Parameter | Description |
---|---|
arFields | Associated array with the parameters of the new price type. In this
array, keys are the parameters names. The following key names are
allowed.
|
Returns the ID of the new price type on success, or false otherwise.
<? $arFields = array( "NAME" => "retail", "SORT" => 100, "USER_GROUP" => array(2, 4), // allow members of groups 2 and 4 to view "USER_GROUP_BUY" => array(2), // allow members of group 2 to purchase "USER_LANG" => array( "fr" => "Prix de détail", "en" => "Retail price" ) ); $ID = CCatalogGroup::Add($arFields); if ($ID<=0) echo "Error adding the price type"; ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |