Filtered Mass Action Showing All Products

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 1 week ago #359973

-- url of the page with the problem -- : Not available online yet.
-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2.16
-- Browser(s) name and version -- : Firefox 124.0.1
-- Error-message(debug-mod must be tuned on) -- : none

I'm trying to construct a Mass Action to display only the products with a particular variant. Using the suggested method I start with the skeleton of the procedure.

Data > Product
Filters > Characteristics
Then from the dropdown menu I select: Alcantara Fabric and Stitching Combinations and LIKE Black Alcantara fabric with tri-color stitching
The system reports 60 results

Next at Actions, I select Display the results.
Boxes Checked: product_id, product_name

When I go to the Products page and run the Mass Action, I get a display of all 86 products in the website, not the filtered 60 items that I expected.

If I change the Actions to Export a csv file a spreadsheet is downloaded. That spreadsheet shows all 86 products in the website, not the filtered 60 that I expected.

The number of results shown equals the number of Products checked. If I run the Mass Action on ten products, those ten products are shown.

As an added twist, if I set the Actions to both Display the results and Export a csv file in any order, only the spreadsheet is created and downloaded. The results are never displayed in the website Administrator.

What should I try next?


Charles

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 1 week ago #359976

Hi,

From what I understand, you're using the "actions as a button" option of the mass action to add a button to your products listing.
As the name of this option implies, when you use this button, it will run the actions of the mass action on the selected products. Filters and triggers will be ignored.
It's like when you click the "process" button of the mass action and the triggers of the mass action are ignored.

So this result is normal.

Similarly, it's normal that when you have both a CSV export and a display action, only the CSV export is done.
A CSV export action run manually implies the download of the generated file to the browser of the current user.
And in HTTP, the browser makes a request to the server and then waits for the response from the server.
If the server sends HTML in the response, then the browser displays it.
If the server sends a download, then the browser runs the download interface.
It's not possible to return both HTML and a download in a HTTP response.
So you get this because of the limitations of HTTP and we can't do anything about it.
Similarly, you can't have several CSV export actions in the same mass action as HTTP only accepts 1 download per HTTP response.

So this result is normal too.

Last edit: 8 months 1 week ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 1 week ago #359984

With this in mind I offer these suggestions:

A. The /images/stories/documentation/massaction/massactions_12.png image at the Action button example section of the documentation page should be cropped. It shows that the Actions as a Button has been set to Yes but also shows some otherwise valid settings for the filters. Remove the implication that any triggers and filters shown will be active.

B. Add some text to the documentation page to alert the user to this condition. Example:

"Warning Setting Actions as a Button to Yes will cause any trigger and filter settings to be ignored. Use the Process button in the menu above to activate this Mass Action."

C. In the Mass Action page of the website Administrator, the fieldsets with classes of adminform containing the divisions with ids of allproducttriggers and allproductfilters should be greyed out when the Actions as a Button is set to Yes.

D. Better yet, those divisions should be temporarily removed and replaced with a note such as, "Triggers and filters are disabled when the Actions as a Button is set to Yes."


Charles

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 1 week ago #359991

Hi,

Thanks for your feedback.

A. That's a good idea. We'll do so.

B. Yes, I've added a warning there in order to clarify.

C.and D. No. The filters will still be processed when the user clicks on the "process" button. And if the mass action is published, the triggers will still be taken into account to trigger the mass action and the filters and the actions. So greying them out don't reflect that.
It's only when the action button is used that the triggers/filters are ignored.

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 1 week ago #360001

nicolas wrote: C.and D. No. The filters will still be processed when the user clicks on the "process" button. And if the mass action is published, the triggers will still be taken into account to trigger the mass action and the filters and the actions. So greying them out don't reflect that.
It's only when the action button is used that the triggers/filters are ignored.

Yes, that's why I wrote temporarily removed.


Charles
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.049 seconds
Powered by Kunena Forum