product collection result overriding by other module

by Charlie   Last Updated October 17, 2019 14:09 PM

I have two 3rd party modules one groupCat module which filters out the product collection to display customers based on customer groups.

another module is the search module which fetches all products and sync for search functions.

but, currently, the search module not able to fetch all the products because GroupCat module filtering out some product and search sync not update with all the products.

How can I fetch product collection in the search module which get all the products and don't omit the products affected by GroupCat module collections

Below is the code I am using in search module to get product for sync. public function loadProductDataCollection($product_ids){

    $data = \Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Catalog\Model\ResourceModel\Product\Collection')
    $data->setFlag('has_stock_status_filter', false);
    return  $data;

Related Questions

Magento product collection filter not working

Updated April 17, 2018 08:09 AM