SilverCart\Model\Product\Product::getProducts
Getter similar to DataObject::get(); returns a SS_List of products filtered by the requirements in self::getRequiredAttributes(); If an product is free of charge, it can have no price. This is for giveaways and gifts.
Expected format of $joins: <pre> array( array( 'table' => 'JoinTableName_1', 'on' => 'JoinTableOnClause_1', 'alias' => 'JoinTableAlias_1', ), array( 'table' => 'JoinTableName_2', 'on' => 'JoinTableOnClause_2', 'alias' => 'JoinTableAlias_2', ), ... ) </pre>
Signature
public function getProducts([string
$whereClause = "",
[string
$sort = NULL,
[array
$joins = NULL,
[integer
$limit = NULL]]]] )
Parameters
$whereClause
— string- to be inserted into the sql where clause
$sort
— string- string with sort clause
$joins
— array- left join data as multi dimensional array
$limit
— integer- DataObject limit
Returns
- SS_List