Reading list Switch to dark mode

    Akeneo Auto Category Assignment Rules

    Updated 3 November 2023

    Akeneo Auto Category Assignment Rules: This module simplifies the process of assigning categories to products.
    You can now use this module to build many rules with the conditions and categories you want.
    After you’ve created the rules, all you have to do now is hit the play button to start the work.
    Following project completion, the selected categories will be assigned to the products in accordance with the conditions set up.

    Check a brief overview of the plugin in the video mentioned-below:

    w4ple3pGV10

    Features

    • Assign products to multiple categories at once.
    • For category assignments, add multiple conditions.
    • For auto-assignment, the product must match all conditions or any condition.
    • When creating rules for category assignment, you can select local and channel.
    • This module supports text, text area, and number types of attributes.
    • This module allows you to do mass delete condition.
    • Admin can give ACL permission to different users for Akeneo Auto Category Assignment Rules.
    • For rule creation, actions such as empty, not empty, equal to, contains, and others are available.

    Basic Requirement

    • This module works with Akeneo 3.2, 4.0.x, 5.0.x, 6.0.x, and 7.0.x. Download Akeneo from here
    • This module is compatible with the Akeneo community and Enterprise (Flexibility) editions.
    • If you want to use this extension in Akeneo EE Serenity mode, please contact us.
    • For the Akeneo installation, your Akeneo server should meet these system requirements.

    Installation

    For the module, there are two different installation processes available.

    1. Composer Installation
    2. Manual Installation

    Installation using Composer Installation

    Read This Blog

    Before beginning the composer installation

    Searching for an experienced
    Akeneo Company ?
    Find out More

    1: Get the ACCESS KEYS [Create a support ticket]
    2: In Akeneo composer.json, add our repository as well as the installation script.

    For Akeneo 6.x and 7.x

    {
      "scripts": {
            "post-update-cmd": [
               "vendor/webkul/automaticcategoryassignmentbundle/src/Webkul/AutomaticCategoryAssignmentBundle/install/config.sh COMPOSER=true NO_DOCKER=true"
            ],
            "post-install-cmd": [
               "vendor/webkul/automaticcategoryassignmentbundle/src/Webkul/AutomaticCategoryAssignmentBundle/install/config.sh COMPOSER=true NO_DOCKER=true"
            ],
            "post-create-project-cmd": [
              "vendor/webkul/automaticcategoryassignmentbundle/src/Webkul/AutomaticCategoryAssignmentBundle/install/config.sh COMPOSER=true NO_DOCKER=true"
           ]
       },
      "repositories": [{
        "type": "composer",
        "url": "https://akeneorepo.webkul.com/"
      }]
    }
    

    For Akeneo <=5.x 

    {
      "scripts": {
            "post-update-cmd": [
               
    "vendor/webkul/automaticcategoryassignmentbundle/composer_install.sh"
            ],
            "post-install-cmd": [
               
    "vendor/webkul/automaticcategoryassignmentbundle/composer_install.sh"
            ],
            "post-create-project-cmd": [
             
    "vendor/webkul/automaticcategoryassignmentbundle/composer_install.sh"
           ]
       },
      "repositories": [{
        "type": "composer",
        "url": "https://akeneorepo.webkul.com/"
      }]
    }
    

    3: Use composer to install the extension.

              composer require webkul/automaticcategoryassignmentbundle

    4: Complete the authentication form.
    5: Send a Message of Success
    6: Delete your browser’s cache.

    Manual Installation for Version 6. x and 7.x

    •  After unzipping the appropriate extension zip, merge the “src” folder into the akeneo project.
    • From the PIM directory, run the following command over the NO-DOCKER Instance.
    ./src/Webkul/AutomaticCategoryAssignmentBundle/install/config.sh COMPOSER=false NO_DOCKER=true
    •  Run the command below over the PIM directory’s DOCKER instance.
    ./src/Webkul/AutomaticCategoryAssignmentBundle/install/config.sh COMPOSER=false NO_DOCKER=false

    Manual Installation for Version 4.0.x to 5.0.x

    Please follow these steps for installing the Akeneo Auto Category Assignment Rules module in your Akeneo PIM platform.

    1 – Unzip the respective extension zip then merge the “src” folder into the akeneo project root directory.

    src3

    2 – Goto config/Bundles.php then add the line:

    Webkul\AutomaticCategoryAssignmentBundle\AutomaticCategoryAssignmentBundle::class => ['all' => true],

    in the return array.

    3 – Copy the “config” folder into akeneo project root directory for routing.

    conf-file

    – Run this command after ssh to your akeneo server by the terminal

    php bin/console automatic_category_assignment:setup:install

    5. If you are using php-fpm. Then you need to restart the php-fpm services and apache web server.

    For Akeneo 5

    sudo service php-fpm7.4 restart

    For Akeneo 4

    sudo service php-fpm7.3 restart

    Docker Installation Command :

    For Akeneo 5

    alias docker_php='docker-compose run -u www-data --rm php php';
    alias docker_yarn='docker-compose run -u node --rm node yarn';
    docker_php bin/console cache:clear --env=prod;
    docker_php bin/console pim:installer:assets --symlink --clean --env=prod;
    docker_php bin/console d:s:u --force;
    docker_yarn run webpack;
    docker_yarn run update-extensions;
    docker_yarn run less;

    For Akeneo 4

    alias docker_php='docker-compose run -u www-data --rm php php';
    alias docker_yarn='docker-compose run -u node --rm node yarn';
    docker_php bin/console cache:clear --env=prod;
    docker_php bin/console pim:installer:assets --symlink --clean --env=prod;
    docker_php bin/console d:s:u --force;
    docker_yarn run webpack;
    docker_yarn run less;

    Manual Installation of Module For Version 3.x

    Please follow these steps for installing the Akeneo Auto Category Assignment Rules module in your Akeneo PIM platform.

    1 – Unzip the respective extension zip then merge the “src” folder into akeneo project root directory.

    2 – Goto app/AppKernel.php then add a line.

    new Webkul\AutomaticCategoryAssignmentBundle\AutomaticCategoryAssignmentBundle(),

    3 – Goto app/config/routing.yml then add these lines at top of the file.

    AutomaticCategoryAssignment:
        resource: "@AutomaticCategoryAssignmentBundle/Resources/config/routing.yml"
        prefix: /

    4 – Run this command after ssh to your akeneo server by the terminal

    php bin/console automatic_category_assignment:setup:install

    5. If you are using php-fpm. Then you need to restart the php-fpm services and apache web server.

    sudo service php-fpm7.2 restart

    Common Issues After Installation

    Webpack error

    It might happen that even after proper installation, upon opening your Akeneo admin dashboard, you see a loading screen. In that case, do check for the following solution:

    • Webpack Installation: If you get the below error  It means that web pack is not installed in your system. Run the following commandnpm install –save-prod webpack npm install
    • Module routing.yml is not configured properly. Re-check the routing.yml file as mentioned in the 3rd step of Module Installation
    • Clear your browser cache.

    Uninstall Module: For Akeneo 6 and 7

    • From the PIM directory, run the command below over the NO-DOCKER Instance.
    ./src/Webkul/AutomaticCategoryAssignmentBundle/uninstall/uninstall.sh COMPOSER=false NO_DOCKER=true
    • Run the command below over the PIM directory’s DOCKER instance.
    ./src/Webkul/AutomaticCategoryAssignmentBundle/uninstall/uninstall.sh COMPOSER=false NO_DOCKER=false

    ACL Permission

    Admin can give ACL permission to different users for the Akeneo Auto Category Assignment, create, delete, edit, executive rules according to the requirement.

    Role-role-Edit

    Workflow – Auto Category Assignment Rules

    Go to the Akeneo Dashboard when you’ve finished installing the module. On the left side of the screen, there is an icon for Webkul Auto Category Assignment Rules.

    Dashboard

    The user can easily define a new condition for category assignment under the Auto Category Assignment Rules tab.

    Aside from that, the user can see the rules that have previously been created. Aside from that, the user can edit or delete the conditions.

    Create a New Condition

    There are two options for documentation and conditions after you click the tab assignment.

    After that, go to Conditions>>Create to make new conditions.

    Automatic-Category-Assignment

    Properties:

    Following that, the user will enter the code for the condition by clicking the create rules button.

    Products must match – If the user wants to match any of the conditions from the produced condition, they must select any condition.

    If they want to match all conditions, they must select all conditions.

    Channel and Locale – Then you must choose the channel and locale where the user wants to run the condition.

    Remove existing categories:When you enable this option, it will remove the categories and replace them with new ones.

    Automatic-Category-Assignment-2

    Then click the “Add” button. The user will then select an attribute as the basis for the rule’s condition.

    Automatic-Category-Assignment-3

    The user will now choose the rule condition to apply to the attribute after selecting the attribute.

    Automatic-Category-Assignment-7

    After that, you must add the value to the attribute, such as name in the condition attribute, add the value that will match the condition and find the product, and then category will be assigned to the product.

    Automatic-Category-Assignment-4

    Categories Selection:

    After you’ve added all of the condition properties, you’ll need to choose the category to which this rule will be assigned. To do so, go to Categories Selection and then Edit.

    Automatic-Category-Assignment-5

    After you’ve selected all of the categories, click the Confirm button.

    Automatic-Category-Assignment-5

    Execute Rule

    Finally, the user will save the condition and be able to view it under the condition.

    Automatic-Category-Assignment-1

    After that, the user will run the condition and must confirm before proceeding.

    Automatic-Category-Assignment-9

    The user will see a success message for the rule when it has been executed.

    If you want to remove multiple delete conditions, you can select them all and perform a mass delete action

    Automatic-Category-Assignment-6

    Applied Condition: Product

    The user can now look at the product’s condition. All of the selected categories have been assigned the product name sunglasses.

    Product-Sunglasses-Edit

    If you want to get more information on the execution process, go to Dasboard>>. Process Tracker.

    Process-tracker-Show-job-4

    You can check the notifications.

    Process-tracker-Show-job-6

    Then, by clicking on the job, you can look through the details.

    Support

    So, that was much about the User Guide of Akeneo Auto Category Assignment Rules for any queries or doubts reach out to us at [email protected]. You can also raise a ticket at our HelpDesk System.

    Please explore our Akeneo Development Services and Quality Akeneo Extensions.

    Current Product Version - Akeneo 3 to 5 || 2.0.0 and Akeneo 6 || 3.0.0 and Akeneo 7|| 3.1.0

    Supported Framework Version - 3.2.x 4.x.x 5.x.x, 6.x.x and 7.x.x

    Blog Version - 3.2.x 4.x.x 5.x.x, 6.x.x and 7.x.x
    • Version 3.2.x 4.x.x 5.x.x
    • Version 3.2.x 4.x.x 5.x.x, 6.x.x and 7.x.x
    • Version 3.2.x 4.x.x 5.x.x and 6.x.x
    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content