Please note that it is never a good idea to change directly in your already up and working system, no matter what you are doing.
We recommend that you, as you always should when making changes to something that works, make a backup and then make a additional testpage to make the tests on.

Installation guide

Step by step guide

  1. Download the module and copy the files to your installation
  2. Remove any deprecated warnings that might be displayed
  3. Install the module
  4. If you have custom template or other modules
  5. Monthly cost on frontpage

1. Download the module and copy the files to your installation

If you have not already downloaded the module you can download it here. After downloading, unzip it and copy the contents of the "copy_this"-folder into your system. No files will be overwritten.

If you have a custom template for changing your view, you need to copy the "out"-folder found in the "copy_this"-folder to that custom template folder.

NOTE
Do not forget to empty your "tmp"-folder which you will find here: {your_oxid_installation}/tmp. Otherwise names of Klarnas variables might not be shown properly.

2. Remove any deprecated warnings that might be displayed

If you can see deprecated messages displaying in your admin view/shop view after you have copied the Klarna Oxid module to your directory, you need to do this step before moving forward. If everything looks good, just continue to the next step.
Example of how it can look:


By default the shop displays deprecated warnings and alerts itself when code is deprecated by php.
Before you continue with your installation you need to make sure that these messages do not show.
You can do that by changing in the file: {your_oxid_installpath}/views/oxshopcontrol.php
Change in the function: _runOnce(). There are two places in this function where you will find this line by standard: "error_reporting( E_ALL ^ E_NOTICE );" Make sure that it will be altered to this: "error_reporting( E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING );". Otherwise deprecated functions and warnings will be displayed.

After that you are ready to continue with the installation.

3. Install the module

When you have copied the files to your system you should go into the admin view of your system and go to the new menu option "Install Klarnas payment option" under the headmenu "Klarna".


Enter the installation page and fill in your Shop ID, Secret and the invoice fee.

The installation is now done and you can find Klarnas payment options in the checkout.

4. If you have custom template or other modules

If you already have other modules installed or a custom template, you may need to make some changes to your template files(files ending with .tpl).
If you e.g. have another payment method that changes the payment.tpl file you will need to merge these files together so that both your current payment options and Klarnas payment options will be visible.

If you see something like this on your checkout page:


This probably means that you have a another payment method that is also making changes to the payment.tpl and you need to merge your other payment methods payment.tpl file with klarnas: klarna_payment.tpl file.
You will find these kind of tags where Klarna has made changes to the .tpl file:
<!-- ==================== -->
<!-- =====EDIT START===== -->
<!-- ==================== -->

<!-- ==================== -->
<!-- ======EDIT END====== -->
<!-- ==================== -->
Hopefully no places have been left out or missed, the thought is also to make it easier to merge when you know what changes Klarna has made to the file.

NOTE: If you need to change this file mentioned above you may also need to change other template files. All Klarnas template files begins with "klarna_", you should take yourself time to go through all files and merge them one by one. There is no guarantee that it will work properly otherwise.

5. Monthly cost on frontpage

If you would like to see Klarnas monthly cost offer on the first page as well and not only on the detailed page of a product, then there is a extra file that you can copy to your installation.
You will find it in the folder: optional_installation_material.
This file will however overwrite your already existing product.tpl file, which moderates how the products are displayed on e.g. the first page.
So if you already have made changes to this file, then you will need to merge them instead of overwriting it.
You will find the changes made by Klarna in between these tags:
<!-- ==================== -->
<!-- =====EDIT START===== -->
<!-- ==================== -->

<!-- ==================== -->
<!-- ======EDIT END====== -->
<!-- ==================== -->

You are now ready to start selling with Klarnas services. Make sure you take away test mode in Klarna Online before you publish the payment method.