Change the values of product property feature parameters or variations catalog.productPropertyFeature.update

We are still updating this page

Some data may be missing here — we will fill it in shortly.

Scope: catalog

Who can execute the method: any user

catalog.productPropertyFeature.update(id, fields)
        

Method for updating the values of product property feature parameters or variations.

Parameters

Parameter

Description

id
integer

Identifier of the product property feature or variations

fields
object

Fields corresponding to the available list of fields fields.

Required parameters are marked with *

Examples

try
        {
        	const response = await $b24.callMethod(
        		'catalog.productPropertyFeature.update',
        		{
        			id: 144,
        			fields: {
        				propertyId: 128,
        				featureId: "IN_BASKET",
        				moduleId: "catalog",
        				isEnabled: "Y"
        			}
        		}
        	);
        	
        	const result = response.getData().result;
        	console.log(result);
        }
        catch( error )
        {
        	console.error(error.ex);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'catalog.productPropertyFeature.update',
                    [
                        'id' => 144,
                        'fields' => [
                            'propertyId' => 128,
                            'featureId' => "IN_BASKET",
                            'moduleId' => "catalog",
                            'isEnabled' => "Y"
                        ]
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error()->ex);
            } else {
                echo 'Success: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error updating product property feature: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'catalog.productPropertyFeature.update',
            {
                id: 144,
                fields: {
                    propertyId: 128,
                    featureId: "IN_BASKET",
                    moduleId: "catalog",
                    isEnabled: "Y"
                }
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error().ex);
                else
                    console.log(result.data());
            }
        );
        

How to Use Examples in Documentation