This topic has 10 replies, 2 voices, and was last updated 3 years, 1 months ago ago by Rose Tyler
Hi,
I have noticed the theme showing a lot of fatal errors when using the official Woocommerce Product Bundles plugin.
After a lot of troubleshooting and disabling all plugins + checking every single product bundle item I have found out, that somehow the theme cannot handle when product bundle is having components with discount.
For example- simple products can have a regular and a sale price
Product bundles are made out of simple items and admin can specify a % discount on each bundle component. Thus simple item can be on sale and when purchased in bundle an additional % discount can be applied.
When this is used, the theme cannot even display shop page and is showing a lot of fatal errors in log file
But as soon as the discount is removed from the bundle item, all is working well.
https://ibb.co/DzSPhbj
https://ibb.co/vVhSJNn
Same product with same discount (migrated to a different site using a 2 different themes) is working without any issues.
Can you please check?
Admin access, error example and link to an example item in PM
Kind regards
after installing the default official Woocommerce Storefront theme (for which all plugins on woocommerce.com must be compatible) everything is working fine without errors and the bundle products can be viewed normally.
Screenshots in PM
Therefore so far it looks like some error in the theme. Or maybe my child theme is faulty?
Regards
Hello,
Please provide temporary FTP access.
Regards
Is it enough if I send you the affected file? The FTP contains access also to other websites and I cannot therefore share it at the moment.
It looks like the file /wp-content/themes/xstore/framework/woo.php is causing this issue based on the log report
Especially this formula – line 3023 is marked in BOLD font
} else {
if ( etheme_get_option( ‘sale_percentage’, 0 ) ){
$element_options[‘regular_price’] = (float) $product_object->get_regular_price();
$element_options[‘sale_price’] = (float) $product_object->get_sale_price();
$element_options[‘sale_label_text’] = $sale_text . ‘ ‘ . round( ( ( $element_options[‘regular_price’] – $element_options[‘sale_price’] ) / $element_options[‘regular_price’] ) * 100 ) . ‘%’;
}
}
Link to the google drive and the affected file is attached
I have managed to assign a limited ftp access to wp-content folder for you. I think you should have access there to all plugins and theme files
Ftp details in PM
Hello,
Thanks for the reply. I’ve passed the problem to our developers. I’ll inform you once get an answer. Please be patient and do not change access.
Regards
thank you. I will wait. FTP and admin access will remain open in the meantime.
Fixed. Check now
Regards
thank you. It is working now.
Please let me know what have you modified on my website settings. I need to know to avoid overwriting it by mistake.
Will this fix work even after your theme update? Or was it related only to my specific case?
Globally fixed. In Next update will be included.
Regards
Tagged: discounts, fatal error, product bundles, themes, woocommerce, wordpress
The issue related to '‘FATAL ERROR Woocommerce Product Bundles with discount’' has been successfully resolved, and the topic is now closed for further responses