THE CLASS ITSELF
class Order
Description: Orders related functions… barebones for now without any features to manage orders. You might want to build this library up yourself.
File: cart-boxx/core/lib/LIB_Order.php
Example Usage
$_CB->extend(“Order”);
$orders = $_CB->DB->getAll();
$orders = $_CB->DB->getAll();
GET ORDERS
function count
Description: Count number of orders, for pagination use.
Parameters
None
Return
[INT] Number of orders.
function getAll
Description: Get all orders.
Parameters
[INT] $page – Optional, the current page number, will automatically LIMIT the results based on the PER_PAGE setting in the config database.
Return
[ARRAY] Orders.
[BOOL] False if no orders found.
[BOOL] False if no orders found.
function getID
Description: Get order by ID
Parameters
[INT] $id – Order ID
Return
[ARRAY] Order
[BOOL] False if order not found
[BOOL] False if order not found
UPDATE ORDERS
function update
Description: Update order status – See this for a complete list of the codes.
Parameters
[INT] $id – Order ID
[INT] $stat – Status code ID
[INT] $stat – Status code ID
Return
[BOOL] True on success, false on failure.