As Admin side Import is not working. Have to follow this way to achieve functionality ASAP.
Managed to do below things, But 1 issue not able to Save on Admin side. I have compared table entry with other tables as well. Please point out what I'm missing
catalog_product_entity
// Main Product Table Entry
INSERT INTO catalog_product_entity
(entity_id
, attribute_set_id
,
type_id
, sku
, has_options
, required_options
, created_at
,
updated_at
) VALUES (NULL, '16', 'simple', 'test1', '0', '0',
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
Will Return 2049 as Product Id & will be used for Future Tables
catalog_product_entity_varchar
// Title & Description & URL
INSERT INTO catalog_product_entity_varchar
(value_id
,
attribute_id
, store_id
, entity_id
, value
) VALUES (NULL, '73',
'0', '2049', 'Test 1'), (NULL, '84', '0', '2049', 'Test 1'), (NULL,
'86', '0', '2049', 'Test 1'), (NULL, '126', '0', '2049', 'test-1');
catalog_product_website
// Assign Product to Website
INSERT INTO catalog_product_website
(product_id
, website_id
)
VALUES ('2049', '1');
catalog_product_entity_decimal
// Product Price
INSERT INTO catalog_product_entity_decimal
(value_id
,
attribute_id
, store_id
, entity_id
, value
) VALUES (NULL, '77',
'0', '2049', '1.11');
catalog_product_index_price
// Assign All Group Wise Price
INSERT INTO catalog_product_index_price
(entity_id
,
customer_group_id
, website_id
, tax_class_id
, price
,
final_price
, min_price
, max_price
, tier_price
) VALUES (2049,
0, 1, 2, '1.1100', '1.1100', '1.1100', '1.1100', NULL), (2049, 1, 1,
2, '1.1100', '1.1100', '1.1100', '1.1100', NULL), (2049, 2, 1, 2,
'1.1100', '1.1100', '1.1100', '1.1100', NULL), (2049, 3, 1, 2,
'1.1100', '1.1100', '1.1100', '1.1100', NULL);
catalog_category_product
// Assign Product to Category
INSERT INTO catalog_category_product
(entity_id
, category_id
,
product_id
, position
) VALUES (NULL, '41', '2049', '1');
catalog_product_entity_int
// Enable Product & Visibility
INSERT INTO catalog_product_entity_int
(attribute_id
, store_id
,
entity_id
, value
) VALUES (133, 0, 2049, 2), (115, 0, 2049, 1),
(99, 0, 2049, 4), (97, 0, 2049, 1);
cataloginventory_stock_item
// For Inventory Quantity
INSERT INTO cataloginventory_stock_item
(item_id
, product_id
,
stock_id
, qty
, min_qty
, use_config_min_qty
, is_qty_decimal
,
backorders
, use_config_backorders
, min_sale_qty
,
use_config_min_sale_qty
, max_sale_qty
, use_config_max_sale_qty
,
is_in_stock
, low_stock_date
, notify_stock_qty
,
use_config_notify_stock_qty
, manage_stock
,
use_config_manage_stock
, stock_status_changed_auto
,
use_config_qty_increments
, qty_increments
,
use_config_enable_qty_inc
, enable_qty_increments
,
is_decimal_divided
, website_id
) VALUES (2049, 2049, 1, '100.0000',
'0.0000', 1, 0, 0, 1, '1.0000', 1, '10000.0000', 1, 1, NULL, '1.0000',
1, 1, 1, 0, 1, '1.0000', 1, 0, 0, 0);
url_rewrite
// For URL Rewrite
INSERT INTO url_rewrite
(entity_type
, entity_id
, request_path
,
target_path
, redirect_type
, store_id
, description
,
is_autogenerated
, metadata
) VALUES ('product', 2049,
'coins/test-1.html', 'catalog/product/view/id/2049/category/41', 0, 1,
NULL, 1, 'a:1:{s:11:"category_id";s:2:"41";}'), ('product', 2049,
'test-1.html', 'catalog/product/view/id/2049', 0, 1, NULL, 1, NULL);
Check the eav_attribute
table which stores ALL Attributes
10] catalog_url_rewrite_product_category
// For URL Rewrite
INSERT INTO catalog_url_rewrite_product_category
(url_rewrite_id
,
category_id
, product_id
) VALUES ('631', '41', '2049');
After this, you are able to see your Product on the Frontend
Execute Below Command:
php bin/magento setup:upgrade
php bin/magento indexer:reindex
php bin/magento cache:flush
You can see your newly created product entry in Below tables now
catalog_category_product_index
catalog_product_flat_1
cataloginventory_stock_status
cataloginventory_stock_status_idx
Issue: When i go to Admin -> Catalog -> Edit
Product & Save. It's not doing anything. Just Hold Over there. No Errors displayed on Admin or in Console no issue logged in Log file as well.
[UPDATE - Solution]
I'm using my new "Attribute Set" in that some of the Attributes are Mandatory fields.
I have added that attribute entry in catalog_product_entity_varchar
& it's work fine now :)
Best Answer
You have to just export non magento database in csv format and convert your csv to magento related format to fast import in magento.
You have to manage your csv related to magento specific, saves your time and energy.
For Magento specific product and customer csv, You just need to export csv for each product and customer from
To check magento specific csv.
If you want to create custom script for each customer and product import you need to give more time and energy to workout.