Display price_value Using a Mass Action Routine

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 4 weeks ago #359472

-- 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.14
-- Browser(s) name and version -- : Firefox 123.0
-- Error-message(debug-mod must be tuned on) -- : none

I'm working on a HikaShop installation with 86 products that have among them hundreds of variants of four characteristics. Using a Mass Action, I'd like to display the price_value of each so that I can see which variant prices are wrong and which are missing.

When I examine the #_hikashop_price database table in PHPMyAdmin, there are 108 lines so far with non-zero values in the price_value column. As you can see from the attached spreadsheet, none of those are shown in the Mass Action output. I would expect to see those values but all cells are empty.

Is it possible to list the price_value for each product/variant with a Mass Action routine?

File Attachment:

File Name: variant_pr...port.csv
File Size:6 KB


Charles
Attachments:

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 4 weeks ago #359476

Hi,

If the products filtered by your mass action have prices in the database, they will appear in the CSV.
The fact that the rows of your CSV don't have anything in the price_value column just means that the products / variants listed in that CSV don't have a price linked to them in the database. Note that the hikashop_price table contains the prices of both products and variants.

The fact that there are only 86 rows in your CSV, and not hundreds, seems to indicate that not all the products and variants are exported. This confirms that you have at least one filter in your mass action, and that by chance, none of the filtered entries have a price linked to them.

So basically, the problem is with the filter you're using in your mass action I think.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 4 weeks ago #359494

nicolas wrote: ...the problem is with the filter you're using in your mass action I think.

I agree.

To clarify, there are 86 products in the database. The #_hikashop_variant table has 926 entries, the #_hikashop_characteristic table has 73 entries and the #_hikashop_price table has 108 items.

If I open up individual products and select the Variants tab, prices are shown if they have been entered. I'm trying to find the variants that don't have an assigned price yet without opening 86 products individually.

I adjusted the my mass action routine and added the category_id column. The price_value figures displayed as expected!

Then I tried enabling several other category_ elements. No price_values were shown in the spreadsheet. Then I went back to the category_id column display. Alas, again no price_value entries are shown. Perhaps one day this feature will start working.

Is there a working mass action routine on any HikaShop demonstration site that I can examine?


Charles

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 3 weeks ago #359497

Hi,

It's not a matter of the mass action feature not working but you not understanding how HikaShop works.
A product is linked to a category.
A variant is not linked to a category. It is linked to a parent product.
If you configure a filter on a category in your mass action, it will force the system to only return products and not variants.
So the problem is not the system, but the filter you've configured, as I was saying in my previous message.
What you need to do to find the variants without a price is to have only one filter on the product_sort_price being equal to 0.
Here is an example:
i.imgur.com/gslE5ZI.png
This displays the product_code of the variants / products without a price on my end.
And if you want to discard the main products, you can add a second filter on the product_parent_id being greater than 0.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359525

I reconfigured my Mass Action item but again have run into the Layout output not found error mentioned in another thread herein. I'll try a few other things to see if I can make it work.


Charles

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 3 weeks ago #359527

Hi,

The "display the results" action is to display the results. But you can use an action "export a CSV file" to get a CSV file with the same columns and data so that you can open it with Excel or LibreOffice Calc.

Now, I'm not sure why you would get that error in the first place. No one else has the problem. It's as if you had deleted the file administrator/components/com_hikashop/views/massaction/tmpl/output.php from your website. So the first thing I would recommend is to check if you still have that file there.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359534

nicolas wrote: It's as if you had deleted the file administrator/components/com_hikashop/views/massaction/tmpl/output.php from your website. So the first thing I would recommend is to check if you still have that file there.

Yup, it's missing!
I reinstalled the com_hikashop_essential_v5.0.3_2024-02-17_17-40-14.tar.gz file.
Still no output.php file.
I do see eight .php files (batch.php, cell.php, editcell.php and so on) plus the index.html file.
I opened the .tar.gz file in my copy of Ark. That program couldn't locate any file with output in the name.
Where is it supposed to be in the installation package?


Charles

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 3 weeks ago #359537

Hi,

Thanks for the details. I checked on my end and found the problem. I've made a new package available on our website.
Download again the install package on our website and install it on yours and it will fix the problem.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359554

May I have a refund for the incomplete version of HikaShop Essential that I purchased earlier before I purchase the repaired version?


Charles

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 3 weeks ago #359555

Hi,

What do you mean ? You get access to the latest version of 1 year after your purchase. So right now, you don't have to purchase anything. Just go in the menu My account>My subscriptions on our website and click on the download link to get the latest version of the Essential edition with the patch included.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359561

nicolas wrote: ...go in the menu My account>My subscriptions on our website and click on the download link

Maybe it's my wonky Firefox browser. The first three times I went there, I ended up at my-account/my-orders.html and not my-account/your-subscriptions.html.


Charles

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359566

nicolas wrote: I've made a new package available on our website.
Download again the install package on our website and install it on yours and it will fix the problem.

I downloaded and installed com_hikashop_essential_v5.0.3_2024-03-06_22-12-59.tar.gz. When I run a Mass Action routine set to "Display the results" as before, I receive the same 500 Layout output not found error.
I can see that the time/date stamps on the nine files in the /administrator/components/com_hikashop/views/massaction/tmpl have changed but the output.php file is still missing.
When I examine the archive in Ark, it can't find the output.php file either.


Charles

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

  • Posts: 82910
  • Thank you received: 13386
  • MODERATOR
8 months 3 weeks ago #359568

Hi,

That's my bad. I hadn't checked the new package and there was another problem. I've made again a new install package. Please redownload it again and install it again. This time it should be fine.

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

  • Posts: 34
  • Thank you received: 4
  • Hikashop Essential
8 months 3 weeks ago #359569

Okay, the output.php file has returned in the com_hikashop_essential_v5.0.3_2024-03-07_01-07-17.tar.gz package. The 500 error is gone.


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.083 seconds
Powered by Kunena Forum