2

Need to filter product collection by salable qty in frontend in catalog>product>list.phtml. Currently, I am processing the saleable qty inside foreach loop but it takes lot of resources and some time site getting down.

Here is my code

$_productCollection->getSelect()->joinLeft( ['sot' => 'inventory_reservation'], 'sot.sku = e.sku', 'quantity as inQty' );
4

0

Your Answer

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

Browse other questions tagged or ask your own question.