ePages 7.47.0 - DE_EPAGES/ShoppingList/API/Object/ShoppingList.pm

Package DE_EPAGES::ShoppingList::API::Object::ShoppingList

object interface for ShoppingList.

Base
DE_EPAGES::Shop::API::Object::ShopObject

Functions

addItem
className
dbPackage
existsItemByProduct
getItemByProduct

addItem

Add product to shopping list.

Syntax
$ShoppingListItem = $ShoppingList->addItem($Product, $hInfo);
Input
$Product (object)
product
$hInfo (ref.hash)
item info, keys :
  • Quantity - product quantity (default: 1)
Return
$ShoppingListItem (object)
list entry (undef if product not visible)

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $ShoppingList->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $ShoppingList->dbPackage;
Return
$DbPackage (String)
database package name

existsItemByProduct

Test if a shopping list item exists by the given product

Syntax
$ItemExists = $ShoppingList->existsItemByProduct($Product);
Input
$Product (object)
product
Return
$ItemExists (boolean)
true if item by product exists

getItemByProduct

Returns a shopping list item exists by the given product

Syntax
$Item = $ShoppingList->getItemByProduct($Product);
Input
$Product (object)
product
Return
$ShoppingListItem (object)
list entry