NextGen-WooCommerce and WPress Category Controller (WooCommerce)

NextGen-WooCommerce and WPress Category Controller (WooCommerce)



NextGen – WooCommerce and WordPress Category Controller is a wordpress plugin for controlling
WooCommerce and WordPress Categories.

Category Rules are used to define rules for hiding or showing of woocommerce categories based on the selected logical rule. Below are the category rule feature.

Important Features:

  • Hide or Show WooCommerce categories from any Page.
  • Excludes the products from hidden categories.
  • Excludes the products from search.
  • Activate or deactivate category rule.


.

Simple User Cases:

  • WooCommerce Categories by User Id.
  • WooCommerce Categories by Request URL.
  • WooCommerce Categories by Date, Time, Month and Day of the week.
  • WooCommerce Categories for Tablet device.
  • WooCommerce Categories for Mobile phone.

Complex Use Cases :

Define complex rule using logical “and” “or” and “brackets”

  • WooCommerce Categories by User Role and Date and Time
  • WooCommerce Categories by User Role and Geo location
  • WooCommerce Categories by User Role, Geo location and Date and Time
  • WooCommerce Categories by User Role, Geo location, Device and Date and Time
  • WooCommerce Categories by User Role, Geo location, Device or Request URL and Date and Time and More …

 


Complex rule:

Using RulesEngine Platform we can define simple and complex rule, below is an example of using complex rule.

  • RulesEngine platform is very flexible for defining very complex logical rules using “AND” “OR” and “Brackets” operators.
    (e.g: Role is Administrator and Country is USA and Month is January, Page is Home etc, see below sreenshots.)

    See Logical rule section for more info.



Use above defined rule (screenshot) in Category Rule for controlling the categories

RulesEngine platform also provides an utility method through which we can get the evaluated logical rule value in a single statement.

RulesEngine::is_rule_valid(“Logical Rule Name”);

if(RulesEngine::is_rule_valid("USA and Asia Rule")) {
    echo "Condition satisfied";
}
where "USA and Asia Rule" is the name of the Logical Rule.

RulesEngine makes code very easy to maintain. we can add or update values in rule condition without modifying code.

Below is the code representation of above complex logical Rule. This code is hard to maintain and
we need a developer to update the below logic.


if(($month === "January" || $month === "December") &&
    ($country === "United States" || $continent === "Asia") &&
    ($user_profile === $login_status || $user_role !== "Administrator") &&
    ($page_title === "home")) {

    echo "Condition satisfied";
}

“It’s the beauty of rules engine by which we can define more and more complex rule without coding.”

General Features

  • Define a dynamic hook using Rules Engine platform which will be called by plugin once the rule is satisfied.
  • Access the status of the Logical Rule using the utility method from your code.
    RulesEngine::is_rule_valid("Rule Name");
  • User Friendly easy-to-use Ajax interface.
  • Reduces development effort and easy to maintain
  • Activate or Deactivate Parent Rule (Logical Rule) and Child rules (Page, Post, Theme Rules etc).
    If Parent Rule is deactivated all the corresponding child rules will become inactive.
  • Translation ready (Localization support)
  • Easy to upgrade.