Okay
  Public Ticket #4384208
Group Rules
Open

Comments

  • Charlotte started the conversation

    I am setting up group rules and I need to move the customers between groups quarterly not monthly or annually is there a way that I can do this easily? 

  •  2,496
    WebWizards replied

    Hi Charlotte,

    Unfortunately, the group rules system only supports monthly and annual intervals by default. However, this can be achieved through a custom PHP code snippet rather than using the built-in group rules system.

    If you'd like to implement this quarterly group movement, I'd be happy to provide you with a sample code snippet that would handle this functionality.

    Could you share more details on the specific rules functionality you need, e.g. what conditions and thresholds should move users or move them back?

    Kind regards,
    Stefan

  • Charlotte replied

    Thanks, Stefan, that would be great. Basically, when the basic tier hits £3750 in sales, they advance to the premium tier, and if they don't hit £ 3750 in the premium tier, they fall back to the basic tier. That is it, I have managed to set everything else up correctly.  

    Kind regards

    Charlotte

  •  2,496
    WebWizards replied

    Hi Charlotte,

    Thanks for the details,

    You can find the code snippet here: https://pastecode.io/s/sru42dkh

    To use this snippet, you'll need to:
    1. Replace the group IDs (123 and 234) with your actual basic and premium group IDs
    2. You can find your group IDs by going to B2BKing -> Groups and editing each group - the ID will be in the URL as ?post=123

    You can add this code to your theme's functions.php file or using any code snippets plugin.

    Let me know if I can help!

    Kind regards,
    Stefan