M2.2.x: Fix the error that Pre Order function does not work with configurable product when config Use Flat Catalog Product/Use Flat Catalog Category

Created by Rosa Truong, Modified on Mon, 31 Aug, 2020 at 7:51 PM by Rosa Truong

Issue: 

I installed the module version 1.1.5 on my Magento version 2.2.3. When config the child product of configurable product is Out of stock and Preorder set Yes/ When becomes out of stock, I found that on the product page, it does not show the Preorder button + Preorder message + Available Date.

Another thing, when setting all child products of configurable product is Preorder, the Preorder button does not show for the parent product.

How could you help to fix the issue?


Solution:

This issue is caused due to module Pre Order bug when config Use Flat Catalog Product Use Flat Catalog Category configurable product.

This issue only happens on Magento 2.2.x only since on Magento 2.3.x, it does not support Flat Catalog function anymore (https://docs.magento.com/user-guide/catalog/catalog-flat.html)

To fix this issue, we would like to give the hot-fix. 

We have edited this file:

app/code/Bss/PreOrder/Model/Attribute/Source/Order.php

Please check the attachment below to get the changed file and replace it on your site.


If you need any further support, please feel free to contact us via email sales@bsscommerce.com 

Attachments (1)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article