ePages 6.10 - DE_EPAGES/Order/API/Basket.pm

Package DE_EPAGES::Order::API::Basket

This package provides the main basket functions.

@EXPORT_OK
CreateBasket
GetExistingBasket
GetBasket

Functions

CreateBasket
GetBasket
GetExistingBasket

CreateBasket

Creates a basket for a user and shop.

Syntax
$Basket = CreateBasket($hInfo);
Input
$hInfo (ref.hash)
keys
  • User - user - object
  • Shop - shop - object
  • LocaleID - Locale - char(5)
  • Parent - baskets folder (optional) - object
Return
$Basket (object)
basket

GetBasket

Creates a basket for a user if the basket does not exist
else it returns the existing basket.

Syntax
$Basket = GetBasket($User, $Shop, $hInfo);
Input
$User (object)
user
$Shop (object)
shop
$hInfo (ref.array.hash)
basket infos keys (optional):
  • LocaleID | Locale (optional) | char(5)
  • CurrencyID | currency (optional) | char(3)
  • Parent - baskets folder (optional) - object
Return
$Basket (object)
basket

GetExistingBasket

Gets a basket for a user in a shop if the basket exists else it returns 'undef'.

Syntax
$Basket = GetExistingBasket($User, $Shop, $hInfo);
Input
$User (object)
user
$Shop (object)
shop
$hInfo (ref.hash)
keys
  • Parent - baskets folder (optional) - object
Return
$Basket (object)
basket (optional)