Skip to content

Commit

Permalink
updated rest api for products list
Browse files Browse the repository at this point in the history
  • Loading branch information
landofcoder committed Dec 7, 2020
1 parent 64a91de commit 8d2c388
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ public function getDealsProducts($config = [])
$todayEndOfDayDate = $this->_localeDate->date()->setTime(23, 59, 59)->format('Y-m-d H:i:s');

$product = $this->productFactory->create();

/** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
$collection = $product->getResourceCollection();
if (isset($config['categories'])) {
Expand Down Expand Up @@ -509,7 +508,7 @@ public function getDealsProducts($config = [])
'special_from_date',
[
'or' => [
0 => ['date' => true, 'to' => $todayEndOfDayDate],
0 => ['date' => true, 'to' => $todayStartOfDayDate],
1 => ['is' => new \Zend_Db_Expr('null')],
]
],
Expand All @@ -518,7 +517,7 @@ public function getDealsProducts($config = [])
'special_to_date',
[
'or' => [
0 => ['date' => true, 'from' => $todayStartOfDayDate],
0 => ['date' => true, 'from' => $todayEndOfDayDate],
1 => ['is' => new \Zend_Db_Expr('null')],
]
],
Expand Down

0 comments on commit 8d2c388

Please sign in to comment.