Mass Action Not Completing Fully

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125016

-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.1
-- PHP version -- : 5.3.72

Hi, I have created a mass action, please see attached. It seems to only process about 1000 products at a time. So i click on process, then it will delete 1000 products. I will then have to ask it to process again for it to delete more products, even though i can see that it has found all the products according to the filter, is this normal?

Thanks

Alex

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #125047

Hi,

We have to improve the mass actions, actually you have to do many process.
It's already on our todo list. This should be in HikaShop 2.3.0.

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

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125048

Ok thank you for the quick response, is there any danger in me deleting the products for now via php my admin in the table rows?

Thanks

Alex

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #125069

I just checked the code and a modification has already been made.
Can you check in "plugins\hikashop\massaction_product\massaction_product.php" if the function is:

	function onProcessProductMassActiondeleteElements(&$elements,&$action,$k, $start = 0){
		$ids = array();
		$i = 0;
		$productClass = hikashop_get('class.product');
		foreach($elements as $element){
			$nb = $i - $start;
			if($nb >= 0 && $nb < 500){
				$ids[] = $element->product_id;
				$i++;
			}elseif($nb >= 500){
				$result = $productClass->delete($ids);
				$start = $start + 500;
				$this->onProcessProductMassActiondeleteElements($elements,$action,$k, $start);
			}
		}
	}
If it's not, thansk to replace it.

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

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125091

Thanks I have updated this file, i still need to test it as i have now imported the products ok.

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

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125178

I have tested this again however it doesn't seem to delete any products so for now i shall have to just truncate the rows in the product table via phpmyadmin, do you know when the new release might be out so i can update hikashop?

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #125184

The 2.2.2 should be released this week. But for the 2.3.0 we can't give a date for the moment.

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

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125185

Ok thanks for the update.

I have some more problems with an import at the moment but i think I should open these on a new thread? Nicolas has helped me via email but i think it might be quicker to do via the forum?

Thanks

Alex

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #125203

Yes, thanks to open a new thread as it's not related on the mass actions.
And on the forum, it can be quicker, we are more to answer.

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

  • Posts: 377
  • Thank you received: 7
11 years 3 months ago #125208

Ok thanks.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum