| @@ -4,21 +4,31 @@ | ||
| 4 | 4 | use Averta\Core\Utility\Data; |
| 5 | 5 | |
| 6 | 6 | class HandPickedProducts extends Products { |
| 7 | 7 | |
| 8 | - /** | |
| 9 | - * Source name | |
| 8 | + /** | |
| 9 | + * DataSource name | |
| 10 | 10 | * |
| 11 | 11 | * @var string |
| 12 | 12 | */ |
| 13 | 13 | protected $type = 'wooHandpicks'; |
| 14 | 14 | |
| 15 | - /** | |
| 16 | - * Input params to filter source result | |
| 15 | + /** | |
| 16 | + * DataSource properties | |
| 17 | 17 | * |
| 18 | 18 | * @var array |
| 19 | 19 | */ |
| 20 | - protected $params = [ | |
| 20 | + protected $properties = [ | |
| 21 | + 'type' => 'wooHandpicks', | |
| 22 | + 'postType' => 'product' | |
| 23 | + ]; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * Default input params for retrieving dataSource records | |
| 27 | + * | |
| 28 | + * @var array | |
| 29 | + */ | |
| 30 | + protected $defaultInputParams = [ | |
| 21 | 31 | 'postType' => 'product', |
| 22 | 32 | 'excerptLength' => 100, |
| 23 | 33 | 'linkSlides' => true, |
| 24 | 34 | 'orderBy' => 'post__in', |
| @@ -25,9 +35,9 @@ | ||
| 25 | 35 | 'order' => 'DESC', |
| 26 | 36 | 'imageSource' => 'featured', |
| 27 | 37 | 'includedIds' => '', |
| 28 | 38 | 'excludeNonThumbnail' => true, |
| 29 | - 'inStockOnly' => true, | |
| 39 | + 'inStockOnly' => true | |
| 30 | 40 | ]; |
| 31 | 41 | |
| 32 | 42 | /** |
| 33 | 43 | * Retrieves the list of records based on query params |