Magento2.4 Sort by created date not working on list page

    case 'new_arrivals':
$this->_collection->getSelect()->order('e.created_at '. $this->getCurrentDirection());

It just says there are no products to display

  • There is no problem in you above code. Please share more code here, like how you are getting this collection Oct 13, 2020 at 9:20
  • I have the same problem using the same code from a plugin. Since using ElasticSearch as Magento default it no longer works. Oct 29, 2020 at 13:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.