Home โ€บ Modules โ€บ phyto_loyalty

phyto_loyalty

Points-based loyalty programme โ€” earn on purchase, redeem in cart, 4 tiers (Seedling โ†’ Specimen), full transaction ledger, and admin adjustments.

Commerce v1.0 PrestaShop 8 Browse Source on GitHub โ†—
modules/phyto_loyalty/
Direct path in the repo โ†’ all PHP, SQL, templates, and assets
Open on GitHub โ†—

Overview

A full-featured loyalty points programme. Customers earn points on every purchase, redeem them in the cart as a discount, and progress through four tiers that unlock better earn rates and perks. Admins can view the full transaction ledger and manually adjust points per customer.

Tiers

TierNamePoints ThresholdEarn Rate
1Seedling01ร—
2Cutting5001.25ร—
3Grower2,0001.5ร—
4Specimen5,0002ร—

Customer Experience

  • Points balance shown in account dashboard and cart
  • “Redeem X points for โ‚นY off” widget in cart (configurable conversion rate)
  • Tier badge displayed on account page
  • Transaction history: earned, redeemed, expired, admin-adjusted

Admin Features

  • Per-customer ledger view
  • Manual point adjustment (add/deduct) with reason note
  • Configurable: points per โ‚น1 spent, redemption rate, tier thresholds
  • Bulk export of loyalty balances

Source Layout

PathPurpose
phyto_loyalty.phpModule entry + hooks
classes/PhytoLoyaltyAccount.phpORM for customer point balances
classes/PhytoLoyaltyLedger.phpORM for individual transactions
classes/PhytoTierCalculator.phpTier and earn-rate logic
controllers/admin/AdminPhytoLoyaltyController.phpAdmin ledger + adjustments
sql/install.sqlCreates accounts + ledger tables
views/templates/hook/cart_redeem.tplCart redemption widget
views/templates/hook/account_balance.tplAccount dashboard balance card
View Full Source โ†— โ† Back to All Modules