ProductRelationsBuilder
Sale basket items and crm product rows relations builder.
Table of Contents
Methods
- __construct() : mixed
- addCrmProductRow() : void
- Add crm product row.
- addSaleBasketItem() : void
- Add sale basket item
- getRelations() : array<string|int, mixed>
- Get relations.
- setComparators() : void
- Set comparators that will be used to compare products.
Methods
__construct()
public
__construct([array<string|int, mixed> $comparators = null ]) : mixed
Parameters
- $comparators : array<string|int, mixed> = null
addCrmProductRow()
Add crm product row.
public
addCrmProductRow(int $id, int $productId, float $price, float $quantity, string $xmlId) : void
Parameters
- $id : int
- $productId : int
- $price : float
- $quantity : float
- $xmlId : string
addSaleBasketItem()
Add sale basket item
public
addSaleBasketItem(int $id, int $productId, float $price, float $quantity, string $xmlId) : void
Parameters
- $id : int
- $productId : int
- $price : float
- $quantity : float
- $xmlId : string
getRelations()
Get relations.
public
getRelations() : array<string|int, mixed>
Return values
array<string|int, mixed> —in format ['rowId' => 'basketId']
setComparators()
Set comparators that will be used to compare products.
public
setComparators(array<string|int, Comparator> $comparators) : void
Parameters
- $comparators : array<string|int, Comparator>