VirtueMart
3.2.14.9808
|
Public Member Functions | |
__construct () | |
populateState () | |
getOrderIdByOrderPass ($orderNumber, $orderPass) | |
getOrderNumber ($virtuemart_order_id) | |
getOrderId ($order_id, $direction='DESC') | |
getMyOrderDetails ($orderID=0, $orderNumber=false, $orderPass=false, $userlang=false) | |
getOrder ($virtuemart_order_id) | |
getOrdersList ($uid=0, $noLimit=false) | |
updateSingleItem ($virtuemart_order_item_id, &$orderdata, $orderUpdate=false, &$vatTax=false, $itemTaxes=array()) | |
calculateRow ($data, $taxCalcValue, $rounding, $daTax=true, $withTax=true, $overrideDiscount=false) | |
updateBill ($virtuemart_order_id, $vattax) | |
updateOrderStatus ($orders=0, $order_id=0, $order_status=0) | |
updateStatusForOneOrder ($virtuemart_order_id, $inputOrder, $useTriggers=true) | |
createOrderFromCart ($cart) | |
reUsePendingOrder ($_cart, $customer_number=false) | |
handleStockAfterStatusChangedPerProduct ($newState, $oldState, $tableOrderItems, $quantity) | |
_updateOrderHist ($_id, $_status= 'P', $_notified=0, $_comment= '') | |
notifyCustomer ($virtuemart_order_id, $newOrderData=0) | |
createInvoiceByOrder ($order) | |
getOrderLineDetails ($orderId, $orderLineId) | |
saveOrderLineItem ($data) | |
removeOrderItems ($virtuemart_order_id, $auth=true) | |
removeOrderLineItem ($orderLineId) | |
remove ($ids) | |
UpdateOrderHead ($virtuemart_order_id, $_orderData) | |
CreateOrderHead () | |
createInvoiceNumber ($orderDetails, &$invoiceNumber) | |
renameInvoice ($order_id) | |
deleteInvoice ($order_id) | |
Public Member Functions inherited from VmModel | |
__construct ($cidName='cid', $config=array()) | |
setDebugSql ($b) | |
getName () | |
setState ($property, $value=null) | |
getState ($property=null, $default=null) | |
getTable ($name= '', $prefix= 'Table', $options=array()) | |
setIdName ($idName) | |
getIdName () | |
getId () | |
setId ($id) | |
setMainTable ($maintablename, $maintable=0) | |
getDefaultOrdering () | |
addvalidOrderingFieldName ($add) | |
removevalidOrderingFieldName ($name) | |
setDefaultValidOrderingFields ($defaultTable=null) | |
_getOrdering ($preTable='') | |
checkFilterOrder ($toCheck, $view=0, $task= '') | |
checkValidOrderingFieldName ($toCheck) | |
checkFilterDir ($toCheck, $view=0, $task= '') | |
getPagination ($perRow=5) | |
setPaginationLimits () | |
getTotal () | |
setGetCount ($withCount) | |
exeSortSearchListQuery ($object, $select, $joinedTables, $whereString= '', $groupBy= '', $orderBy= '', $filter_order_Dir= '', $nbrReturnProducts=false) | |
emptyCache () | |
getData ($id=0) | |
store (&$data) | |
remove ($ids) | |
setToggleName ($togglesName) | |
toggle ($field, $val=NULL, $cidname=0, $tablename=0, $view=false) | |
move ($direction, $filter=null) | |
saveorder ($cid=array(), $order, $filter=null) | |
addImages ($obj, $limit=0) | |
resetErrors () | |
Public Member Functions inherited from vObject | |
__toString () | |
get ($prop, $def=null) | |
set ($prop, $value=null) | |
setProperties ($props) | |
Static Public Member Functions | |
static | getOrderIdByOrderNumber ($orderNumber) |
static | isEmptyDec ($d, $n) |
static | isNotEmptyDec ($d, $n) |
static | genStdOrderPass () |
static | genStdCreateInvoicePass () |
static | genStdOrderNumber ($virtuemart_vendor_id=1, $length=4) |
static | generateOrderNumber ($uid=0, $length=5, $virtuemart_vendor_id=1) |
static | getInvoiceNumber ($virtuemart_order_id) |
Static Public Member Functions inherited from VmModel | |
static | addTablePath ($path) |
static | addIncludePath ($path= '', $prefix= '') |
static | getInstance ($type, $prefix= '', $config=array()) |
static | getModel ($name=false) |
static | joinLangTables ($tablename, $prefix, $on, $method=0) |
static | joinLangSelectFields ($langFields, $as=true) |
static | joinLangLikeFields ($langFields, $keyword) |
static | joinLangLikeField ($searchField, $keyword) |
Public Attributes | |
$useDefaultEmailOrderStatus = true | |
Public Attributes inherited from VmModel | |
$_id = 0 | |
$_data = null | |
$_query = null | |
$_total = null | |
$_pagination = 0 | |
$_limit = 0 | |
$_limitStart = 0 | |
$_maintable = '' | |
$_maintablename = '' | |
$_idName = '' | |
$_cidName = 'cid' | |
$_togglesName = null | |
$_selectedOrderingDir = 'DESC' | |
$_noLimit = false | |
$_tablePreFix = '' | |
$_validOrderingFieldName = array() | |
$_validFilterDir = array('ASC','DESC') | |
Private Member Functions | |
getOrdersListQuery () | |
_createOrder ($_cart, $_usr) | |
getVendorCurrencyId ($vendorId) | |
_writeUserInfo ($_id, &$_usr, $_cart) | |
_createOrderLines ($virtuemart_order_id, $cart) | |
_createOrderCalcRules ($order_id, $_cart) | |
_updateOrderItemHist ($_id, $status= 'P', $notified=1, $comment= '') | |
Additional Inherited Members | |
Protected Member Functions inherited from VmModel | |
populateState () | |
_createTable ($name, $prefix= 'Table', $config=array()) | |
_getList ($query, $limitstart=0, $limit=0) | |
_getListCount ($query) | |
Static Protected Member Functions inherited from VmModel | |
static | _createFileName ($type, $parts=array()) |
Protected Attributes inherited from VmModel | |
$__state_set = null | |
$name | |
$option = null | |
$state | |
$event_clean_cache = null | |
$_maxItems = 1000 | |
VirtueMartModelOrders::__construct | ( | ) |
constructs a VmModel setMainTable defines the maintable of the model
|
private |
Write the order header record
object | $_cart | The cart data |
object | $_usr | User object |
array | $_prices | Price data |
|
private |
Create the ordered item records
integer | $_id | integer Order ID |
object | $_cart | array The cart data |
|
private |
Create the ordered item records
integer | $_id | integer Order ID |
object | $_cart | array The cart data |
VirtueMartModelOrders::_updateOrderHist | ( | $_id, | |
$_status = 'P' , |
|||
$_notified = 0 , |
|||
$_comment = '' |
|||
) |
Update the order history
$_id | Order ID |
$_status | New order status (default: P) |
$_notified | 1 (default) if the customer was notified, 0 otherwise |
$_comment | (Customer) comment, default empty |
|
private |
Update the order item history
$_id | Order ID |
$_status | New order status (default: P) |
$_notified | 1 (default) if the customer was notified, 0 otherwise |
$_comment | (Customer) comment, default empty |
|
private |
Write the BillTo record, and if set, the ShipTo record
integer | $_id | Order ID |
object | $_usr | User object |
object | $_cart | Cart object |
VirtueMartModelOrders::calculateRow | ( | $data, | |
$taxCalcValue, | |||
$rounding, | |||
$daTax = true , |
|||
$withTax = true , |
|||
$overrideDiscount = false |
|||
) |
VirtueMartModelOrders::createInvoiceByOrder | ( | $order | ) |
VirtueMartModelOrders::createInvoiceNumber | ( | $orderDetails, | |
& | $invoiceNumber | ||
) |
returns true if an invoice number has been created returns false if an invoice number has not been created due to some configuration parameters
VirtueMartModelOrders::createOrderFromCart | ( | $cart | ) |
Get the information from the cart and create an order from it
object | $_cart | The cart data |
VirtueMartModelOrders::CreateOrderHead | ( | ) |
Create empty order head record from admin only
VirtueMartModelOrders::deleteInvoice | ( | $order_id | ) |
Delete Invoice when an item is updated
$order_id | Id of the order |
|
static |
Generate a unique ordernumber. This is done in a similar way as VM1.1.x, although the reason for this is unclear to me :-S
integer | $uid | The user ID. Defaults to 0 for guests |
|
static |
|
static |
Generate a unique ordernumber using getHumanToken, which is a random token with only upper case chars and without 0 and O to prevent missreadings
integer | $virtuemart_vendor_id | For the correct count |
|
static |
Creates a standard order password
|
static |
VirtueMartModelOrders::getMyOrderDetails | ( | $orderID = 0 , |
|
$orderNumber = false , |
|||
$orderPass = false , |
|||
$userlang = false |
|||
) |
This is a proxy function to return an order safely, we may set the getOrder function to private Maybe the right place would be the controller, cause there are JRequests in it. But for a fast solution, still better than to have it 3-4 times in the view.html.php of the views.
VirtueMartModelOrders::getOrder | ( | $virtuemart_order_id | ) |
Load a single order, Attention, this function is not protected! Do the right manangment before, to be certain we suggest to use getMyOrderDetails
VirtueMartModelOrders::getOrderId | ( | $order_id, | |
$direction = 'DESC' |
|||
) |
Was also broken, actually used?
get next/previous order id
|
static |
This function gets the orderId, for payment response author Valerie Isaksen
VirtueMartModelOrders::getOrderIdByOrderPass | ( | $orderNumber, | |
$orderPass | |||
) |
This function gets the orderId, for anonymous users
VirtueMartModelOrders::getOrderLineDetails | ( | $orderId, | |
$orderLineId | |||
) |
Retrieve the details for an order line item.
string | $orderId | Order id number |
string | $orderLineId | Order line item number |
VirtueMartModelOrders::getOrderNumber | ( | $virtuemart_order_id | ) |
This function seems completly broken, JRequests are not allowed in the model, sql not escaped This function gets the secured order Number, to send with paiement
VirtueMartModelOrders::getOrdersList | ( | $uid = 0 , |
|
$noLimit = false |
|||
) |
Select the products to list on the product list page
$uid | integer Optional user ID to get the orders of a single user |
$_ignorePagination | boolean If true, ignore the Joomla pagination (for embedded use, default false) |
|
private |
List of tables to include for the product query
|
private |
VirtueMartModelOrders::handleStockAfterStatusChangedPerProduct | ( | $newState, | |
$oldState, | |||
$tableOrderItems, | |||
$quantity | |||
) |
|
static |
|
static |
VirtueMartModelOrders::notifyCustomer | ( | $virtuemart_order_id, | |
$newOrderData = 0 |
|||
) |
Notifies the customer that the Order Status has been changed
VirtueMartModelOrders::populateState | ( | ) |
VirtueMartModelOrders::remove | ( | $ids | ) |
Delete all record ids selected
VirtueMartModelOrders::removeOrderItems | ( | $virtuemart_order_id, | |
$auth = true |
|||
) |
remove product from order item table
$virtuemart_order_id | Order to clear |
$auth |
VirtueMartModelOrders::removeOrderLineItem | ( | $orderLineId | ) |
Remove an order line item.
string | $orderLineId | Order line item number |
VirtueMartModelOrders::renameInvoice | ( | $order_id | ) |
Rename Invoice (when an order is deleted)
$order_id | Id of the order |
VirtueMartModelOrders::reUsePendingOrder | ( | $_cart, | |
$customer_number = false |
|||
) |
VirtueMartModelOrders::saveOrderLineItem | ( | $data | ) |
Save an order line item.
VirtueMartModelOrders::updateBill | ( | $virtuemart_order_id, | |
$vattax | |||
) |
VirtueMartModelOrders::UpdateOrderHead | ( | $virtuemart_order_id, | |
$_orderData | |||
) |
Update order head record
VirtueMartModelOrders::updateOrderStatus | ( | $orders = 0 , |
|
$order_id = 0 , |
|||
$order_status = 0 |
|||
) |
VirtueMartModelOrders::updateSingleItem | ( | $virtuemart_order_item_id, | |
& | $orderdata, | ||
$orderUpdate = false , |
|||
& | $vatTax = false , |
||
$itemTaxes = array() |
|||
) |
Update an order item status $vatTax was $orderUpdate boolean, keeps now the vattaxes
VirtueMartModelOrders::updateStatusForOneOrder | ( | $virtuemart_order_id, | |
$inputOrder, | |||
$useTriggers = true |
|||
) |
Attention, if you use this function within your trigger take care of the last parameter, you should define it, this parameter maybe set to false in future releases
IMPORTANT: The $inputOrder can contain extra data by plugins
$virtuemart_order_id | ||
$inputOrder | ||
bool | $useTriggers |
If an order gets cancelled, fire a plugin event, perhaps some authorization needs to be voided
VirtueMartModelOrders::$useDefaultEmailOrderStatus = true |
Strange name is just temporarly
unknown_type | $order_id | |
unknown_type | $order_status |