Change Customer Groups | Prestashop | CodeEshop

CodeEshop
10 min readDec 13, 2023

--

Change Customer Groups: Powerful Features for Streamlined Management

Boost your PrestaShop store with automated customer group assignments and effortless switching:

Effortless Assignment & Switching:

  • Define rules based on order criteria (total spent, products purchased, etc.)
  • Automatically assign customers to the right group upon order completion.
  • Switch customers between groups seamlessly based on rule updates.

Dynamic Group Reversal:

  • Schedule automatic group reversion on rule expiration manually or after a set timeframe using cron, when conditions are met, saving you time and effort.
  • Ensure customers regain their original group once conditions are no longer met.

Enhanced Communication:

  • Notify customers and admins via email about group changes.
  • Maintain transparency and build trust with your customers.

Complete History Tracking:

  • Track all customer group changes for complete auditability.
  • Access a detailed history within the admin panel.

Customer Awareness:

  • Customers group history can be seen on Customer backoffice page, fostering understanding.

Comprehensive Debugging:

  • View detailed logs for any module issues, making troubleshooting easy.

Change Customer Groups: Your key to effortless, dynamic, and transparent customer group management.

Demo Login Details

Backoffice URL: https://psdemo.codeeshop.com/
User: demo@demo.com
Pass: demodemo@123

Features

  • Effortless Assignment & Switching
  • Dynamic Group Reversal
  • Enhanced Communication
  • Complete History Tracking
  • Customer Awareness
  • Comprehensive Debugging
  • Time-saver
  • Rewarding to customers in terms of user groups.
  • Multi-language

Youtube Demo

Installation

You can start the installation of “Change Customer Groups” Module.

  1. Go to Back Office > Module Catalog
  2. Click Upload the module and then upload the zip file
  3. Search “Change Customer Groups” in module search box then go to module and click on install.

Configuration

Once the module has been installed successfully, admin need to configure the module

Live Mode: Choose Enabled, to use this module in live mode.
Admin Mails: Choose Enabled, to send email to admin after changing group (whenever rule conditions are met after changing order status to payment accepted or rule is run manually by admin from backoffice).
Customer Mails: Choose Enabled, to send email to customer after changing group (whenever rule conditions are met after changing order status to payment accepted or rule is run manually by admin from backoffice).
Admin Mails (Group Reversed): Choose Enabled, to send email to admin after group is reversed (whenever rule conditions are met after rule is run manually by admin from backoffice or by cronjobs).
Customer Mails (Group Reversed): Choose Enabled, to send email to customer after group is reversed.
Use Logs: Choose Enabled, to log message in Prestashop Logger (Logs the errors or infos related to the addon features).

Back Office Setting

Once the module configuration is done you can add Rules and see history ( from column left side menu )

Rules

Listing: Display listing of all the rules created by admin. You can perform multiple actions.

View: To display Rule Information.
Duplicate: To duplicate the rule created before and modify it with new changes ( helpful for quick setup of nearly same rule ).
Run: To manually run the rule for the starting and ending date for all the orders applied in that rule ( helpful to change more than 1 order at the same time ).
Delete: Delete the rule no longer needed.

Active: Enables the rule. Only enabled rules have their conditions checked.

Rule Name: A descriptive name for the rule, used for identification within the back office.

Source Groups: These groups define the customer groups against which the rule’s conditions are evaluated. Only customers belonging to one or more of these selected groups will be checked for rule compliance.

Target Group: Customers in the selected group will be assigned to the chosen new group.

Assign/Switch Type: Choose whether to assign or switch the customer’s existing group to the selected target group.
Assign: Adds the Target Group to the customer’s existing groups, retaining their prior customer groups.
Switch: Removes all of the customer’s existing groups and assigns them exclusively to the Target Group.

Reverse Changed Group
Choose from the following options:
Don’t reverse: Maintains the customer’s group assignment as defined by the rule, without any reversal.
At Rule End: Reverts the customer’s groups to their original assignments automatically when the rule’s Start Range is expired.
Example: A customer placed in a “New Customer” group for a limited time is automatically moved back to their previous group when the rule’s start range is expired.
After no of days assigned: Reverts the customer’s groups to their original assignments after a specified number of days, determined by the “Group Days Reverse After (Access)” field.
Example: A customer assigned to a “VIP” group for 30 days is automatically shifted back to their original group after the 30-day period concludes.

Group Days Reverse After (Access): this field determine after how many days the groups will be revered (dependent on Reverse Changed Group — After no of days assigned)

Rule Start Range: Choose the start and end dates to control when the rule
applies. If you leave these dates empty, the rule will always be active.

Basic Rules: Turn this on to set more specific conditions for the rule:

Order Date Range: The rule applies only to orders placed within these dates. If you leave them empty, it applies to orders from any date.

Order Threshold Limit: The rule applies only to orders with amounts within this range. If you leave the limits empty, it applies to orders of any amount.

Total Spend Date Range: The rule considers all the orders a customer has made within these dates. If you leave them empty, it considers orders from any date.

Total Spend Threshold Limit: The rule applies only if the customer’s total spending across all orders (within the Total Spend Date Range) falls within this limit. If you leave the limits empty, it applies regardless of total spending.

