Skip to content

Commit

Permalink
updated rest api
Browse files Browse the repository at this point in the history
  • Loading branch information
landofcoder committed Dec 7, 2020
1 parent 8d2c388 commit 199092b
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,20 +525,11 @@ public function getDealsProducts($config = [])
)->addAttributeToFilter([
['attribute' => 'special_from_date', 'is' => new \Zend_Db_Expr('not null')],
['attribute' => 'special_to_date', 'is' => new \Zend_Db_Expr('not null')],
])->addAttributeToSort('special_from_date', 'desc')
->addAttributeToSelect(['name', 'short_description', 'description'], 'inner')
->addAttributeToSelect(
[
'price',
'special_price',
'special_from_date',
'special_to_date',
'msrp_display_actual_price_type',
'msrp',
'thumbnail',
],
'left'
)->applyFrontendPriceLimitations();
])
->addMinimalPrice()
->addUrlRewrite()
->addTaxPercents()
->addFinalPrice();
if(isset($config['pagesize']) && $config['pagesize']){
$collection->setPageSize((int)$config['pagesize']);
}
Expand Down

0 comments on commit 199092b

Please sign in to comment.