Customer Loyalty Discount Scheme Module. The purpose of this order total module is to provide a basic Customer Loyalty Program/Discount Scheme, that rewards customers with discounts against each order based upon the amount they have spent in prior periods. This module, at the time of a customer order being placed, totals up the value of all previous orders this customer has placed over a pre-defined (in admin) rolling period of time and then applies a discount rate to this order according to a table of discount rates also pre-defined (in admin) that correspond to the amount spent over the rolling period. For example, in admin you have set the pre-defined rolling period to a month, and set up a table of discounts that gives 5.0% discount if they have spent over £1000 in the previous month (i.e previous 31 days, not calendar month), or 7.5% if they have spent over £1500 in the previous month.