cancel
Showing results for 
Search instead for 
Did you mean: 

Notice: Undefined index: quantity | HELP

Notice: Undefined index: quantity | HELP

I am currently facing a problem with the below error and was hoping if someone could help.

 

Notice: Undefined index: quantity in /public_html/Magento/vendor/magento/module-inventory-sales/Model/IsProductSalableCondition/IsSalableWithReservationsCondition.php on line 87

I have found solutions to other Undefined Index problems but not to mine.

 

This error happens on the product page when I edit certain products. Please note it only happens to a few products.

 

I've tried to go into the attribute settings, re-saving and then reindexing but this has not worked. I've had a look into the database and couldn't find anything that stands out as wrong.

 

Any helps is appreciated, I am also getting a "Something went wrong with processing the default view and we have restored the filter to its original state." error when searching for some products but I believe these problems are related.

 

Screenshots below

Something went wrong https://pasteboard.co/Jhs7D2g.png 

Undefined Index https://pasteboard.co/Jhs7JPU.png 

Line 87 https://pasteboard.co/Jhs95Pm.png

 

Thanks

2 REPLIES 2

Re: Notice: Undefined index: quantity | HELP

Hi @tom_gill 

 

This link helped you solve the issue:

https://magento.stackexchange.com/questions/256157/magento-2-3-elastic-search-5-0-error-on-some-page...

 

Under Stores -> Attributes -> Product select <your attribute>. Then go to store front properties tab and set the following:

Use in Search: No

Use In Search Results Layered Navigation No

 

Then run the following two commands:

 

bin/magento cache:clean
bin/magento indexer:reindex 

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

 

Problem solved? Click Accept as Solution!

Re: Notice: Undefined index: quantity | HELP

Thanks for getting back to me so quickly.

 

I found there where was 1 product that when searched for in the backend (Product1). Caused the following error.

image001 (9).png

 

I deleted this product in the database. Reloaded the product I was trying to edit and this solved my problem.

 

Not sure if the product I deleted was configured incorrectly and caused a problem with the database?

 

Thanks again for your suggestion, I've been trying to solve this problem since Monday and it turns out it was as simple as deleting 1 product 

 

Tom