Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZOrderItem Class Reference

## Public Member Functions
| __construct ( $id="")
| store ()
| get ( $id="")
| delete ()
| id ()
| count ()
| price ()
| product ()
| priceIncVAT ()
| VAT ()
| expiryDate ()
| optionValues ()
| setOrder ( $order)
| setProduct ( $product)
| setCount ( $value)
| setPrice ( $value)
| setVAT ( $value)
| setExpiryDate ( $date)
| order ()
| correctPrice ( $calcCount=true, $withOptions=true, $calcVAT=true)
| localePrice ( $calcCount=true, $withOptions=true, $calcVAT=true)

## Public Attributes
| $ID
| $OrderID
| $Count
| $Price
| $ProductID
| $ExpiryDate
| $VAT

## Detailed Description

! eZTrade eZOrderItem handles order items.

All prices saved with this object is without VAT. All prices are for one product only. Remember to multiply correctly with the count.

See also
  eZOrder eZOrderOptionValue

TODO

Definition at line 47 of file ezorderitem.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructs a new eZOrderItem object.

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

Definition at line 55 of file ezorderitem.php.

References $id, and $ID.

## Member Function Documentation

## ◆ correctPrice()

eZOrderItem::correctPrice | ( |  | $calcCount = `true`,
|  |  | $withOptions = `true`,
|  |  | $calcVAT = `true`
| ) |  |

Returns the correct price of the product based on the logged in user, and the VAT status and use.

Definition at line 319 of file ezorderitem.php.

References $Count, $price, $Price, and $VAT.

Referenced by localePrice().

## ◆ count()

eZOrderItem::count | ( |  | ) |

Returns the count.

Definition at line 170 of file ezorderitem.php.

References $Count.

Referenced by get().

## ◆ delete()

eZOrderItem::delete | ( |  | ) |

Deletes a eZOrderItem object from the database.

Definition at line 147 of file ezorderitem.php.

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

## ◆ expiryDate()

eZOrderItem::expiryDate | ( |  | ) |

returns a timestamp of the date when this product expires

Definition at line 212 of file ezorderitem.php.

References $ExpiryDate.

## ◆ get()

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

Fetches the object information from the database.

Definition at line 117 of file ezorderitem.php.

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

## ◆ id()

eZOrderItem::id | ( |  | ) |

Returns the object id.

Definition at line 162 of file ezorderitem.php.

References $ID.

## ◆ localePrice()

eZOrderItem::localePrice | ( |  | $calcCount = `true`,
|  |  | $withOptions = `true`,
|  |  | $calcVAT = `true`
| ) |  |

Returns the correct localized price of the product.

Definition at line 341 of file ezorderitem.php.

References $currency, $ini, $Language, $locale, $price, and correctPrice().

## ◆ optionValues()

eZOrderItem::optionValues | ( |  | ) |

Returns all the option values.

Definition at line 220 of file ezorderitem.php.

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

## ◆ order()

eZOrderItem::order | ( |  | ) |

Returns the order

Definition at line 310 of file ezorderitem.php.

## ◆ price()

eZOrderItem::price | ( |  | ) |

Returns the price of the order item.

Definition at line 178 of file ezorderitem.php.

References $Price.

## ◆ priceIncVAT()

eZOrderItem::priceIncVAT | ( |  | ) |

Returns the price included with VAT of the order item.

Definition at line 196 of file ezorderitem.php.

References $VAT.

## ◆ product()

eZOrderItem::product | ( |  | ) |

Returns the product.

Definition at line 186 of file ezorderitem.php.

References $ret.

## ◆ setCount()

eZOrderItem::setCount | ( |  | $value | ) |

Sets the number of products.

Definition at line 264 of file ezorderitem.php.

## ◆ setExpiryDate()

eZOrderItem::setExpiryDate | ( |  | $date | ) |

Sets the date when this product expires

Definition at line 295 of file ezorderitem.php.

References $date, and $timestamp.

## ◆ setOrder()

eZOrderItem::setOrder | ( |  | $order | ) |

Sets the order.

Definition at line 242 of file ezorderitem.php.

References $order.

## ◆ setPrice()

eZOrderItem::setPrice | ( |  | $value | ) |

Sets the price of one product.

Definition at line 273 of file ezorderitem.php.

## ◆ setProduct()

eZOrderItem::setProduct | ( |  | $product | ) |

Sets the product.

Definition at line 253 of file ezorderitem.php.

References $product.

## ◆ setVAT()

eZOrderItem::setVAT | ( |  | $value | ) |

Sets the VAT of one product.

Definition at line 282 of file ezorderitem.php.

References $ID, and VAT().

## ◆ store()

eZOrderItem::store | ( |  | ) |

Stores a order to the database.

Definition at line 68 of file ezorderitem.php.

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

## ◆ VAT()

eZOrderItem::VAT | ( |  | ) |

Returns the VAT of the order item.

Definition at line 204 of file ezorderitem.php.

References $VAT.

Referenced by get(), and setVAT().

## Member Data Documentation

## ◆ $Count

eZOrderItem::$Count

Definition at line 358 of file ezorderitem.php.

Referenced by correctPrice(), and count().

## ◆ $ExpiryDate

eZOrderItem::$ExpiryDate

Definition at line 361 of file ezorderitem.php.

Referenced by expiryDate().

## ◆ $ID

eZOrderItem::$ID

Definition at line 356 of file ezorderitem.php.

Referenced by __construct(), id(), and setVAT().

## ◆ $OrderID

eZOrderItem::$OrderID

Definition at line 357 of file ezorderitem.php.

## ◆ $Price

eZOrderItem::$Price

Definition at line 359 of file ezorderitem.php.

Referenced by correctPrice(), and price().

## ◆ $ProductID

eZOrderItem::$ProductID

Definition at line 360 of file ezorderitem.php.

## ◆ $VAT

eZOrderItem::$VAT

Definition at line 362 of file ezorderitem.php.

Referenced by correctPrice(), priceIncVAT(), and VAT().

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

- ezorderitem.php

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