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!