comment out or remove line 20 to 31 in map.xml file,
<!-- <ignore>
<document>sales_flat_creditmemo_grid</document>
</ignore>
<ignore>
<document>sales_flat_invoice_grid</document>
</ignore>
<ignore>
<document>sales_flat_order_grid</document>
</ignore>
<ignore>
<document>sales_flat_shipment_grid</document>
</ignore> -->
Add inside <document_rules>
tag of source tag,
<rename>
<document>sales_flat_order_grid</document>
<to>sales_order_grid</to>
</rename>
<rename>
<document>sales_flat_invoice_grid</document>
<to>sales_invoice_grid</to>
</rename>
<rename>
<document>sales_flat_creditmemo_grid</document>
<to>sales_creditmemo_grid</to>
</rename>
<rename>
<document>sales_flat_shipment_grid</document>
<to>sales_shipment_grid</to>
</rename>
Add below content under <field_rules>
tag of source tag.
<move>
<field>sales_flat_creditmemo_grid.grand_total</field>
<to>sales_creditmemo_grid.order_base_grand_total</to>
</move>
<!-- source table custom grid field-->
<ignore>
<field>sales_flat_invoice_grid.base_grand_total</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_base_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_global_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.creditmemo_status</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.invoice_id</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.order_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.global_currency_code</field>
</ignore>
comment out or remove line inside <destination>
<document_rules>
tag,
<!-- <ignore>
<document>sales_creditmemo_grid</document>
</ignore>
<ignore>
<document>sales_invoice_grid</document>
</ignore>
<ignore>
<document>sales_order_grid</document>
</ignore>
<ignore>
<document>sales_shipment_grid</document>
</ignore>-->
Add below line inside <destination>
part of <field_rules>
tag
<ignore>
<field>sales_order_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_group</field>
</ignore>
<ignore>
<field>sales_order_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_order_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_order_grid.total_refunded</field>
</ignore>
<ignore>
<field>sales_invoice_grid.store_name</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_invoice_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_invoice_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_invoice_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.order_status</field>
</ignore>
<ignore>
<field>sales_shipment_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_shipment_grid.billing_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_shipment_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.order_status</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.adjustment_positive</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.adjustment_negative</field>
</ignore>
save map.xml file and
run php magento migrate:data /var/www/html/{{magentoroot}}/vendor/magento/data-migration-tool/etc/ce-to-ce/{{CE version}}/config.xml
I found solution using this script,
In above condition, product image are already assign in database but not show in frontend, you can do this using this script.
You need to do following things,
Create one file in magento root directories, let say file name is "Productimage.php"
Put the following code into that file,
<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
try
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$importDir = __DIR__ . '/pub/media/catalog/product';
$product = $objectManager->get('Magento\Catalog\Model\Product')->load(YOURPRODUCTID);
if($product->getImage() != '')
{
$id = $product->getId();
$url = $importDir . $product->getImage();
$product->addImageToMediaGallery($url, array('image', 'small_image', 'thumbnail'), true, false);
$product->save();
echo "<br /><br /> $id Product Save Succefully";
}
}
catch(\Exception $e)
{
echo $e->getMessage();
exit;
}
NOTE: replace YOURPRODUCTID with your real Id.
Best Answer
Make sure products are added to the website. Same thing happened to me
Catalog > Products | Select All
Then on the Options dropdown, "Update Attributes" > Select the "Websites" tab on the left. Check the boxes under "Add Product to Websites" > Save
Might have to clear cache after. But that's what worked for me. Even though the DB was showing the field correctly, running the update fixed it for me.
I hope it works for you.