ProductTable class for handling table with catalog products.

Class methods

MethodDescription Available from version
calculateAvailableReturns flag Y/N set for product purchase availability for passed product array.
clearProductCacheResets internal cache on a hit.
getCurrentRatioWithMeasureReturns code or rate for product units of measurement.
getDefaultAvailableSettingsReturns settings available by default.
getMapReturns list of fields for catalog product table.
getPaymentPeriodsReturns list of payment periods.
getPaymentTypesReturns list payment types.
getProductTypesReturns list product types.
getTableNameReturns name for table with catalog products.
isExistProductChecks available data on product with $product ID.
loadDefaultProductSettingsGets default product parameters from module settings.
prepareCanBuyZeroGets the field value CAN_BUY_ZERO and if it equals D, returns CAN_BUY_ZERO field module's setting instead.
prepareQuantityTraceGets field value QUANTITY_TRACE and if it equals D, returns the QUANTITY_TRACE field's module setting instead of current value.
prepareSubscribeGets the field value SUBSCRIBE and if it equals D, returns the SUBSCRIBE field's module setting instead of current value.
validatePriceTypeReturns validator for the field PRICE_TYPE.
validatePurchasingCurrencyReturns validator for the field PURCHASING_CURRENCY.
validateRecurSchemeType Returns validator for the field RECUR_SCHEME_TYPE.
validateTmpIdReturns validator for the field TMP_ID.

Catalog product fields

Field DescriptionType Required
ID Product code (ID). IntYes
QUANTITYNumber of warehouse products. Jointly with the field QUANTITY_TRACE allows co count the number of items for allow/deny purchase. Double Yes
QUANTITY_TRACE Flag "Enable stock control" (Y/N/D) . Char(1) Yes
WEIGHT Single item weight. Double Yes
TIMESTAMP_XDate and time for entry update.Datetime Yes
PRICE_TYPE Price type. Used for managing subscriptions. Value options:
  • S - single payment,
  • R - recurring payments,
  • T - trial subscription
RECUR_SCHEME_LENGTHSubscription period IntNo
RECUR_SCHEME_TYPESubscription period type. Value options:
  • "H" - hour,
  • "D" - day,
  • "W" - week,
  • "M" - month,
  • "Q" - quarter,
  • "S" - semester,
  • "Y" - year
TRIAL_PRICE_ID Trial product code (ID).IntNo
WITHOUT_ORDER Flag "Renewal without ordering" (Y/N). Char(1)Yes
VAT_ID Product-assigned VAT rate. IntNo
VAT_INCLUDED "VAT included" (Y/N). Char(1)No
CAN_BUY_ZERO "Make out-of-stock items available for purchase" (Y/N/D). Char(1)Yes
TMP_ID Temporary string identifier, used for service purposes. Varchar(40)No
PURCHASING_PRICE Purchase price. Decimal(18,2)No
PURCHASING_CURRENCY Purchase price currency. Char(3)No
BARCODE_MULTI Flag defines if each product item has its own barcode (Y/N). Char(1)Yes
QUANTITY_RESERVED Reserved quantity. DoubleNo
SUBSCRIBE Flag "Allow subscription for out-of-stock products" (Y/N/D). Char(1)No
WIDTH Product width (in mm). DoubleNo
LENGTH Product length (in mm). DoubleNo
HEIGHT Product height (in mm). DoubleNo
MEASURE Unit of measurement ID. IntNo
TYPE Product type. IntNo
AVAILABLE Product availability flag (Y/N). Char(1)No
BUNDLE Product bundle flag (Y/N). Char(1)No

Product types

Main DescriptionAvailable from version
\Bitrix\Catalog\ProductTable::TYPE_PRODUCT Standard product
\Bitrix\Catalog\ProductTable::TYPE_SET Set
\Bitrix\Catalog\ProductTable::TYPE_SKU Product with SKUs
\Bitrix\Catalog\ProductTable::TYPE_OFFER SKU
Additional DescriptionAvailable from version
\Bitrix\Catalog\ProductTable::TYPE_FREE_OFFER SKU without product (not specified or deleted).
\Bitrix\Catalog\ProductTable::TYPE_EMPTY_SKU Specific type. Indicates invalid product with SKUs.
Added into shopping cart DescriptionAvailable from version
\Bitrix\Catalog\ProductTable::TYPE_PRODUCT Standard product
\Bitrix\Catalog\ProductTable::TYPE_SET Set
\Bitrix\Catalog\ProductTable::TYPE_OFFER SKU/td>

© «Bitrix24», 2001-2022