v1.3.1: How to fix conflict with module Amasty_FreeGift

Created by Support Agent, Modified on Mon, 13 Apr at 1:49 AM by Support Agent

QUESTION:


Before we installed SDCP our Amaty Free Gift extension worked fine. But now it fails to work and cart wont load with a product that includes free gift. It errors out.

Go to a product and add to cart. At the top of page will then be a link to "Add free gift". In about 20 secs the page will break and this error show: 

<script type="text/x-magento-init">    {        "#product_addtocart_form": {            "priceOptions": {                "optionConfig": Error: Call to a member function getTypeId() on null in /xxx/xxxxx/xxx/xxxxx/xxxx/xxx/app/code/Bss/Simpledetailconfigurable/Observer/SetChildCustomOption.php:77 Stack trace:


Also if you click "View Cart" again page willl break with this conflict with SDCP

 

Could you guide us how to fix it?


ANSWER:


To fix this conflict, please edit the file /app/code/Bss/Simpledetailconfigurable/Observer/SetChildCustomOption.php as below: 



Or download the file attached below to override the current file on your site.


If you need any further assistance, please feel free to contact us. We'd be happy to support!


Learn more 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.


Please visit our site for more useful Magento 2 Extensions: https://bsscommerce.com/magento-2-extensions.html


Get our extensions now:


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