6

I can't place the order, some of the specific bundle products, it throws the below error.

[2018-07-19 11:52:58] report.CRITICAL: Report ID: webapi-5b507b9a64391; Message: Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5b507b9a64391; Message: Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 at /var/www/html/production/vendor/magento/framework/Webapi/ErrorProcessor.php:205, Exception(code: 0): Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 at /var/www/html/production/vendor/magento/framework/App/ErrorHandler.php:61)"} []

If anyone faces this error before, please help me.

1
  • Hi Bilal. Have you found a root cause or a solution for this issue? Commented Jun 26, 2020 at 20:22

1 Answer 1

0

I ran into this issue today. This can happen when a product is disabled while a customer already has it in their cart. They will be unable to use their cart. You can fix this by finding their cart and removing the item from the cart.

Sadly Magento does not do this automatically.

I use this query to find out which quotes contain disabled products.

SELECT item_id, quote_id, quote_item.product_id, quote_item.store_id as 'quote_store_id' FROM quote_item LEFT JOIN catalog_product_entity_int as `status_default` ON status_default.entity_id = quote_item.product_id AND status_default.attribute_id = 97 AND status_default.store_id = 0 LEFT JOIN catalog_product_entity_int as `status_store` ON status_store.entity_id = quote_item.product_id AND status_store.attribute_id = 97 AND status_store.store_id = quote_item.store_id WHERE (status_store.value = 2 || (status_store.value IS NULL && status_default.value = 2)); 

To remove all items for disabled products, run:

DELETE FROM quote_item WHERE item_id IN(SELECT item_id FROM (SELECT * FROM quote_item) as `inner_quote_item` LEFT JOIN catalog_product_entity_int as `status_default` ON status_default.entity_id = inner_quote_item.product_id AND status_default.attribute_id = 97 AND status_default.store_id = 0 LEFT JOIN catalog_product_entity_int as `status_store` ON status_store.entity_id = inner_quote_item.product_id AND status_store.attribute_id = 97 AND status_store.store_id = inner_quote_item.store_id WHERE (status_store.value = 2 || (status_store.value IS NULL && status_default.value = 2))); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.