/** Get products that belong to ANY group in the set @param $groupIDs array of IDs/CODEs or sigle number ID/string CODE */ function __construct($catIDs = false) { if ($catIDs) { $catIDs = $this->parseIDs($catIDs); } else { $catIDs = cf\Page::descendantIDs(null, true); } $this->sqlWhere['(cf_products.enabled_from IS NULL OR NOW() >= cf_products.enabled_from)'] = 1; $this->sqlWhere['(cf_products.enabled_to IS NULL OR NOW() < cf_products.enabled_to)'] = 1; $this->sqlJoin["INNER JOIN cf_products_in_category ON cf_products.id = cf_products_in_category.product_id"] = 1; $this->sqlWhere["page_id IN (" . implode(',', $catIDs) . ")"] = 1; }