Bear Bulk Edit - Error with variable products
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from ab on September 4, 2023, 11:26Hello,
I have been using Bear Bulk Product Edit for some time now without any trouble.
Yet, it is a few days now since I can't modify variable products in bulk. I get an error when trying to modify variable products.
What I try to do : modify sales prices (regular price minus %). I also tried (set new -1) to reset sales price.
I have several hundreds of products, half of which are variable products. Modifying all my simple products at once works fine.
I get the following errors :
- OPPER LALA
- hoevaak hier??
- PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * float in /home/databasenumber/domains/mysite.com/public_html/wp-content/plugins/woo-bulk-editor/ext/bulk/bulk.php:...
- Task displanification event error for hook woosea_update_project_stats. Error code: could_not_set. Error message: The list of planned events could not be saved.. Data: {"schedule":false,"args":...
- [04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT * FROM wp_posts WHERE ID = 2106 LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata, apply_filters('update_post_metadata'), WP_Hook->apply_filters, WC_Post_Data::update_post_metadata, get_post_type, get_post, WP_Post::get_instance
[04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT meta_id FROM wp_postmeta WHERE meta_key = '_sku' AND post_id = 2106 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata
[04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT * FROM wp_posts WHERE ID = 2106 LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata, add_metadata, get_object_subtype, get_post_type, get_post, WP_Post::get_instanceI tried the normal way, filtering variable products and ticking the green button "select variations" at the bottom. I tried not clicking this button. I tried applying the all the products (variable + simple) at once. All of this result in an error. Sometimes I get the error straight away, sometimes Bulk Operation is running for a minute or two and then I get and error message.
The only way I manage to modify my variable product is by selecting only the visible products at the bottom or when applying the variation to 1 or 2 categories at once. If I select too many categories in the filters then it gives an error message.
I tried uninstalling-reinstalling the plugin yet I still get the same errors.
Thank you for your help and thank you for this great plugin.
Hello,
I have been using Bear Bulk Product Edit for some time now without any trouble.
Yet, it is a few days now since I can't modify variable products in bulk. I get an error when trying to modify variable products.
What I try to do : modify sales prices (regular price minus %). I also tried (set new -1) to reset sales price.
I have several hundreds of products, half of which are variable products. Modifying all my simple products at once works fine.
I get the following errors :
- OPPER LALA
- hoevaak hier??
- PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * float in /home/databasenumber/domains/mysite.com/public_html/wp-content/plugins/woo-bulk-editor/ext/bulk/bulk.php:...
- Task displanification event error for hook woosea_update_project_stats. Error code: could_not_set. Error message: The list of planned events could not be saved.. Data: {"schedule":false,"args":...
- [04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT * FROM wp_posts WHERE ID = 2106 LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata, apply_filters('update_post_metadata'), WP_Hook->apply_filters, WC_Post_Data::update_post_metadata, get_post_type, get_post, WP_Post::get_instance
[04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT meta_id FROM wp_postmeta WHERE meta_key = '_sku' AND post_id = 2106 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata
[04-Sep-2023 08:07:18 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT * FROM wp_posts WHERE ID = 2106 LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Data::do_deferred_product_sync, array_walk, WC_Post_Data::deferred_product_sync, WC_Product_Variable::sync, WC_Product->save, WC_Data_Store->update, WC_Product_Data_Store_CPT->update, WC_Product_Data_Store_CPT->update_post_meta, WC_Data_Store_WP->update_or_delete_post_meta, update_post_meta, update_metadata, add_metadata, get_object_subtype, get_post_type, get_post, WP_Post::get_instance
I tried the normal way, filtering variable products and ticking the green button"select variations" at the bottom. I tried not clicking this button. I tried applying the all the products (variable + simple) at once. All of this result in an error. Sometimes I get the error straight away, sometimes Bulk Operation is running for a minute or two and then I get and error message.
The only way I manage to modify my variable product is by selecting only the visible products at the bottom or when applying the variation to 1 or 2 categories at once. If I select too many categories in the filters then it gives an error message.
I tried uninstalling-reinstalling the plugin yet I still get the same errors.
Thank you for your help and thank you for this great plugin.
Quote from Pablo Borysenco on September 4, 2023, 11:47Hello
What plugin vaersion number are you using?
Hello
What plugin vaersion number are you using?
Quote from ab on September 4, 2023, 11:53Hello Pablo,
Thank you for your answer. I am using version 1.1.3.3.
Hello Pablo,
Thank you for your answer. I am using version 1.1.3.3.
Quote from Pablo Borysenco on September 4, 2023, 12:13Hello
Try in file - wp-content\plugins\woocommerce-bulk-editor\ext\bulk\bulk.php - replace this code - https://share.pluginus.net/image/i20230904131214.png
code:
case 'invalue':
$val += floatval($woobe_bulk[$field_key]['value']);
break;case 'devalue':
$val -= floatval($woobe_bulk[$field_key]['value']);
break;case 'inpercent':
$val = $val + $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;case 'depercent':
$val = $val - $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;case 'devalue_regular_price':
//for sale_price only
$val = floatval($this->products->get_post_field($product_id, 'regular_price')) - floatval($woobe_bulk[$field_key]['value']);
break;case 'depercent_regular_price':
//for sale_price only
$val = floatval($this->products->get_post_field($product_id, 'regular_price'));
$val = $val - $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;case 'invalue_sale_price':
//for regular_price only
$val = floatval($this->products->get_post_field($product_id, 'sale_price') + floatval($woobe_bulk[$field_key]['value']));
break;case 'inpercent_sale_price':
//for regular_price only
$val = floatval($this->products->get_post_field($product_id, 'sale_price'));
$val = $val + $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;
Hello
Try in file - wp-content\plugins\woocommerce-bulk-editor\ext\bulk\bulk.php - replace this code - https://share.pluginus.net/image/i20230904131214.png
code:
case 'invalue':
$val += floatval($woobe_bulk[$field_key]['value']);
break;
case 'devalue':
$val -= floatval($woobe_bulk[$field_key]['value']);
break;
case 'inpercent':
$val = $val + $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;
case 'depercent':
$val = $val - $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;
case 'devalue_regular_price':
//for sale_price only
$val = floatval($this->products->get_post_field($product_id, 'regular_price')) - floatval($woobe_bulk[$field_key]['value']);
break;
case 'depercent_regular_price':
//for sale_price only
$val = floatval($this->products->get_post_field($product_id, 'regular_price'));
$val = $val - $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;
case 'invalue_sale_price':
//for regular_price only
$val = floatval($this->products->get_post_field($product_id, 'sale_price') + floatval($woobe_bulk[$field_key]['value']));
break;
case 'inpercent_sale_price':
//for regular_price only
$val = floatval($this->products->get_post_field($product_id, 'sale_price'));
$val = $val + $val * floatval($woobe_bulk[$field_key]['value']) / 100;
break;
Quote from ab on September 4, 2023, 12:28Thank you for your answer.
I changed the code lines and I launched a Sale Price set new to -1 on all variable products (green box ticked).
I get this error :
Task replanification event error for hook litespeed_task_vpi. Error code: could_not_set. Error message: The list of planned events could not be saved.. Data: {"schedule":"litespeed_filter","args":[],"interval":60}
Thank you for your answer.
I changed the code lines and I launched a Sale Price set new to -1 on all variable products (green box ticked).
I get this error :
Task replanification event error for hook litespeed_task_vpi. Error code: could_not_set. Error message: The list of planned events could not be saved.. Data: {"schedule":"litespeed_filter","args":[],"interval":60}
Quote from Pablo Borysenco on September 5, 2023, 10:36hello
It doesn't look like this error has anything to do with my plugin.
If you inserted the code correctly, the price update operation should complete successfully - This is true?
hello
It doesn't look like this error has anything to do with my plugin.
If you inserted the code correctly, the price update operation should complete successfully - This is true?
Quote from ab on September 6, 2023, 11:41Hello Pablo,
Thank you again for your help. I did some tests and found the errors were caused by another plugin that was interfering. I deactivated it and everything is fine now. My bulk operations run smoothly.
Should I maintain the modification of the code you sent me above or should I revert the code to what it was before?
Thank you very much for your help.
Hello Pablo,
Thank you again for your help. I did some tests and found the errors were caused by another plugin that was interfering. I deactivated it and everything is fine now. My bulk operations run smoothly.
Should I maintain the modification of the code you sent me above or should I revert the code to what it was before?
Thank you very much for your help.
Quote from Pablo Borysenco on September 6, 2023, 12:27Hello
Leave the code with changes, this code will be in the new version
Hello
Leave the code with changes, this code will be in the new version
Quote from ab on September 6, 2023, 13:35Ok, thank you very much for all your help :)
Ok, thank you very much for all your help :)