1. Home
  2. Docs
  3. Roles & Rules B2B
  4. Usage
  5. Testing

Testing

Testing of rules

  1. Make a Role (make sure if you call it: Wholesaler Role, the slug is wholesaler_role (lowercase and underscore))
  2. In General (tab) – use the Add rule for (select your Wholesaler Role) use the pluss (button)
    1. Find the Wholesaler role and check the active checkbox + Save rule (button) ( The role will now have a green icon – indicating it is active)
    2. Go to categories (tab) – find the Wholesaler role + find a category (for testing), check it and Add categories (button)
    3. Check the Sale checkbox, select reduce by % – set a value i.e 20
    4. Save changes
    5. Now you have a rule for this role – so now you can test
  3. You need to have a test user that you add to this role (users – add a user to this Wholesaler role)
    1. Open your shop in a private browser (window)
    2. Login (using your test user)
    3. Find the category you added i.e 20% discount on – check if your products is On Sale and have 20% discounts

To test roles and prices we recommend you copy/paste the frontend URL in a new private browser window. Now you see your shop as a guest. If you have activated the Guest user in Roles & Rules you see discounts created for guest users, if not active then you get only your regular prices and current sales prices. PS sales prices will be overwritten if Guest user role is activated in Roles & Rules (only sales set up here that will show).

It is smart to have a test user that you can add to a role, if you have one – login for the test user an see you prices and dynamic labes.

Was this article helpful to you? Yes No

How can we help?