Mass delete products

  • Posts: 90
  • Thank you received: 2
9 years 5 months ago #178016

You can do whatever you feel like it. If something hangs just tell me here I'll restart mysql or apache or the whole server remotely. At 9 o'clock in the morning (GMT+2) i'll be online until 17:00 and I get e-mail notifications instantly when you write anything here.

Thank you and good luck :).

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #178092

Hi,

I spent time on your website to debug this issue, I made a little fix for your case.
So now it should work ok, just be sure to be using a csv file with no more than 100 codes else it will end in a timeout.

I have not deleted all the elements, I prefer let you manage the csv files correctly.

Further I will have to reproduce this issue on my end in order to make a final fix, debugging on eXtplorer is not the easiest task ;)

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

  • Posts: 90
  • Thank you received: 2
9 years 5 months ago #178097

Thank you for your time spent debugging.

But what can I do to make that number (100) bigger? Because I have more than 10.000 that I need to erase - that would mean 100 csv's.

Can I tweak somehow the mysql to not give a timeout?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #178117

The thing is that, when you have 100 products in the csv file, if each product has variants there is a very big number of products to delete. To get the variants of the products, there is requests processed, so a lot of requests and that's why it generates a memory issue (and not a timeout as I said previously, sorry).

To have a bigger number of products per csv file, you can potentially test the limit, try with 200, then 300 to see how it is handling that. And if you have a memory error displayed, you can too increase the memory limit.

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

  • Posts: 90
  • Thank you received: 2
9 years 5 months ago #178158

I wasn't fast enough with the reply.

I reaised all apache timeouts to 1 hour and the available memory for a request to 1GB and after 52 minutes :) all 9000+ products were erased.

Thank you very much!!!

Now one last question - if a new version of hikashop appears can I update? Or will I overwrite what you modified?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #178232

Hi,

The current version of HikaShop will erase what I have modified, but I will try to do the correct editions for the future release.
To be sure, you can backup the current files "plugin/hikashop/massaction_product/massaction_product.php" and "administrator/components/com_hikashop/classes/massaction.php".

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

  • Posts: 147
  • Thank you received: 6
9 years 2 weeks ago #197349

Hi, I am using mass action to delete products but it is deleting ALL PRODUCTS.
This is my CSV

product_code,product_name
1148-00030,Core Cleaner

and see screen grab below.



In this specific case I am using it to delete products that are lost in the database.
I am using hikashop 2.4.0
Thanks

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

  • Posts: 147
  • Thank you received: 6
9 years 1 week ago #197530

Is anyone looking at this post?
Any news on the problem above?

Thanks

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 week ago #197541

Hi,

Yes I do, on my working time ;)
And better than looking at this post, I give a solution :)

Please edit the file "plugins/hikashop/massaction_product/massaction_product.php" and in the function "onProcessProductMassFiltercsvImport()" add:

$elements = $data->elements;
Before:
if($filter['type'] == 'out'){

Thanks for your report, I corrected it on our end too and this fix will be available in the next release.

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

  • Posts: 147
  • Thank you received: 6
9 years 1 week ago #197738

Hi Thanks, that seems to fix the problem.
Perfect.

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201104

Hi Guys,
The mass delete is DELETING ALL products again. I am on version 2.4. I checked and I still have the line $elements = $data->elements; there.

I am sorry to say this but every time I had to use this functionality I had problem. Not very reliable/stable to my experience.

Please advise, kind urgent now.

Thanks

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #201134

Hi,

I don't remember that changes has been made on this part between the 2.3.5 and the 2.4.0.
Please give us back backend and FTP access in order to debug that directly on your website.

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201201

I just PM you the login details.

Thanks

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201372

Hi, did you guys find anything?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #201377

Hi,

Please give us a FTP access too as I asked in my previous message ;)
Without the FTP access I can't debug anything.

Regarding your issue of "lost" products, it is very strange, I don't think we had other feedbacks like that.
Could you give us more informations about these products ? Like if you tried to delete them, how, etc.

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201424

Sorry about that. I just PM you the details.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #201497

Hi,

When debugging your website, I processed a massaction before my commit was done, so I lost the settings, please give me the url of the csv file to set in the path field.

The issue seems to be coming from the fact that if no products are found in the database, so all the products are loaded.
This will be fast to fix.

Regarding the "lost products" issue you have, the listing don't see them because they don't have categories, so the system just can't list them, the mass action see them because it is only based on the product ids, no checks are done on the categories.

But, to retrieve these products, you just have to click on the "Check database" button in the toolbar of the HikaShop configuration page.

Last edit: 8 years 11 months ago by Xavier.

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201509

Hi Xavier,
Thanks for that. I just PM you the address.

Also is there a way for the settings not to revert back? As you experienced it is not very helpful.

Regarding the lost products, I already tried the 'Check Database' Button as previously state on that other post. And that didn't fix it. Is there the possibility of that functionality being bugged and not working? Could you have a look at that as well?

Thanks

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #201529

Hi,

Problem solved for the mass actions, the issue was that when no products are found in database, the mass actions were processing a MySQL request with an empty "where" condition, so it was loading all the products.
So I added a where condition to get 0 results.

The settings don't revert back, it is just that due to the commit I had done, I sent an empty form which resetted the settings of the mass action, but this will not happen in normal conditions.

For the check database issue, do you have the latest version of HikaShop ?

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

  • Posts: 147
  • Thank you received: 6
8 years 11 months ago #201649

Hi Xavier.
It seems to not be deleting any product via csv now.
I created a test product with code TESTMP and I uploaded this csv

product_code
TESTMP

But nothing gets deleted. Do you mind having a look again?
Thanks

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

Time to create page: 0.096 seconds
Powered by Kunena Forum