I read somewhere that if all product has same position it will sort by product id, but I don't think its sorting by Id.
Here are a few screenshots I am sharing which I am sorting by position problem is that every time I click on position
it will show any new type of sorting.
also, I created a product carousel for the same category collection, with position
sorting and showing the first product which I don't know why it's come first.
Here is my code for collection:
public function setSlider()
{
$getCategory = $this->_scopeConfig->getValue('Carousel_Section/Carousel_'.$id.'/Carousel_Six_field', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
$category = $this->factory->create()->load($getCategory);
$ProductFilterCollection = $category->getProductCollection()->addAttributeToSelect('price',true)->setFlag('has_stock_status_filter', true)->setPageSize($getLimit)->addAttributeToSelect('*')->setOrder('position', 'asc');
}
Everything is working fine, just curious about how position
sorting works if every product has the same position
?