Monday, 11 November 2019

Magento 2 admin product disabled filter issues

You have to copy the vendor\magento\module-catalog\Ui\DataProvider\Product\ProductCollection.php  
to
app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php  

Replace the following code in addAttributeToFilterAllStores(Attribute $attributeModel, array $condition): void function

$condition = "({$pKey} = {$fKey}) AND ("
            . $this->_getConditionSql("{$tableName}.value", $condition)

            . ')';


With 


$attributeId = $attributeModel->getAttributeId();
        $condition = "({$pKey} = {$fKey}) AND ("
            . $this->_getConditionSql("{$tableName}.value", $condition)
            . ') AND ('
            . $this->_getConditionSql("{$tableName}.attribute_id", $attributeId)

            . ')';

Friday, 8 November 2019

Magento 2 Order Grid not showing NEW orders

1 - Go to Admin panel
2 - Click Stores - Configuration
3 - Advanced - Developer - Grid Settings
4 - Set Asynchronous Indexing to "Enable"
5 - Flush cache - (php bin/magento cache:flush;)
6 - Go to the database table "sales_order_grid". You can truncate this table.
7 - run this command twice - php bin/magento cron:run
8 - Flush cache - (php bin/magento cache:flush;)
9 - Set Asynchronous Indexing to "Disable"
10 - Flush cache - (php bin/magento cache:flush;)