cancel
Showing results for 
Search instead for 
Did you mean: 

Error on importing stock for multiple warehouse

Error on importing stock for multiple warehouse

Hi All - I am trying to import products from Magento 2.2.1 to Magento 2.3.1. I have multiple Warehouse setup on my store. When I try to import Stock in new upgrade. it gives me error message.

 

"Warehouse with default code does not exist"

 

While it exist in every magento installation the Total Stock Warehouse. Please guide me what I am doing wrong and point me in right direction.

 

I am using Amasty Multi Warehouse Inventory extension.

3 REPLIES 3

Re: Error on importing stock for multiple warehouse

@sohail_83 

 

@Amastyshould be able to guide you here.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Error on importing stock for multiple warehouse

I import the products too in my new instance and when I run indexer command it gives me below error.

 

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'csw.store_id' in 'on clause', query was: INSERT INTO `catalog_product_index_price_store_temp` SELECT `e`.`entity_id`, `cg`.`customer_group_id`, `pw`.`website_id`, IF(IFNULL(tas_tax_class_id.value_id, -1) > 0, tas_tax_class_id.value, tad_tax_class_id.value) AS `tax_class_id`, IFNULL((IF(IFNULL(tas_price.value_id, -1) > 0, tas_price.value, tad_price.value)), 0) AS `price`, IFNULL((LEAST(IF(IFNULL(tas_price.value_id, -1) > 0, tas_price.value, tad_price.value), IF(IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value) IS NOT NULL AND (IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value)) <= cwd.website_date) AND (IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value)) >= cwd.website_date), IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value), ~0), IFNULL((tp.min_price), ~0))), 0) AS `final_price`, IFNULL((LEAST(IF(IFNULL(tas_price.value_id, -1) > 0, tas_price.value, tad_price.value), IF(IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value) IS NOT NULL AND (IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value)) <= cwd.website_date) AND (IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value)) >= cwd.website_date), IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value), ~0), IFNULL((tp.min_price), ~0))), 0) AS `min_price`, IFNULL((LEAST(IF(IFNULL(tas_price.value_id, -1) > 0, tas_price.value, tad_price.value), IF(IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value) IS NOT NULL AND (IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value)) <= cwd.website_date) AND (IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) IS NULL OR DATE(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value)) >= cwd.website_date), IF(IFNULL(tas_special_price.value_id, -1) > 0, tas_special_price.value, tad_special_price.value), ~0), IFNULL((tp.min_price), ~0))), 0) AS `max_price`, tp.min_price AS `tier_price` FROM `catalog_product_entity` AS `e`
 CROSS JOIN `customer_group` AS `cg`
 INNER JOIN `catalog_product_website` AS `pw` ON pw.product_id = e.entity_id
 INNER JOIN `catalog_product_index_website` AS `cwd` ON pw.website_id = cwd.website_id
 LEFT JOIN `catalog_product_index_tier_price_store` AS `tp` ON tp.entity_id = e.entity_id AND tp.customer_group_id = cg.customer_group_id AND tp.store_id = csw.store_id
 LEFT JOIN `catalog_product_entity_tier_price` AS `tier_price_1` ON tier_price_1.entity_id = e.entity_id AND tier_price_1.all_groups = 0 AND tier_price_1.customer_group_id = cg.customer_group_id AND tier_price_1.qty = 1 AND tier_price_1.website_id = 0
 LEFT JOIN `catalog_product_entity_tier_price` AS `tier_price_2` ON tier_price_2.entity_id = e.entity_id AND tier_price_2.all_groups = 0 AND tier_price_2.customer_group_id = cg.customer_group_id AND tier_price_2.qty = 1 AND tier_price_2.website_id = pw.website_id
 LEFT JOIN `catalog_product_entity_tier_price` AS `tier_price_3` ON tier_price_3.entity_id = e.entity_id AND tier_price_3.all_groups = 1 AND tier_price_3.customer_group_id = 0 AND tier_price_3.qty = 1 AND tier_price_3.website_id = 0
 LEFT JOIN `catalog_product_entity_tier_price` AS `tier_price_4` ON tier_price_4.entity_id = e.entity_id AND tier_price_4.all_groups = 1 AND tier_price_4.customer_group_id = 0 AND tier_price_4.qty = 1 AND tier_price_4.website_id = pw.website_id
 LEFT JOIN `catalog_product_entity_int` AS `tad_tax_class_id` ON tad_tax_class_id.entity_id = e.entity_id AND tad_tax_class_id.attribute_id = 129 AND tad_tax_class_id.store_id = 0
 LEFT JOIN `catalog_product_entity_int` AS `tas_tax_class_id` ON tas_tax_class_id.entity_id = e.entity_id AND tas_tax_class_id.attribute_id = 129 AND tas_tax_class_id.store_id = csw.store_id
 INNER JOIN `catalog_product_entity_int` AS `tad_status` ON tad_status.entity_id = e.entity_id AND tad_status.attribute_id = 97 AND tad_status.store_id = 0
 LEFT JOIN `catalog_product_entity_int` AS `tas_status` ON tas_status.entity_id = e.entity_id AND tas_status.attribute_id = 97 AND tas_status.store_id = csw.store_id
 LEFT JOIN `catalog_product_entity_decimal` AS `tad_price` ON tad_price.entity_id = e.entity_id AND tad_price.attribute_id = 77 AND tad_price.store_id = 0
 LEFT JOIN `catalog_product_entity_decimal` AS `tas_price` ON tas_price.entity_id = e.entity_id AND tas_price.attribute_id = 77 AND tas_price.store_id = csw.store_id
 LEFT JOIN `catalog_product_entity_decimal` AS `tad_special_price` ON tad_special_price.entity_id = e.entity_id AND tad_special_price.attribute_id = 78 AND tad_special_price.store_id = 0
 LEFT JOIN `catalog_product_entity_decimal` AS `tas_special_price` ON tas_special_price.entity_id = e.entity_id AND tas_special_price.attribute_id = 78 AND tas_special_price.store_id = csw.store_id
 LEFT JOIN `catalog_product_entity_datetime` AS `tad_special_from_date` ON tad_special_from_date.entity_id = e.entity_id AND tad_special_from_date.attribute_id = 79 AND tad_special_from_date.store_id = 0
 LEFT JOIN `catalog_product_entity_datetime` AS `tas_special_from_date` ON tas_special_from_date.entity_id = e.entity_id AND tas_special_from_date.attribute_id = 79 AND tas_special_from_date.store_id = csw.store_id
 LEFT JOIN `catalog_product_entity_datetime` AS `tad_special_to_date` ON tad_special_to_date.entity_id = e.entity_id AND tad_special_to_date.attribute_id = 80 AND tad_special_to_date.store_id = 0
 LEFT JOIN `catalog_product_entity_datetime` AS `tas_special_to_date` ON tas_special_to_date.entity_id = e.entity_id AND tas_special_to_date.attribute_id = 80 AND tas_special_to_date.store_id = csw.store_id WHERE (IF(IFNULL(tas_status.value_id, -1) > 0, tas_status.value, tad_status.value) = 1) AND (e.type_id = 'simple') AND (e.entity_id BETWEEN 33 AND 1175)

 Below is the indexes status.

Screen Shot 2019-09-05 at 3.12.21 AM.jpg

I am using multi store views.

Re: Error on importing stock for multiple warehouse

Hello @sohail_83,

 

If you are using the Magento 2.3.1 version. I would suggest you to use MageMob Inventory for Magento 2. This extension is compatible with default MSI inventory and you have not get any this type of query. Also you have get features of Low stock, stock manmagement, push notification etc.

Thank you