Recommended product conflicts with configurable.js

We have been using Megamenu ver.1.2.0 on Magento 2.3 for several years and have recently upgraded to Magento 2.4.5
Since the upgrade we have had to remove the recommended products from the megamenu as we are getting js conflicts with configurable products.
This was an issue we also had with Magento 2.3 but fixed it by overriding the vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js file.
These fixes do not work on Magento 2.4.5
The errors we are getting:

  1. configurable.js:515 Uncaught TypeError: Cannot read properties of undefined (reading ‘length’) in the console.
    This appears to be because the priceBox which is being displayed for each recommended product is causing a conflict.
  2. When configurable product options are selected that involve a change in displayed price, the price change is incorrect. This looks to be because the price change is being carried out for each displayed price (there are extra displayed for recommended products).

Could you please advise if there is a suggested way of using recommended products in the megamenu that solves these issues?

1 answer

Profile photo of ubdev Staff 98390.00 $tone November 17, 2022


It appears that your UB Mega Menu license has expired already. We are only able to provide technical support for the active paid users, in this case please help to renew your license to receive further assistance from our team.

Returning users can apply this special coupon code to receive 20% renewal discount: PR020

Hope this helps.


Please login or Register to Submit Answer

Written By