1

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.

enter image description here

enter image description here

enter image description here

enter image description here

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?

5
  • ref link => magento.stackexchange.com/questions/121215/… Commented Feb 27, 2020 at 9:06
  • @SavanPatel I check that already, I don't think its my answer Commented Feb 27, 2020 at 9:10
  • @SagarParikhSGR have you get any solution for this issue? I am getting same issue after migration Magento 2.3 Commented Apr 9, 2020 at 13:25
  • @VinodKumar No, share the link if you found the answer Commented Apr 9, 2020 at 13:28
  • No, I didn't get right now. Commented Apr 9, 2020 at 13:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.