Documentation

SKU

Class for handling SKUs.

Class constants

ConstantDescription
\Bitrix\Catalog\Product\Sku::OFFERS_ERRORIncorrect product or iblock data.
\Bitrix\Catalog\Product\Sku::OFFERS_NOT_EXISTSKU doesn't exist.
\Bitrix\Catalog\Product\Sku::OFFERS_NOT_AVAILABLESKU do exist, but none are available for purchase.
\Bitrix\Catalog\Product\Sku::OFFERS_AVAILABLESKU available for purchase.

Class methods

MethodDescription Available from version
allowedUpdateAvailableReturns true, when automatic update for product purchase availability is allowed.
disableUpdateAvailableDisables automatic update for product purchase availability.
enableUpdateAvailableEnables automatic update for product purchase availability.
getDefaultParentSettingsReturns default settings for products with SKUs depending on the flag $state.
getOfferStateReturns flag for general status of product SKUs with $productId for the method Sku::getDefaultParentSettings.
handlerAfterIblockElementAddHandler for the event OnAfterIBlockElementAdd. Не используется напрямую.
handlerAfterIblockElementDeleteHandler for the event OnAfterIBlockElementDelete. Not used directly.
handlerAfterIBlockElementSetPropertyValuesHandler for the event OnAfterIBlockElementSetPropertyValues. Not used directly.
handlerAfterIblockElementUpdate Handler for the event OnAfterIBlockElementUpdate. Not used directly.
handlerIblockElementAdd Handler for the event OnIBlockElementAdd. Not used directly..
handlerIblockElementDeleteHandler for the event OnIBlockElementDelete. Not used directly.
handlerIblockElementSetPropertyValues Handler for the event OnIBlockElementSetPropertyValues. Not used directly.
handlerIblockElementUpdate Handler for the event OnIBlockElementUpdate. Not used directly.
updateAvailableUpdates flag for product purchase availability.
(deprecated from version 17.6.0)
calculateCompleteCalled when product availability, type and sorting by prices for products with SKUs must be updated. Receives as an argument a primary product ID or SKU ID.
calculatePriceOnly updates sorting by SKU prices (under condition that product availability and product type are already correct).
calculateCalculation procedure. When deferred calculation mode is enabled, it must be called independently. The necessary data must be processed in Sku::calculateComplete or Sku::calculatePrice.
enableDeferredCalculationEnables deferred calculation for product and price availability.
disableDeferredCalculationDisables deferred calculation for product price and availability.
usedDeferredCalculationReturns true, when deferred calculation for product price and availability.


© «Bitrix24», 2001-2024
Up