Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZOrder Class Reference

## Public Member Functions
| __construct ( $id="")
| store ()
| delete ()
| get ( $id="")
& | getAll ( $offset=0, $limit=40, $OrderBy="Date")
& | getByUser ( $offset=0, $limit=40, $OrderBy="Date", $user=false)
& | getCountByUser ( $user=false, $OrderBy=false)
& | getByCustomer ( $user)
& | getNew ()
& | search ( $queryText, $offset=0, $limit=20)
& | getSearchCount ( $queryText)
& | getTotalCount ()
& | date ()
| id ()
& | user ()
| shippingCharge ()
| shippingVAT ()
& | shippingAddress ()
| isVATInc ()
& | shippingUser ()
& | billingAddress ()
& | comment ()
& | shippingType ()
| paymentMethod ()
| isExported ( $value)
| personID ()
| companyID ()
| setPaymentMethod ( $value)
| setUser ( $user)
| setComment ( $value)
| setShippingAddress ( $shippingAddress, $user)
| setBillingAddress ( $billingAddress, $user)
| setShippingCharge ( $value)
| setShippingVAT ( $value)
| setIsVATInc ( $value)
| setStatus ( $type)
| setShippingTypeID ( $type)
| setIsExported ( $value)
| setPersonID ( $userID)
| setCompanyID ( $id)
& | initialStatus ()
& | lastStatus ()
& | statusHistory ()
& | items ()
& | usedVouchers ()
| totalPrice ( $user=false)
| totalPriceIncVAT ()
| totalVAT ()
| isOwner (&$user)
& | mostPopularProduct ()
& | expiringOrders ( $startdate, $time=86400)
| orderTotals (&$tax, &$total)
| voucherTotal (&$tax, &$total, $voucherItem=false)

## Static Public Member Functions
static & | getByContact ( $contact, $is_person=true, $offset=0, $limit=40)
static | soldProducts ( $product)
static & | customers ( $searchText=false)

## Public Attributes
| $ID
| $UserID
| $ShippingAddressID
| $BillingAddressID
| $ShippingCharge
| price inc. VAT More...
| $ShippingVAT
| the VAT component of ShippingCharge More...
| $PaymentMethod
| $Date
| $PersonID
| $CompanyID
| $IsVATInc
| $Comment
| $ShippingTypeID
| $OrderStatus_
| $IsExported
| $TextPaymentMethod
| $checkups

## Detailed Description

! eZTrade eZOrder handles orders.

See also
  eZOrderItem eZOrderOptionValue eZDateTime

Definition at line 51 of file ezorder.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZOrder::__construct | ( |  | $id = `""` | ) |

Constructs a new eZOrder object.

If $id is set the object's values are fetched from the database.

Definition at line 59 of file ezorder.php.

References $id, $ID, and $ini.

## Member Function Documentation

## ◆ billingAddress()

& eZOrder::billingAddress | ( |  | ) |

Returns the billing address.

Definition at line 647 of file ezorder.php.

References $billingAddress.

## ◆ comment()

& eZOrder::comment | ( |  | ) |

Returns the user comment.

Definition at line 657 of file ezorder.php.

References $Comment.

## ◆ companyID()

eZOrder::companyID | ( |  | ) |

Returns the company we are shopping for

Definition at line 725 of file ezorder.php.

References $CompanyID.

## ◆ customers()

static& eZOrder::customers | ( |  | $searchText = `false` | ) |
| static

Returns all the users which has created an order.

The users are returned as an array of eZUser objects.

Definition at line 1271 of file ezorder.php.

References $db, $i, $user_array, and eZDB\globalDatabase().

## ◆ date()

& eZOrder::date | ( |  | ) |

Returns the order date as a eZDateTime object.

Definition at line 542 of file ezorder.php.

References $dateTime.

## ◆ delete()

eZOrder::delete | ( |  | ) |

Deletes a eZOrder object from the database.

Definition at line 167 of file ezorder.php.

References $db, $i, $item, $items, $ret, eZDB\finish(), eZDB\globalDatabase(), and items().

## ◆ expiringOrders()

& eZOrder::expiringOrders | ( |  | $startdate,
|  |  | $time = `86400`
| ) |  |

Definition at line 1126 of file ezorder.php.

References $db, $order, $orders, $time, and eZDB\globalDatabase().

## ◆ get()

eZOrder::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 195 of file ezorder.php.

References $db, $id, $ret, and eZDB\globalDatabase().

