Customer Loyalty Discount
Plugin:
https://www.zen-cart.com/downloads.php?do=file&id=1917
Got this question via PM (please do not PM me for support)
Quote:
I have installed this but before enabling want to know if it is a Global program for every customer (I have over 3,800 website accounts) or if I can exclude some who may already have a preferred pricing structure?
The read me is pretty basic and admin only allows me to set up calendar segments, taxes, shipping and discount amounts.
Also, is there a way to let customers know a program is in place other than emailing them individually to announce (other than social media of course)
Thank you for your answers and recent update to the plug in.
This is a basic plugin, the discounts apply to every customer.
If you want to restrict it to certain customers only you would have to write the desired logic yourself.
To let ciustomers know about the program you could simply create a define page or EZ page to promote the loyalty program.
Re: Customer Loyalty Discount
Thank you for your reply. Sorry to have PM'd inappropriately.
Re: Customer Loyalty Discount
Noting that this discount is not compatible with One-Page Checkout, since it looks at the total-orders' history based on the current customer's id ... and OPC re-uses the same customer-id for all guests' checkouts!
I'll suggest the following insertion to the order-total's constructor:
Code:
public function __construct() {
$this->code = 'ot_loyalty_discount';
$this->title = MODULE_LOYALTY_DISCOUNT_TITLE;
$this->description = MODULE_LOYALTY_DISCOUNT_DESCRIPTION;
$this->enabled = (defined('MODULE_LOYALTY_DISCOUNT_STATUS') && MODULE_LOYALTY_DISCOUNT_STATUS == 'true');
$this->sort_order = defined('MODULE_LOYALTY_DISCOUNT_SORT_ORDER') ? MODULE_LOYALTY_DISCOUNT_SORT_ORDER : null;
if (null === $this->sort_order) return false;
if (function_exists('zen_in_guest_checkout') && zen_in_guest_checkout()) return false;
$this->include_shipping = MODULE_LOYALTY_DISCOUNT_INC_SHIPPING;
$this->include_tax = MODULE_LOYALTY_DISCOUNT_INC_TAX;
$this->calculate_tax = MODULE_LOYALTY_DISCOUNT_CALC_TAX;
...
I didn't include the entire constructor, since one of the variable names was getting ###'d. That will correct the issue on the storefront, but not if the order-total is used in conjunction with Edit Orders.
Re: Customer Loyalty Discount
Can anyone tell me which number relates to which order status, please? I want mine to be on 'shipped', which is 4th down my list of order statuses, should I set the order status to '4'? Hard to check as an admin if the mod is working on checkout...couldn't find a list anywhere that gave numbers to given order statuses. Any info appreciated!
Re: Customer Loyalty Discount
Quote:
Originally Posted by
Heresy Miniatures
Can anyone tell me which number relates to which order status, please? I want mine to be on 'shipped', which is 4th down my list of order statuses, should I set the order status to '4'? Hard to check as an admin if the mod is working on checkout...couldn't find a list anywhere that gave numbers to given order statuses. Any info appreciated!
The number (id) of an order status is individual for every store. It depends on which order stati you have defined in Localization > Orders Status
Click on an order status in the list in Localization > Orders Status and look at the URL in the browser address bar.
You will see something like orders_status.php?page=1&oID=2
oID is the id of the selected status
Re: Customer Loyalty Discount
Re: Customer Loyalty Discount
v2.0.0 is now available for use on zc157 and zc158: https://www.zen-cart.com/downloads.php?do=file&id=1917
- CHANGE: Refactoring for now-current styling; pre-define all class variables (PHP 7.4+ support).
- BUGFIX: Correcting PHP notices due to undefined variables.
- BUGFIX: Use the order's products, not the shopping-cart version, since this is an order-total!
- CHANGE: Validate the configuration settings and auto-disable if an issue is found.
- CHANGE: Disallow the discount for guest-purchases.
- CHANGE: Disallow the discount if a coupon has been used for the order.
- CHANGE: Update the customer 'messaging' on the order to indicate what elements of the order are discounted.
Re: Customer Loyalty Discount
v2.0.1 of the Loyalty Discount order-total is now available for download. This version corrects a MySQL Fatal error when an order is placed via the PayPal Express Payment's shortcut button.
Re: Customer Loyalty Discount
Do I understand correctly that there is no way to reset an order total after a customer has been given a discount? In other words, if the customer's all-time order amount added up to enough to get the discount, then their next order would also generate that discount? I have a very high percentage of repeat customers, but I don't want them getting the discount over and over. The way around that, obviously, is to set the time interval to a shorter period. But that would shut out the people who are repeat customers but might order only once a year or less.
Re: Customer Loyalty Discount
Quote:
Originally Posted by
HeleneWallis
Do I understand correctly that there is no way to reset an order total after a customer has been given a discount? In other words, if the customer's all-time order amount added up to enough to get the discount, then their next order would also generate that discount? I have a very high percentage of repeat customers, but I don't want them getting the discount over and over. The way around that, obviously, is to set the time interval to a shorter period. But that would shut out the people who are repeat customers but might order only once a year or less.
You understand correctly. The discount applies to the a customer's purchase history over the past month, quarter, year or all-time.