Basket
\Bitrix\Catalog\Product\Basket class for adding products into shopping cart.
Class works only with physical products and always require available PRODUCT_ID in contrast to \Bitrix\Sale\Basket. Additionally, when adding to shopping cart via \Bitrix\Catalog\Product\Basket
, checks activity, access permissions, product type and etc. It is not done by shopping cart methods.
Class methods
Method | Description | Available from version |
---|---|---|
addProduct | Adds product to current user's shopping cart (not an order) at the site. Developed for public components as replacement for function Add2BasketByProductID . |
|
addProductToBasket | Adds product to arbitrary shopping cart without access permission check for current user. | |
addProductToBasketWithPermissions | Adds product to arbitrary shopping cart with access permission check for current user. | |
isNotCrawler | Returns a check result that confirms that user is not a web crawler. |
© «Bitrix24», 2001-2024