Loyalty Points

Created by:  Ryan Mitchell
 20

Allow customers to earn and spend loyalty points on your TastyIgniter site

 Extension
Version
Updated
1 month ago
Published
2 months ago
Author
Ryan Mitchell

Loyalty Points

This extension enables earning and spending of loyalty points on your TastyIgniter site.

Usage

After installation a new settings area will appear called 'Loyalty Points Settings' giving you the ability to control how much each point is worth, and options for how to earn points.

To display the loyality points form on your site, you will need to add the loyaltyForm component to both the default and local layouts, and manually insert @component('loyaltyForm') into the cartbox/default.blade.php file of the cart extension. It is recommended to place it in between the coupon and tip components.

Components

Name Page variable Description
loyaltyForm @component('loyaltyForm') Display the loyalty points input form
loyaltyHistory @component('loyaltyHistory') Add to the account area to display the current logged in user's earning and spending history. If no user is logged in this will be blank.
loyaltyCount @component('loyaltyCount') Add to any page to display the currently logged in user's loyalty points count. If no user is logged in this will be blank.

loyaltyHistory Component

Properties

Property Description Example Value Default Value
itemsPerPage Number of history items to display on each page 5 20
sortOrder Order to sort the history items date_use asc date_used desc

Mail variables

This extension also adds new mail variables to the order notification emails.

Variable Description
loyalty_points.redeemed The number of points redeemded on this order
loyalty_points.earned The number of points earned by this order
loyalty_points.customer_total The number of points this customer now has in total (or 0 if customer is not logged in)
loyalty_points.loyalty_applied true if the customer is logged in points earned have been logged, or false otherwise

These variables are only available on orders with loyalty points, so be careful when using them and ensure you wrap them in a conditional @if (isset($loyalty_points)) statement.

Releases

  1.   Latest release
    1.0.2

  2. 1.0.1

    Minor fixes

  3. 1.0.0

    Ready for marketplace