Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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

## Public Member Functions
| __construct ( $id="", $fetch=true)
| store ()
| get ( $id="")
| delete ()
| id ()
& | product ()
& | wishlist ()
| count ()
| setProduct ( $product)
| setWishList ( $wishlist)
| setIsBought ( $value)
| isBought ()
& | optionValues ()
| moveToCart ()
| setCount ( $count)
| price ()

## Public Attributes
| $ID
| $ProductID
| $WishListID
| $Count
| $IsBought

## Detailed Description

! eZTrade eZWishListItem handles a shopping wishlist

Example code:

$product = new eZProduct( 3 );
$wishlistItem = new eZWishListItem();
$wishlistItem->setProduct( $product );
$wishlistItem->setWishlist( $wishlist );
// Store to the database
$wishlistItem->store();
eZProduct
Definition: ezproduct.php:71
eZWishListItem
Definition: ezwishlistitem.php:55
$wishlist
$wishlist
Definition: customerview.php:149
$product
$product
Definition: homepage.php:202

See also
  eZWishList

Definition at line 54 of file ezwishlistitem.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZWishListItem::__construct | ( |  | $id = `""`,
|  |  | $fetch = `true`
| ) |  |

Constructs a new eZWishList object.

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

Definition at line 62 of file ezwishlistitem.php.

References $id, and $ID.

## Member Function Documentation

## ◆ count()

eZWishListItem::count | ( |  | ) |

Returns the product count.

Definition at line 214 of file ezwishlistitem.php.

References $Count.

Referenced by get(), moveToCart(), and price().

## ◆ delete()

eZWishListItem::delete | ( |  | ) |

Deletes a eZWishListItem object from the database.

Definition at line 153 of file ezwishlistitem.php.

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

## ◆ get()

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

Fetches the object information from the database.

Definition at line 124 of file ezwishlistitem.php.

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

## ◆ id()

eZWishListItem::id | ( |  | ) |

Returns the object id.

Definition at line 173 of file ezwishlistitem.php.

References $ID.

## ◆ isBought()

eZWishListItem::isBought | ( |  | ) |

Returns true if the item is already bought. False if not.

Definition at line 261 of file ezwishlistitem.php.

References $ret.

## ◆ moveToCart()

eZWishListItem::moveToCart | ( |  | ) |

Will move the current eZWishListItem to the cart.

Definition at line 298 of file ezwishlistitem.php.

References $cart, $product, $session, $user, count(), eZUser\currentUser(), optionValues(), and product().

## ◆ optionValues()

& eZWishListItem::optionValues | ( |  | ) |

Returns all the option values as an array of eZWishListOptionValue objects.

An empty array is returned if none exists.

Definition at line 278 of file ezwishlistitem.php.

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

Referenced by moveToCart(), and price().

## ◆ price()

eZWishListItem::price | ( |  | ) |

Returns the price of the wishlist item.

Options and count is calculated.

Definition at line 370 of file ezwishlistitem.php.

References $price, $PriceGroup, $product, eZPriceGroup\correctPrice(), count(), optionValues(), and product().

## ◆ product()

& eZWishListItem::product | ( |  | ) |

Returns the product to the wishlist item as an eZProduct object.

Definition at line 182 of file ezwishlistitem.php.

References $ret.

Referenced by moveToCart(), and price().

## ◆ setCount()

eZWishListItem::setCount | ( |  | $count | ) |

Sets the number of products.

Definition at line 356 of file ezwishlistitem.php.

References $count, and $ID.

## ◆ setIsBought()

eZWishListItem::setIsBought | ( |  | $value | ) |

Sets the product to be bought. This is only an indication so that the user, and other people looking at the wishlist, sees if the item is already bought for this user.

Definition at line 246 of file ezwishlistitem.php.

## ◆ setProduct()

eZWishListItem::setProduct | ( |  | $product | ) |

Sets the product.

Definition at line 222 of file ezwishlistitem.php.

References $product.

## ◆ setWishList()

eZWishListItem::setWishList | ( |  | $wishlist | ) |

Sets the wishlist.

Definition at line 233 of file ezwishlistitem.php.

References $wishlist.

## ◆ store()

eZWishListItem::store | ( |  | ) |

Stores a wishlist to the database.

Definition at line 80 of file ezwishlistitem.php.

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

## ◆ wishlist()

& eZWishListItem::wishlist | ( |  | ) |

Returns the wishlist.

Definition at line 198 of file ezwishlistitem.php.

References $ret, and $wishlist.

## Member Data Documentation

## ◆ $Count

eZWishListItem::$Count

Definition at line 412 of file ezwishlistitem.php.

Referenced by count().

## ◆ $ID

eZWishListItem::$ID

Definition at line 409 of file ezwishlistitem.php.

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

## ◆ $IsBought

eZWishListItem::$IsBought

Definition at line 413 of file ezwishlistitem.php.

## ◆ $ProductID

eZWishListItem::$ProductID

Definition at line 410 of file ezwishlistitem.php.

## ◆ $WishListID

eZWishListItem::$WishListID

Definition at line 411 of file ezwishlistitem.php.

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

- ezwishlistitem.php

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