I need to add an additional filter based on created_at attribute for sorting product list by latest product. I tried to figure it using below file
app/design/frontend/Vendor/ThemeName/Magento_Catalog/templates/product/list/toolbar/sorter.phtml
but how can add our entity id to getAvailableOrders() ?
I've been trying to remove the Sort by "Position" option, but i can't seem to get the job done.
Do you think you have anything that can guide me in the right direction?
You can activate Created At in sorting options. Create module with setup file.