ePages 6.11.0 - DE_EPAGES/Product/API/Basket.pm

Package DE_EPAGES::Product::API::Basket

API for addding products to the basket.

@EXPORT_OK
AddProducts

Functions

AddProducts

AddProducts

Adds a list of products to a the basket of the user. If the list contains products from different shops, then multiple baskets are created - one for each shop.

Syntax
$aBaskets = AddProducts($User, $hInfo, $ahProducts);
Example
my @Products;
push @Products, { Product => $Product, Quantity => 3 };
my $aBaskets = AddProducts( $User, {}, \@Products );
my $Basket = $aBaskets->[0];
Input
$User (object)
user
$hInfo (ref.array.hash)
basket infos keys:
  • LocaleID | Locale, e.g. 'en_US' (optional) | char(5)
  • CurrencyID | currency, e.g. 'USD' (optional) | char(3)
$ahProducts (ref.array.hash)
product line info, keys:
  • Product - product object
  • Quantity - product quantity to add (optional)- float
  • ... parameter for $Product->addToContainer()
Return
$aBaskets (object)
baskets of different shops