Update
bool CCatalogGroup::Update( int ID, array arFields );
Method updates parameters for price type with ID to the values from the arFields array. Both language-dependent and -independent parameters are saved. Also, there's an option to specify user groups with permissions to view and purchase products with prices of this type. Non-static method.
Call parameters
Parameter | Description |
---|---|
ID | Updated price type ID. |
arFields | Associative array with parameters for price type, with keys as parameter names and new values. Permissible parameters:
|
Returned values
Returns true on successfully updated price type parameters and false otherwise.
Example
<? $arFields = array( "NAME" => "retail", "SORT" => 100, "USER_GROUP" => array(2, 4), // visible prices for groups 2 and 4 "USER_GROUP_BUY" => array(2), // purchase price // only members of group 2 "USER_LANG" => array( "en" => "Retail" ) ); if (!CCatalogGroup::Update($ID, $arFields)) echo "Error adding price type"; ?>
© «Bitrix24», 2001-2024