There are many reasons you might want to create conditions in zeckoshop, the main reason being that you want to make the site function based on certain conditions. You can use this to either limit access, or give access to certain site funtions. This article is focused on creating Conditions and focused on creating conditions to give permissions into certain admin section.

We are going to use this Scenario: Creating a condition to allow an admin User to access the user manager section and lock it for others.

zeckoShop can allow permission for the admin sections based on  certain conditions. So to achieve the scenario above we will need to create conditions that we will set in the permissions(currently you can create conditions but do not have access to the Permission screen. This will be available later in higher zeckoShop versions. To set the permissions, you can create the conditions and then request we set the permissions for you. What is needed is the name of the conditions that is set and where you want it applied.).  

To Create Conditions

  1. To create conditions go to the zeckoShop administrations panel and then search for Condtions or go to Systems->Conditions (see image below).
    once that is done you will be taken to the screen where you can create the condition. 
    • On the new screen select the new button at the bottom of the page

  2. Then you will be taken to the screen where you can create the conditions and set the rules. You will not be able to set the rules until you have created the condition by saving the condition created. You will need to fill 3 entries which are the Name of the Condition, the group of the condition (this is used mostly to organise the conditions. If you want to create different groups based on the type of condition that will be under the group. For this you can leave as general or name it admin permissions),  and the Rule Matcher.

    • Name: Set this to reflect the kind of condition or what the condition will do, based on the scenario in this article we will set the name  "Access user manager" as an example.

    • Group:Will be set to reflect the group under which the condition will belong for example "Admin permissions".

    • Rule Matcher: There are two options set for the Rule matcher and it is either "All" or "Any". because you can create many rules in a condition you have the option to either allow the condition to work if all the rules in the condition are matched (usually used to match a specific scenario) or if any of the rule is true you want the condition to be applicable (usually used to match a variety of rules).

  3. Once you click save then you will be able to set the rules. On the same screen you will see Rules and Associations. Association is used if you want to link a condition with another condition. The most important one you will need to set is now the rules. Click on the Link Rules that is on the condition page.
    • Once you click rules you will be take to the screen where you can create new Rules. Click on the New Button at the bottom of the page to create new rules. You will have the option to selet the Rule Type, there are a variety of rule types which can be handy. for the scenario in the article we will set the rule type to user. see image below
    • Select the User and you will be able to choose an operator which is either equal to or not equal to (the options here varies based on the Rule type).

    • The next will be to set the Value and you can search for users and set them in the value (You can search by username (if login to the site is by username) or user email (if your site allows login based on email)). You can only set one value per rules. So of you want to set the rule for two users you will need to setup two rules, one for each user.

    • Once the rules are set then You are ready to set that condition in any of the Permissions to the admin section. If you would like to have a different set of user access another section of the admin, you might need to set up another condition and use that for the permission into the admin section.

The Condition Section is done The next is to set the Permissions with the created conditions. This section is only available to Terracor to complete until the zeckoShop version that allows client to manage the permissions is available. Once available then you will be able to complete this section.

To set the Permission

  1. Once the condition is set the next is to go. to Admins-> Users/Customers->permission or simply search for Permission in the Admin screen.
  2. Then for each of the available permissions, Click on the eye icon at the right hand side which will allow you edit the permission.
  3. Under the condition Field, select the created condition that match the permission you are trying to give for the admin section.
  4. Click save and that is it.