Skip to main content

Delete the elements action doesn't work

12 years 2 weeks ago - 12 years 2 weeks ago #178556 by korzo
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

I created Mass Action to delete all products from category, but "Delete the elements" action doesn't seems to work.
When I change action to "Display the results" it works as expected.
Last edit: 12 years 2 weeks ago by korzo.

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

12 years 2 weeks ago #178577 by korzo
It doesn't work because method onProcessProductMassActiondeleteElements() is completely broken.
Only scenario when it partially works is when limit is more then 500.
Then exactly 500 records are deleted.
Here is fix:
Code:
function onProcessProductMassActiondeleteElements(&$elements,&$action,$k, $start = 0){ $ids = array(); $c = count($elements); for($i = $start; $i < $start + 500 && $i < $c; $i++) { $ids[] = $elements[$i]->product_id; } $productClass = hikashop_get('class.product'); $productClass->delete($ids); if($i < $c) { $this->onProcessProductMassActiondeleteElements($elements,$action,$k, $start + 500); } }

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

12 years 2 weeks ago #178622 by Xavier
Hi,

Yes we had indeed this issue, it's already corrected on our end, and the fix will be in the next release.
Thanks.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum