| @@ 77-84 (lines=8) @@ | ||
| 74 | * if only those need to be showing. |
|
| 75 | * @return DataList |
|
| 76 | */ |
|
| 77 | public function EcommerceRecommendedProductsForSale() |
|
| 78 | { |
|
| 79 | if ($this->owner->EcomConfig()->OnlyShowProductsThatCanBePurchased) { |
|
| 80 | return $this->owner->EcommerceRecommendedProducts()->filter(array("AllowPurchase" => 1)); |
|
| 81 | } else { |
|
| 82 | return $this->owner->EcommerceRecommendedProducts(); |
|
| 83 | } |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * only returns the products that are for sale |
|
| @@ 91-98 (lines=8) @@ | ||
| 88 | * if only those need to be showing. |
|
| 89 | * @return DataList |
|
| 90 | */ |
|
| 91 | public function RecommendedForForSale() |
|
| 92 | { |
|
| 93 | if ($this->owner->EcomConfig()->OnlyShowProductsThatCanBePurchased) { |
|
| 94 | return $this->owner->RecommendedFor()->filter(array("AllowPurchase" => 1)); |
|
| 95 | } else { |
|
| 96 | return $this->owner->RecommendedFor(); |
|
| 97 | } |
|
| 98 | } |
|
| 99 | } |
|
| 100 | ||