Closed Medeka closed 8 months ago
Hi @Medeka ,
Thank you for the report.
For the merchant_item_id we are using the SKU of the product. For a Klarna transaction we need different SKU's for each item variation. For custom options in Magento there is already a setting to adjust the SKU accordingly.
For example:
This item's original SKU is '24-MB01'
For the custom options we are setting a custom SKU:
Magento will then concatenate the SKU with a hyphen in between: 24-MB01-M for the first option, 24-MB01-L for the second option
When implemented in this way, it should work. If there are any other questions related to this, please let us know.
Thank you @Vinod-MultiSafepay for your quick reply. This means we have to modify thousends of products. Is there a limit on the number of characters in the sku that you transfer to Klarna? It can be a long SKU if we make it dynamic according to the selected custom options.
Hi @Medeka ,
The limit for the Klarna item name and reference fields are 255 characters.
Unfortunately i don't see another easy solution, since the feature to customise the SKU alongside the custom option is actually already there in Magento, there is no need to introduce modification to the MultiSafepay plugin for this as well, as it works out of the box with that already.
Hello @Vinod-MultiSafepay,
Unfortunately for merchant it does not work out of the box;
This custom option field you mention is optional and is never used because there was never a reason. Merchant uses Klarna for years without this field. So we would appreciate a little more cooperation.
Hi @Medeka ,
Understood. Since the MultiSafepay API requires unique merchant item ID's, the only thing we could do at the plugin side is force unique merchant item ID's ourselves by concatenating the SKU with something that is unique, for example with some sort of custom increment.
These custom SKU's with increment will then be passed to Klarna, resulting in Klarna having order lines with references that are made up by the MultiSafepay Magento 2 plugin. I'm not sure if that is an ideal situation, because it's not clear for us what effects and implications this will have with Klarna.
We will investigate this a bit more and give you an answer later.
This sounds like a good solution for us.
Hi @Medeka ,
We've updated our module last week where we fixed this issue: https://github.com/MultiSafepay/magento2/releases/tag/3.2.0
I'm closing this one for now. If there are any questions, please feel free to leave a comment and we will reopen this issue if needed.
Customer can't order two same simple products with different custom options.
Steps to reproduce
Result We don't proceed to the Post payment method and get this Error from the Multisafepay API: Error processing checkout data: Invalid or duplicate merchant_item_id (Testproduct met opties) found.
Expected result We proceed to Klarna without this error.