@@ -123,7 +123,7 @@ |
||
| 123 | 123 | * Products function. |
| 124 | 124 | * |
| 125 | 125 | * @access public |
| 126 | - * @return array |
|
| 126 | + * @return PaginatedList |
|
| 127 | 127 | */ |
| 128 | 128 | public function ProductList($limit = 10) |
| 129 | 129 | { |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | $config = SiteConfig::current_site_config(); |
| 131 | 131 | |
| 132 | - if ($config->ProductLimit>0) { |
|
| 132 | + if ($config->ProductLimit > 0) { |
|
| 133 | 133 | $limit = $config->ProductLimit; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | if ($config->MultiGroup) { |
| 137 | 137 | $entries = $this->Products()->sort('SortOrder'); |
| 138 | - } else { |
|
| 139 | - $filter = '"ParentID" = ' . $this->ID; |
|
| 138 | + }else { |
|
| 139 | + $filter = '"ParentID" = '.$this->ID; |
|
| 140 | 140 | |
| 141 | 141 | // Build a list of all IDs for ProductGroups that are children |
| 142 | 142 | $holderIDs = $this->ProductGroupIDs(); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | if ($filter) { |
| 148 | 148 | $filter .= ' OR '; |
| 149 | 149 | } |
| 150 | - $filter .= '"ParentID" IN (' . implode(',', $holderIDs) . ")"; |
|
| 150 | + $filter .= '"ParentID" IN ('.implode(',', $holderIDs).")"; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $order = '"SiteTree"."Title" ASC'; |