The Commercial Catalog module includes wrapper functions that are used in connection with the e-Store module.
int Add2Basket( int PRICE_ID [, int QUANTITY ] );
The Add2Basket function adds a product item to the shopping cart given the price code PRICE_ID and the required QUANTITY (one by default) and returns the product position ID in the shopping cart.
Parameter | Description |
---|---|
PRICE_ID | Product item price code. |
QUANTITY | Number of items to be added (one by default). |
<? if (CModule::IncludeModule("sale") && CModule::IncludeModule("catalog")) { if (($action == "ADD2BASKET" || $action == "BUY") && IntVal($PRICE_ID)>0) { Add2Basket($PRICE_ID); if ($action == "BUY") LocalRedirect("basket.php"); } } ?>
array CatalogBasketCallback( int PRODUCT_ID [, int QUANTITY] ) );
void CatalogBasketOrderCallback( int PRODUCT_ID, int QUANTITY );
The callback functions are used for processing the shopping cart and order
operations. See the
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |