Customer loyalty programmes are a useful tool to tie customers tighter to the own brand and to generate more sales with lower customer acquisition costs than it would be necessary to gain a new customer. That is a reason why programmes, that reward customers for their loyalty, are so popular – especially those programmes, who work with a great number of partner companies and thus have a greater number of participants. For our client Mathes Design GmbH and their Magento based store we have developed a Miles & More integration that makes it possible to use this loyalty programme in their online store.


Miles & More is the frequent flyer and awards programme offered by Miles & More GmbH, a subsidiary of Deutsche Lufthansa AG. Participants of this programme can earn and spend award miles with almost 40 airline partners as well as 270 companies of different industries like shopping and lifestyle, hotels, rental cars, cruises, banks and insurances, as well as media and entertainment.
The earned award miles can be spent partially or as a whole in exchange for awards. For more details, please take a look at the official Miles & More brochure.

Implementation in three steps

The development in the existing Magento 1 store of the client was done in three stages:

  1. Earn miles
  2. Spend miles (full amount)
  3. Spend miles (partial amount)

In stage 1, we integrated the functionality to earn award miles when placing an order. On the product detail page, in the shopping cart and in the order summary during the last checkout step, we display the amount of miles that can be earned with this purchase. The customer only needs to provide his or her Miles & More service card number in the shopping cart.
Stage 2 included the payment of a complete order with miles only. For this, it is necessary to enter the Miles & More service card number as well as the PIN, in order to allow a check of the customer’s mileage account via an interface.


Product Detail Page


Since Design-Bestseller offers many products in an upscale segment, which would require an appropriately filled mileage account, there was soon the demand to be able to spend miles for a partial amount of the shopping cart. This has been made possible at stage 3 of the project.


Partial amount of 100.000 miles or 303,03 € spent in the cart


The release of stage 3 was done in April 2019.

Technical implementation and connection to Miles & More

Entering service card number and PIN

We have developed the Miles & More integration like a regular Magento extension which could be used in other Magento stores, too. After the installation, the module adds the functionality to save the 15 digit Miles & More service card number to the account of a registered customer. Of course guest orders can earn award miles and spend miles, too.
The five digit PIN is only necessary when spending miles; for security reasons it is not saved in the online store.

In the configuration, the following settings are available:

  • API login data for Miles & More
  • Personal conversion rate of miles to Euro for earning and spending miles
  • Set product types which are excluded from earning miles
  • Number of days after which earned miles are transferred via API

Initially, dynamically created cart price rules were used for the spending of partial amouts. For a better compatibility with other cart price rules, the spending of miles is now represented by a new Magento totals class. This is also necessary in order to properly display VAT when spending of miles as if there was reduction of the order amount due to the spending of miles.

After an order is placed, the number of spent miles is immediately transferred via the interface to Miles & More. Earned miles are synchrononised after a configurable period of time. A requirement is that payment and shipping of the order have taken place.

Acceptance and outlook

Since the release of phase 2 more than 2.500 customers have already earned award miles with their orders and 300 customers have spent miles. This is a successful start of this project for our client Design Bestseller, who thereby offer an additional service to their customers.

Miles & More for Magento 2

We contemplate porting the extension to Magento 2 which is generally possible. If you are interested in the Miles & More extension, please feel free to contact us.

André Herrn is a freelance Magento developer. He works together with the team of integer_net on multiple projects with a longterm perspective.