M2.2.x: Fix the compatible issue on Magento 2.2.0

Created by Rosa Truong, Modified on Tue, 10 Nov, 2020 at 10:37 AM by Rosa Truong

Issue:

 We have purchased a Gift Card plugin v1.0.5. I am facing the below error while running the upgrade command on M2.2.0. Can guide how we can solve it?

Fatal error: Class 'Klarna\Core\Model\Checkout\Orderline\AbstractLine' not found in /home/fabhabit/public_html/devsite/app/code/Bss/GiftCard/Model/Checkout/Orderline/Giftcard.php on line 29

and coming above error while entering gift coupon code in the checkout page

Class Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface does not exist


Solution:

Since Magento 2.2.x does not have the Klarna payment method as well as the class Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface does not exist so they cause the issues.

To fix this issue on m2.2.x, please follow our guide as below:


+ Step1: Remove the files that related to Klarna.

We have removed these files:

app/code/Bss/GiftCard/Model/Checkout/Orderline/Giftcard.php 

app/code/Bss/GiftCard/etc/klarna.xml

and edit this file app/code/Bss/GiftCard/etc/di.xml


+ Step 2: Fix the issue that class Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface does not exist since M2.2.0 does not this class.

We have changed the file app/code/Bss/GiftCard/Model/GiftCard.php

Please check and follow our guide and then replace the fixed files on your site.


If you need any further assistance, please feel free to contact us.

We are more than happy to support you.

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