## ◆ getAll()

& eZOrder::getAll | ( |  | $offset = `0`,
|  |  | $limit = `40`,
|  |  | $OrderBy = `"Date"`
| ) |  |

Fetches all active orders.

Note: Default limit is 40.

Definition at line 235 of file ezorder.php.

References $db, $i, $limit, $offset, $OrderBy, and eZDB\globalDatabase().

## ◆ getByContact()

static& eZOrder::getByContact | ( |  | $contact,
|  |  | $is_person = `true`,
|  |  | $offset = `0`,
|  |  | $limit = `40`
| ) |  |
| static

Definition at line 402 of file ezorder.php.

References $db, $i, $limit, $offset, and eZDB\globalDatabase().

## ◆ getByCustomer()

& eZOrder::getByCustomer | ( |  | $user | ) |

Returns every order one customer has made.

Definition at line 430 of file ezorder.php.

References $db, $i, $user, $userID, and eZDB\globalDatabase().

## ◆ getByUser()

& eZOrder::getByUser | ( |  | $offset = `0`,
|  |  | $limit = `40`,
|  |  | $OrderBy = `"Date"`,
|  |  | $user = `false`
| ) |  |

Fetch all the orders for the currenct user.

Note: Default limit is 40.

Definition at line 294 of file ezorder.php.

References $db, $i, $limit, $offset, $OrderBy, $user, $userID, and eZDB\globalDatabase().

## ◆ getCountByUser()

& eZOrder::getCountByUser | ( |  | $user = `false`,
|  |  | $OrderBy = `false`
| ) |  |

Fetch all the orders for the currenct user.

Note: Default limit is 40.

Definition at line 356 of file ezorder.php.

References $db, $OrderBy, $res, $user, $userID, and eZDB\globalDatabase().

## ◆ getNew()

& eZOrder::getNew | ( |  | ) |

Fetches new orders, orders which is not exported.

Definition at line 453 of file ezorder.php.

References $db, $i, and eZDB\globalDatabase().

## ◆ getSearchCount()

& eZOrder::getSearchCount | ( |  | $queryText | ) |

Returns the total count of a query.

Definition at line 501 of file ezorder.php.

References $db, $ret, and eZDB\globalDatabase().

## ◆ getTotalCount()

& eZOrder::getTotalCount | ( |  | ) |

Returns the total count of orders.

Definition at line 522 of file ezorder.php.

References $db, $ret, and eZDB\globalDatabase().

## ◆ id()

eZOrder::id | ( |  | ) |

Returns the object id.

Definition at line 552 of file ezorder.php.

References $ID.

## ◆ initialStatus()

& eZOrder::initialStatus | ( |  | ) |

Returns the initial status as a eZOrderStatus object.

Definition at line 913 of file ezorder.php.

References $db, $ret, $status_array, $statusType, and eZDB\globalDatabase().

## ◆ isExported()

eZOrder::isExported | ( |  | $value | ) |

Returns true if the order is exported. This is for use with integration with other systems.

Definition at line 706 of file ezorder.php.

## ◆ isOwner()

eZOrder::isOwner | ( | & | $user | ) |

Returns true if the user is the owner of this order.

Definition at line 1085 of file ezorder.php.

References $db, $res, $ret, $user, $userID, and eZDB\globalDatabase().

## ◆ isVATInc()

eZOrder::isVATInc | ( |  | ) |

Returns true if the order was included with VAT.

Definition at line 602 of file ezorder.php.

## ◆ items()

& eZOrder::items | ( |  | ) |

Returns all the order items.

Definition at line 978 of file ezorder.php.

References $db, $item, $ret, and eZDB\globalDatabase().

Referenced by delete(), and orderTotals().

## ◆ lastStatus()

& eZOrder::lastStatus | ( |  | ) |

Returns the last status change as a eZOrderStatus object.

Definition at line 934 of file ezorder.php.

References $db, $ret, $status_array, $statusType, and eZDB\globalDatabase().

## ◆ mostPopularProduct()

& eZOrder::mostPopularProduct | ( |  | ) |

Returns the most request bought products.

Definition at line 1103 of file ezorder.php.

References $db, $item, $ret, and eZDB\globalDatabase().

## ◆ orderTotals()

eZOrder::orderTotals | ( | & | $tax,
|  | & | $total
| ) |  |

This function calculates the totals of the order contents.

Definition at line 1163 of file ezorder.php.

