How to create or edit mass actions?
Rate this item

LOOKING FOR NEW WEBSITE TEMPLATES FOR NEXT PROJECTS?

Check out 65+ FREE Joomla! templates See 60+ FREE WordPress themes

Mass actions will allow you to process almost everything in Hikashop, for example you can edit multiple products as well as categories, orders, addresses or Hikashop users, avoiding long hours of repetitive work doing it element by element. You can also move products from one category to another or change the order status for every orders of a specific customer. In addtion, it allows you to create tasks executed periodically or on a specific triggers like at the order creation or when a product is deleted, etc.

Reach Mass Actions

The first thing you need to do is to go to “Components -> HikaShop -> Configuration“.

Reach Mass Actions

Then go to “System“, and click on “Mass actions“.

Reach Mass Actions

You will see “Mass action” screen. Ex: Here, no Mass actions have been configured, the listing is empty.

Reach Mass Actions

Here you can see configuration screen.

configuration screen

Toolbar

Toolbar

  • Process : This button will execute the actions you defined in this view after filtering the elements as your configured.
  • Save & Close : Click this button to save the mass action and return to the Management screen.
  • Save & New : Click this button if you want to save the current mass action and create a new one, redirecting you to an empty form.
  • Save : Apply the modifications to the mass action and stay on the same screen.
  • Cancel : Return to the previous screen without saving the modifications.
  • Help : This button enables you to turn ON/OFF the help section.

Set the main informations

Set the main informations

  • Name : Define the name of your mass action.
  • Description : Enter a short description of your mass action.
  • Published : Publish or not the mass action. If a mass action is not published, it will not be processed on the selected trigger.

Additional Information

Additional Information

  • Data : Choose the type of data you want to work on. Each data has specific triggers, filters and actions available, enabling you to do different combinations.
  • Triggers : Allows you to specify when the mass action should be processed. You can either use it to execute your mass action on a regular frequency (for example you can import a csv with your products every day,…), or execute the defined action on a given trigger like after a product is created. This way, you will be able to define for example a weight for a newly created product if you didn’t specified any, avoiding shipping method errors. If you use a time trigger or click on the process button, the system will use all the data available but if you choose a trigger like “after a product is create”, the mass action will run only on the data of the trigger, so only on that product in that case.
  • Filters : Add filters to your mass action.
  • Actions : It define what kind of action will be processed on the selected and filtered data. Here, you can choose to modify the data, export it as a csv, and even display the results on the current page. This option will display the selected information and give you the possibility to dynamically change the displayed values.

Detailed options

  •  Filters

    • Generic

      • Columns : Allow you to filter on any column of the selected table. This take the values in the database directly.
      • Limit : Use this option to have only a defined number of results. It is useful when you want to export data or display them.
    • Product

      • Product type : Allow you to filter only the main products or the variants.
      • CSV product : You can give a csv file as filter, the mass actions will take the content of the file, and filter on the given products.
      • Characteristics : This option is to filter on the characteristics, it display only the available characteristics.
      • Access level : The access level filter restrict the results of the search to the defined access level.
    • Category

      • Category type : This option allow to filter only the selected category type, for example only the product categories.
      • Access level : The access level filter restrict the results of the search to the defined access level.
    • Order

      • Order status : Restrict the results to the selected order status.
      • User with ACL : To get the orders where the users have the group defined.
    • User

      • Don’t have : Return the users which don’t have the value set.
      • User with ACL : To get the users with the group defined.
    • Address

      • User with ACL : To get the addresses where the users have the group defined.
  • Actions

    • Generic

      • Display the results : Display the elements previously filtered in a dynamic table, when this table is displayed a simple click on a row allow you to change the value of the selected element.
      • Export a CSV file : You can export the elements in a CSV or XLS file. You can define or not a path for this file. When a path is set, the file will automatically be saved in the specified folder. If you let the path empty, it will display the browser download bos to let you select an action, display, or save.
      • Update the values : Allow you to change a value on all the elements returned, this option is irreversible.
      • Delete the elements : You can delete the filtered elements, as the previous optionit is irreversible.
    • Product

      • Update the categories : This will update the categories of the product, two choices are present, add to only add new categories to the product or replace, to remove the previously set categories and add the selected one. To remove all the categories, you can let the field empty and use the option “replace”.
      • Update the product relateds : As the categories, you can add or replace one or many related product(s) to the filtered products.
      • Update the product options : This option will do the same thing as the previous one, but it is applying on the options.
    • Category

    • Order

      • Change status : You can change your order status by selecting a new one, it will change it to the triggered and/or filtered one.
      • Add an existing product : You can select one or many products to add.
    • User

      • Change the user group : Select the user group to set to the selected user(s). You can add a group or replace the current group(s) to the selected one.
    • Address

