[v1.2.2] Fix the error "We can't add the item to the cart right now."

Created by Support Agent, Modified on Mon, 20 Apr at 11:38 PM by Support Agent

Issue: 

We're using version 1.2.2 on Magento 2.4.2 and we find an issue as below.

Steps to reproduce: add a configurable product to the wishlist, go to wishlist and try to add the product to the cart.

Expected result: You get redirected to the product page with a notice to select an option.

Actual result: You get an error "We can't add the item to the cart right now."

Could you please check and fix it?


Solution:

This issue is the module's bug in the current version 1.2.2.

This class treats one of its parameters, $requestInfo, as if it would be an array.

However, that parameter is an object which causes an exception on line 179  $requestInfo['super_attribute'][$key] = "";

Please change and replace the code in the file app/code/Bss_HidePrice/Plugin/Checkout/Model/Cart.php.


If you have any issues, please feel free to contact us.

We'd like to help.


About us


BSS Commerce is a trusted Magento 2 extensions provider with 14+ years of experience, serving 75,000+ customers worldwide. We are an Adobe Commerce Solution Bronze Partner and a Select Magento Extensions Builder, reinforcing our expertise in the Magento ecosystem.


We specialize in developing 150+ high-quality Magento 2 extensions that enhance functionality, improve user experience, and support scalable growth. Our reputation is built on long-term partnerships, positive feedback, and proven performance-driven solutions.


Explore our extensions: https://bsscommerce.com/magento-2-extensions.html 


For B2B businesses, our Magento B2B Extension by BSS Commerce is a flagship and widely adopted solution globally, offering advanced pricing, company account management, and streamlined workflows.


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