Documentation

catalog.product.getFieldsByFilter

catalog.product.getFieldsByFilter(filter)

The method returns commercial catalog product fields by filter.

Parameters

ParameterType Description
filterobjectTwo mandatory fields are passed to the filter:
  • iblockId - information block type;
  • productType - product type.
    • [1] => simple
    • [2] => bundle
    • [3] => SKU
    • [4] => product offer
    • [5] => generic offer
  • iblockSectionId - section ID.
  • name - title.


Examples

BX24.callMethod(
    'catalog.product.getFieldsByFilter', 
	{
        filter: {
			  iblockId: 13,
			  productType: 1
        }
    },
    function(result) {
        if (result.error())
            console.error(result.error().ex);
        else
            console.log(result.data());
    });

Returned fields

Field DescriptionTypeNote
active Active char
available Availability char Read only
bundle Bundle char Read only
canBuyZero Option: Make out-of-stock items available for purchase char
code Symbolic code string
createdBy Created by (id) integer
dateActiveFrom Active from datetime
dateActiveTo Active till datetime
dateCreate Date created datetime
detailPicture Detailed image file
detailText Detailed description string
detailTextType Detailed description type string
height Height double
iblockId Iblock ID integer Required field.
iblockSectionId Iblock section ID integer Required field.
id Product ID integer Read only.
length Length double
measure Unit of measurement integer
modifiedBy Modified by integer
name Name string Required field.
negativeAmountTrace Enable negative product quantity char Read only.
previewPicture Preview image file
previewText Preview description string
previewTextType Short description type string
priceType Price type char
propertyN Product property array Depends on property type. Array includes value (property description depending on the type) and valueId (property ID).
purchasingCurrency Currency string
purchasingPrice Price string
quantity Available quantity double
quantityReserved Reserved quantity double
quantityTrace Enable stock control char
sort Sorting integer
subscribe Product subscription char
timestampX Modified on datetime
type Type integer Read only.
vatId VAT ID integer
vatIncluded Tax included char
weight Weight double
width Width double
xmlId External code string

© «Bitrix24», 2001-2024
Up