Loyalty programme
Guide to Shoporama's loyalty program. Learn how to set up the points system, customize your theme, and give your customers rewards for shopping.
Shoporama's loyalty program allows your customers to earn points when they shop in your webshop. Points can later be used as payment on new orders.
How it works
Customers who create a profile in your online store can earn points for each purchase. You control the rules in admin under Settings → Loyalty program:
| Settings | Description |
|---|---|
| Points per currency unit | How many points the customer gets per DKK spent |
| Waiting period | Number of days from award until points can be used |
| Signup bonus | Number of points when signing up for the loyalty program |
| Points per DKK | How many points correspond to 1 DKK when paying |
| Minimum order amount | Minimum order amount to use points |
| Maximum amount | Maximum amount that can be paid with points |
| Expiration time | Whether points expire after X months |
| Discounted items | Whether points can be used on promotional products |
| Categories | Limit points to certain categories |
The customer gets their points when the order is completed.
Theme customization (for developers)
Your theme must have code to display points and receive point payments. The default themes (Delaware, DelawareDK etc.) have this included from the start. If you build your own theme, you can use the following:
Show user's points:
<{if $webshop->hasLoyaltyProgram()}> Your points: <{$customer->getActivePoints()|number_format:0:",":"."}> <{/if}>
Check if the user has active points:
<{if $customer && $customer->getActivePoints()}> You have <{$customer->getActivePoints()|number_format:0:",":"."}> points. <{/if}>
Input field for points payment (in basket.html):
<input type="number" name="use_points" placeholder="How many points do you want to use?" value="<{$use_points}>" min="0" max="<{$customer->getPointsAvailable()}>" />
Show earning rules:
You earn <{$webshop->getLoyaltyProgramBasePoints()|number_format:0:",":"."}> points for every 1 <{$webshop->getCurrency()}> you shop for.
When paying with points, <{$webshop->getLoyaltyProgramBaseCost()|number_format:0:",":"."}> points equal 1 <{$webshop->getCurrency()}>.
Show points earned on the order:
You earn <{$earns|number_format:0:",":"."}> points on this order.
Points history page
Add the user-points.html file in your theme where the user can see their points:
<table> <tr> <th>Date</th> <th>Order</th> <th>Status</th> <th>Point</th> <th>Expires</th> <th>Pending until</th> </tr> <{foreach $my_points as $point}> <tr> <td><{$point->getTime()|date_format:"%d.%m.%Y"}></td> <td> <{if $order = $point->getOrder()}> <a href="<{$order->getPublicUrl()|escape}>"> <{$order->getWebshopOrderId()|escape}> </a> <{/if}> </td> <td> <{if $point->getStatus() == "approved"}>Approved <{elseif $point->getStatus() == "pending"}>Pending <{elseif $point->getStatus() == "revoked"}>Revoked <{elseif $point->getStatus() == "expired"}>Expired <{else}><{$point->getStatus()|escape}> <{/if}> </td> <td><{$point->getPoints()|number_format:0:",":"."}></td> <td><{$point->getExpires()|date_format:"%d.%m.%Y"}></td> <td><{$point->getPendingUntil()|date_format:"%d.%m.%Y"}></td> </tr> <{/foreach}> </table>
Do you have any questions? Contact us at support@shoporama.dk.