Tutorials

Here are two short tutorials giving you an example of what can be achieved with this function.

Create a massaction

to use the mass actions, click on the menu “System” then “Mass actions“.

Create a massaction

It will bring you to in the mass action page, you click on the “New” button in the toolbar to create a new Mass action.

massaction

In the Mass action form, you can enter the main information relative to the mass action you’re creating.
Youshould set meaningful information to find back a mass action in the future with ease.

You can publish or not the mass action. It’s useful when you are using one or many triggers in the mass action.

The triggers are called generally before or after an action. For example, when you create a product, it calls the two triggers “onBeforeProductCreate”, which is called before the save of the created product, and “onAfterProductCreate”, which is called after the save.

massaction

A mass action can be applied to one data type. You have to select the desired data on which you want to apply a mass action.

If you want to create a mass action on another data type and you have some Php skills, you can code your own mass action plugin by following our developer documentation on that.

When the data is selected, you can choose one or many triggers, filters, actions. To add one of these elements, you just click on the corresponding “Add a …” dropdown and to remove one of them click on the remove icon.

First example: change the category of a product

How to move all the out of stock products into the category “Out of stock”?

To do that, you can configure your mass action as this screen shot:

change the category of a product

With this configuration, the mass action will be called when a product is updated and every day.

This mass action will modify the categories of the product being updated when called on the “After a product is updated” trigger, and will affect all the products when called by the “Every days” trigger. The first trigger passes an element to the mass action, processing only this element. At the opposite, the second trigger, since it’s not applied on a specific element, will be based on all the elements.

The action will be executed on elements, but the elements must correspond to the filters. If the product(s) are in stock and/or are variants, the action will not be executed on them.

If we have at least one product which is out of stock, the action “Update the categories” will be executed on it/them. There is a dropdown on the left of the action, it allow you to select “Add” or “Replace“.

Here we selected “Replace” to change the category. To add a category beside the current categories of the product, choose the “Add” option.

Save the mass action. If you click on “Process” it will execute the mass action on all the elements corresponding to the filter but only at that moment.

Second example: Display all the product categories

Select the data “Category” and configure it as this screen shot:

Display all the product categories

To display the products categories, you have to use the filter “Category type” and select “Product category“.

Next, just select “Display the results”,  you will see the elements to display. By default, nothing is selected and you can check all the columns by clicking on “Select all“.

To display the results, click on the “Process” button and the process will execute the selected action(s), save the current mass action.

Here is the display of a “Display the results” action:

Display all the product categories

When you click on a cell, it becomes editable. Just edit the value and save.

The display of the row edition change depending on the type, you can find textarea, dropdown, datepickers…

If you have any question about this post, don’t hesitate to leave a comment below. And don’t forget to share with your friends if you find it useful! Thanks!

Join Joomla & WordPress template club to access all themes and SAVE 95% cost than single PRO template purchase!

Join Joomla! Club (50% OFF on today) Join Joomla! Club (50% OFF on today)

Leave a Reply

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

[Flash Sale!] 20% OFF for PRO order, 50% OFF for Membership! Limited time, hurry up! Save money for your order on today!
[xMas is coming!] Enjoy your purchase extra discount up to 50% OFF for all products! Coupon code: XMAS50