1

I am facing a very strange error message on checkout level on our Magento 2.4.4 instance with products with quantity below 1 and this only for customer group "Not logged in"

When checking out only an article with 0.5 units I get an error message saying "Some of the products are disabled"

Error message: Some of the products are disabled

But those products are all enabled in all our store views.

For those products o.5 is the minimum quantity, as they are a material, which can be bought in units < 1 and also in decimal quantities.

In our store I have the MOQ set as 0.5 globally for each customer group and then Quantity uses decimals = Yes

MOQ 0.5

I can put the article with 0.5 into the shopping cart without problem.

But when I say "Proceed to checkout" with only 1 article with 0.5 int the cart, I get the error message as stated above.

Strangely when I put 2 articles with 0.5 into the cart, I can checkout without any problem.

Only quantity below 1 creates a problem.

Does anyone know how and where this error message can stem from, even if the products are enabled?

3
  • may be you have set wrong value in Enable Qty Increments and Qty Increments textbox.
    – S.P
    Commented May 13, 2022 at 2:50
  • may be it is magento2.4.4 bug. compare Magento\Checkout\Model\GuestPaymentInformationManagement ::savePaymentInformation function with old magento version.
    – S.P
    Commented May 13, 2022 at 7:42
  • just remove (int) from if (!(int)$quote->getItemsQty()) { Line num: 179 it should be if (!($quote->getItemsQty())) {
    – S.P
    Commented May 13, 2022 at 7:43

1 Answer 1

5
+50

check your magento file vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php

the GuestPaymentInformationManagement.php file is updated in magento2.4.4 version.

Magento\Checkout\Model\GuestPaymentInformationManagement::savePaymentInformation()

replace below code and check.

 if (!(int)$quote->getItemsQty()) {
            throw new CouldNotSaveException(__('Some of the products are disabled.'));
        }

to

if(!$quote->getItemsQty())
        {
            throw new CouldNotSaveException(__('Some of the products are disabled.'));    
        }
7
  • 1
    Unfortunately all values in Minimum Qty Allowed in Shopping Cart , Qty Uses Decimals, Enable Qty Increment set correct. Minimum Qty Allowed in Shopping Cart = Use config settings as above Qty uses decimals = Yes Enable quantity Increments = No Things is, that it works with logged in users but not with user group = Not logged in
    – Ben
    Commented May 13, 2022 at 6:20
  • do you get same issue for all products or only specified products?
    – S.P
    Commented May 13, 2022 at 6:54
  • check my updated answer.
    – S.P
    Commented May 13, 2022 at 7:38
  • Genius! This worked smooth like a knife through soft Amul butter :) Amazing. Additonal question: can it be that this already also needs to be changed when putting item to cart? Because there already we got a similar error message. When we double clicked that worked.
    – Ben
    Commented May 13, 2022 at 9:46
  • which message do you get when added product to cart? Is it same message?
    – S.P
    Commented May 13, 2022 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.