References $item, $items, $product, $ShippingCharge, $shippingCost, $ShippingVAT, $shippingVAT, $total, and items().

## ◆ paymentMethod()

eZOrder::paymentMethod | ( |  | ) |

Returns the payment method text.

Definition at line 689 of file ezorder.php.

References $PaymentMethod.

## ◆ personID()

eZOrder::personID | ( |  | ) |

Returns the person we are shopping for

Definition at line 717 of file ezorder.php.

References $PersonID.

## ◆ search()

& eZOrder::search | ( |  | $queryText,
|  |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Does a search in the order database.

Note: Default limit is 20.

Definition at line 477 of file ezorder.php.

References $db, $i, $limit, $offset, and eZDB\globalDatabase().

## ◆ setBillingAddress()

eZOrder::setBillingAddress | ( |  | $billingAddress,
|  |  | $user
| ) |  |

Sets the billing address.

Definition at line 812 of file ezorder.php.

References $billingAddress.

## ◆ setComment()

eZOrder::setComment | ( |  | $value | ) |

Sets the user comment.

Definition at line 769 of file ezorder.php.

## ◆ setCompanyID()

eZOrder::setCompanyID | ( |  | $id | ) |

Sets the company we are shopping for

Definition at line 902 of file ezorder.php.

References $id.

## ◆ setIsExported()

eZOrder::setIsExported | ( |  | $value | ) |

Sets the order to be exported or not. This is used for integration with other systems. So you know if you have fetched this order or not.

Definition at line 876 of file ezorder.php.

## ◆ setIsVATInc()

eZOrder::setIsVATInc | ( |  | $value | ) |

Sets true if an order is included with VAT, false if not.

Definition at line 844 of file ezorder.php.

## ◆ setPaymentMethod()

eZOrder::setPaymentMethod | ( |  | $value | ) |

Sets the payment method.

Definition at line 733 of file ezorder.php.

References $i, and $item.

## ◆ setPersonID()

eZOrder::setPersonID | ( |  | $userID | ) |

Sets the person we are shopping for

Definition at line 887 of file ezorder.php.

References $id, and $userID.

## ◆ setShippingAddress()

eZOrder::setShippingAddress | ( |  | $shippingAddress,
|  |  | $user
| ) |  |

Sets the shipping address.

Definition at line 780 of file ezorder.php.

References $db, $ret, $shippingAddress, $user, $userID, eZDB\finish(), and eZDB\globalDatabase().

## ◆ setShippingCharge()

eZOrder::setShippingCharge | ( |  | $value | ) |

Sets the shipping charge. Inc. VAT.

Definition at line 824 of file ezorder.php.

## ◆ setShippingTypeID()

eZOrder::setShippingTypeID | ( |  | $type | ) |

Sets the shipping type ID of the order.

Definition at line 867 of file ezorder.php.

References $type.

## ◆ setShippingVAT()

eZOrder::setShippingVAT | ( |  | $value | ) |

Sets the shipping VAT. The VAT component of the shipping charge.

Definition at line 834 of file ezorder.php.

## ◆ setStatus()

eZOrder::setStatus | ( |  | $type | ) |

Sets the status of the order.

Definition at line 856 of file ezorder.php.

References $type.

## ◆ setUser()

eZOrder::setUser | ( |  | $user | ) |

Sets the user.

Definition at line 758 of file ezorder.php.

References $user.

## ◆ shippingAddress()

& eZOrder::shippingAddress | ( |  | ) |

Returns the shipping address.

Definition at line 592 of file ezorder.php.

References $shippingAddress.

## ◆ shippingCharge()

eZOrder::shippingCharge | ( |  | ) |

Returns the shipping charge.

Definition at line 576 of file ezorder.php.

References $ShippingCharge.

## ◆ shippingType()

& eZOrder::shippingType | ( |  | ) |

Returns the shipping type as a eZShippingType object.

Will return false if an error occured.

Definition at line 667 of file ezorder.php.

References $ret, and $ShippingTypeID.

## ◆ shippingUser()

& eZOrder::shippingUser | ( |  | ) |

Returns the user to ship the goods to.

Returns false if unsuccessful.

Definition at line 616 of file ezorder.php.

References $db, and eZDB\globalDatabase().

## ◆ shippingVAT()

eZOrder::shippingVAT | ( |  | ) |

Returns the shipping vat.

Definition at line 584 of file ezorder.php.

References $ShippingVAT.

## ◆ soldProducts()

static eZOrder::soldProducts | ( |  | $product | ) |
| static

Definition at line 1147 of file ezorder.php.

References $db, $product, $res, and eZDB\globalDatabase().

## ◆ statusHistory()

& eZOrder::statusHistory | ( |  | ) |

Returns the status history as an array of eZOrderStatus object.

Definition at line 955 of file ezorder.php.

References $db, $ret, $status, $status_array, $statusType, and eZDB\globalDatabase().

## ◆ store()

eZOrder::store | ( |  | ) |

Stores a order to the database.

Definition at line 77 of file ezorder.php.

References $db, $ret, $status, $statusType, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ totalPrice()

eZOrder::totalPrice | ( |  | $user = `false` | ) |

Returns the total price on an order. Without the shipping charge.

Definition at line 1031 of file ezorder.php.

References $db, $item, $price, and eZDB\globalDatabase().

Referenced by totalPriceIncVAT().

## ◆ totalPriceIncVAT()

eZOrder::totalPriceIncVAT | ( |  | ) |

Returns the total price with VAT on an order. Without the shipping charge.

Definition at line 1053 of file ezorder.php.

References totalPrice(), and totalVAT().

## ◆ totalVAT()

eZOrder::totalVAT | ( |  | ) |

Returns the total VAT on an order. Without the shipping charge.

Definition at line 1061 of file ezorder.php.

References $db, $item, $price, and eZDB\globalDatabase().

Referenced by totalPriceIncVAT().

## ◆ usedVouchers()

& eZOrder::usedVouchers | ( |  | ) |

Returns the voucher for this order.

Definition at line 1004 of file ezorder.php.

References $db, $item, $ret, and eZDB\globalDatabase().

## ◆ user()

& eZOrder::user | ( |  | ) |

Returns the user as a eZUser object.

false (0) is returned if unsuccessful.

Definition at line 562 of file ezorder.php.

References $ret, and $user.

## ◆ voucherTotal()

eZOrder::voucherTotal | ( | & | $tax,
|  | & | $total,
|  |  | $voucherItem = `false`
| ) |  |

This function calculates the totals of the order contents.

Definition at line 1235 of file ezorder.php.

References $product, and $total.

## Member Data Documentation

## ◆ $BillingAddressID

eZOrder::$BillingAddressID

Definition at line 1301 of file ezorder.php.

## ◆ $checkups

eZOrder::$checkups

Definition at line 1318 of file ezorder.php.

## ◆ $Comment

eZOrder::$Comment

Definition at line 1312 of file ezorder.php.

Referenced by comment().

## ◆ $CompanyID

eZOrder::$CompanyID

Definition at line 1310 of file ezorder.php.

Referenced by companyID().

## ◆ $Date

eZOrder::$Date

Definition at line 1308 of file ezorder.php.

## ◆ $ID

eZOrder::$ID

Definition at line 1298 of file ezorder.php.

Referenced by __construct(), and id().

## ◆ $IsExported

eZOrder::$IsExported

Definition at line 1316 of file ezorder.php.

## ◆ $IsVATInc

eZOrder::$IsVATInc

Definition at line 1311 of file ezorder.php.

## ◆ $OrderStatus_

eZOrder::$OrderStatus_

Definition at line 1315 of file ezorder.php.

## ◆ $PaymentMethod

eZOrder::$PaymentMethod

Definition at line 1306 of file ezorder.php.

Referenced by paymentMethod().

## ◆ $PersonID

eZOrder::$PersonID

Definition at line 1309 of file ezorder.php.

Referenced by personID().

## ◆ $ShippingAddressID

eZOrder::$ShippingAddressID

Definition at line 1300 of file ezorder.php.

## ◆ $ShippingCharge

eZOrder::$ShippingCharge

price inc. VAT

Definition at line 1303 of file ezorder.php.

Referenced by orderTotals(), and shippingCharge().

## ◆ $ShippingTypeID

eZOrder::$ShippingTypeID

Definition at line 1314 of file ezorder.php.

Referenced by shippingType().

## ◆ $ShippingVAT

eZOrder::$ShippingVAT

the VAT component of ShippingCharge

Definition at line 1305 of file ezorder.php.

Referenced by orderTotals(), and shippingVAT().

## ◆ $TextPaymentMethod

eZOrder::$TextPaymentMethod

Definition at line 1317 of file ezorder.php.

## ◆ $UserID

eZOrder::$UserID

Definition at line 1299 of file ezorder.php.

The documentation for this class was generated from the following file:

- ezorder.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.