Loyalty Points extension allows customers to earn loyalty points on the basis of their purchases. Admin can also reward Loyalty Points to it’s customers manually. Customer can use these loyalty points to pay for their future orders.
This extension allows admin to create a new payment method “Loyalty Points” in the system. Once this payment method is created and active, it would appear on checkout screen and customers can use this payment method for payments.
This extension also automates the awarding of loyalty points to customers based on the configuration done by admin and updating loyalty points based on the transactions on Spree Commerce platform.
This extension allows only Loyalty Points payment method for making a purchase and does not allow the payment through other payment modes like cash, check, credit card etc.
gem 'spree_loyalty_points', github: 'vinsol-spree-contrib/spree-loyalty-points'
Bundle your dependencies and run the installation generator:
bundle exec rails g spree_loyalty_points:install
To add loyalty point feature, Spree admin needs to create “Loyalty Points” payment method
Configuration -> Payment Methods -> New payment Method
You need to select “Spree::PaymentMethod::LoyaltyPoints” as a Provider
Spree admin need to make following settings on Configuration page:
Ex. Suppose Admin set this value this value to 1, it means, Customer will receive 1 Loyalty Point on spending every $1 on this site.
In order to receive loyalty points the payment should be done through some other mode like Credit card, Debit card, Cash, Check etc.
No loyalty points are awarded for purchase done through existing Loyalty point balance - Set minimum loyalty points balance required for redeeming - On the basis of this, Customer will be permitted to make a payment with Loyalty Points only if he/she has Loyalty Points balance more than the minimum loyalty points set by the Admin. - Set Loyalty Point to Amount conversion rate - This conversion rate converts the loyalty points into amount. This amount is displayed on the checkout screen with Loyalty Points balance. - Set Time to award Loyalty Points after payment - Loyalty Points will be credited to the Customer’s account on the basis of this set time period. This time period will be considered only after Customer makes the payment and Admin marks this payment “Capture”.
This field is provided to curb the misuse of the Loyalty Points by the customers. So, we suggest to set this time on the basis of the merchant’s “Return Policy”.
Admin can view list of the loyalty point transactions by following below mentioned steps:
Admin can also credit/debit loyalty points to the customers manually, by following below mentioned steps:
After setting mentioned configurations, Customer will be able to see this payment method on Checkout Page and can view details later on order detail page.
Cancelling order:If Admin wants to “Cancel” order, He/She needs to “Credit” Loyalty Points manually into the User’s account by following below mentioned steps:
Return Authorization: In case a user returns the shipped order by contacting Customer Care then to return the LP associated with the order admin needs to create a “New Return Authorization” and mention LP to be credited into User’s account.
Order’s Page -> Order Details Page -> Return Authorization -> New Return Authorization
After receiving the shipped product(s), Admin needs to “Receive” the Product. Once received,LP will be automatically credited into User’s account.
Order’s Page -> Order Details Page -> Return Authorization -> “Edit” Return Authorization -> Receive
Loyalty Points will be awarded to the customer only after: - Admin captures the payment manually for his order - “Time” set in Loyalty Point configuration has elapsed after capturing the payment.
Add a Cron Job to run the following rake task to award Loyalty Points to customers who satisfy the above two conditions.
bundle exec rake spree:loyalty_points:award
bundle exec rake test_app to create the test application in
bundle exec rspec spec.
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
bundle exec rake test_app
bundle exec rspec spec
Copyright (c) 2016 vinsol.com, released under the New MIT License