Age Allow Blank Value: Customer Age (calculated from birthday) as the birthday is not a required field in prestashop you can select if the customer have not added their date than whether to check tose customers or not

Age Threshold Limit: Customer that are under certain age limit will be allowed
e,g — you want to apply rule only for all 18+ customers than add the lower limit value 18 and leave Upper limit value empty but if you want it for customer range 18–40 than add lower limit value 18 and upper limit value 40

Customer Firstname: Enter the initials of customer firstname which will be checked in customer lastname
e.g you want customers whose firstname starts with `Jo` than all customers with Jo in the start of their name firstname will be allowed only

Customer Lastname: Enter the initials of customer lastname which will be checked in customer lastname
e.g you want customers whose lastname starts with `Do` than all customers with Do in the start of their lastname will be allowed only

Customer Status: Customer status only active customers are allowed in the rule

Gender Type: Only certain customer gender type is allowed
e.g — you are targetting female fashion customers that are females so you can make a different group for females

Partner Offers: Customers who have accepted partner offers at the time of registeration

Advanced Rules: Enable this option to apply more specific product-based criteria to the rule.

Products Allowed: Control which products trigger the rule’s application:
All: The rule applies regardless of the products in the order.
Apply rule on purchase of any of the selected: The rule applies if the order includes at least one of the specified products.
Apply rule on purchase of all of the grouped: The rule applies only if the order contains all of the selected products.

Products Restricted: Define product exceptions that prevent the rule’s application:
Not Used: The rule applies without product restrictions.
Remove rule on purchase of any of the selected: If the order includes any of the specified products, the rule is not applied.
Apply rule on purchase of all of the grouped: The rule is not applied unless the order contains all of the grouped products.

Suppliers Allowed: Control which suppliers products trigger the rule’s application:
All: The rule applies regardless of the suppliers products in the order.
Apply rule on purchase of any of the selected: The rule applies if the order includes at least one of the specified suppliers products.
Apply rule on purchase of all of the grouped: The rule applies only if the order contains all of the selected suppliers products.

Suppliers Restricted: Define product exceptions that prevent the rule’s application:
Not Used: The rule applies without product restrictions.
Remove rule on purchase of any of the selected: If the order includes any of the specified suppliers products, the rule is not applied.
Apply rule on purchase of all of the grouped: The rule is not applied unless the order contains all of the grouped suppliers products.

Manufacturers Allowed: Control which manufacturers products trigger the rule’s application:
All: The rule applies regardless of the manufacturers products in the order.
Apply rule on purchase of any of the selected: The rule applies if the order includes at least one of the specified manufacturers products.
Apply rule on purchase of all of the grouped: The rule applies only if the order contains all of the selected manufacturers products.

Manufacturers Restricted: Define product exceptions that prevent the rule’s application:
Not Used: The rule applies without product restrictions.
Remove rule on purchase of any of the selected: If the order includes any of the specified manufacturers products, the rule is not applied.
Apply rule on purchase of all of the grouped: The rule is not applied unless the order contains all of the grouped manufacturers products.

Categories Allowed: Control which categories products trigger the rule’s application:
All: The rule applies regardless of the categories products in the order.
Apply rule on purchase of any of the selected: The rule applies if the order includes at least one of the specified categories products.
Apply rule on purchase of all of the grouped: The rule applies only if the order contains all of the selected categories products.

Rules Actions

Available Rule Actions:

View: Examine the rule’s complete details.
Duplicate: Create an identical copy of the rule.
Run: Immediately execute the rule, adjusting customer groups accordingly for those who meet the specified criteria.
Delete: Permanently remove a rule that is no longer needed.

Rule run

Using Rule run manually will check the rule condtions across all the customers orders which meet the condtions of the rule and changes the customer groups based on condtion met.

Customer History

Listing: Display listing of all the history generated by running the rule. You can perform multiple actions.

View: To display Customer History of changed groups and rule Information.
Reverse: To reverse the changed groups to old groups.
Delete: Delete the history of user no longer needed.

Managing Customer Group Change Histories:

History: Access a comprehensive customers record of customer group changes, whether initiated manually or triggered by order status updates to “Payment Accepted.”

Available Actions:

View: Examine the detailed history of group changes for a specific customer.
Reverse: Revert a customer’s group back to the one indicated in the “Old Group” section.
Delete: Remove a history entry without modifying the customer’s current group.

Customer History in Customer Page

View customer history corresponding to individual customer under Customers.

Automatic Rule Apply on Order Status Update

When an order becomes paid/payment accepted (e.g., completed), the system checks all applicable rules based on their position. The rule with the lowest position (checked in ascending order from lowest to highest) that meets all the order conditions will be applied first.

Cron

This link will automatically revert assigned user groups to their original groups after the designated time period is completed in the rule.

Click the button displayed in the image below to run manually or setup `cron` in your server with below url to everyday for automating the process of reversing the group everyday without the hassle of running the url everyday manually.

Logs

Listing: Display listing of all the logs generated by running the rule. Makes the debugging of module easier.

Support

For any kind of technical assistance, just mail us at sales@codeeshop.com

You can check our website for Prestashop Modules CodeEshop

--

--

CodeEshop

CodeEshop is Add-on for your need and helps enterprises to grow easily with a large range of ready to use and highly customisable eCommerce products.