FATAL ERROR Woocommerce Product Bundles with discount

This topic has 10 replies, 2 voices, and was last updated 3 years ago ago by Rose Tyler

  • Avatar: densitysk
    densitysk
    Participant
    November 13, 2021 at 01:29

    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

    Please, contact administrator
    for this information.
    9 Answers
    Avatar: densitysk
    densitysk
    Participant
    November 13, 2021 at 10:08

    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

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 13, 2021 at 13:28

    Hello,

    Please provide temporary FTP access.

    Regards

    Avatar: densitysk
    densitysk
    Participant
    November 13, 2021 at 16:45

    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

    Please contact administrator
    for this information.
    Avatar: densitysk
    densitysk
    Participant
    November 13, 2021 at 21:59

    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

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 14, 2021 at 08:17

    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

    Avatar: densitysk
    densitysk
    Participant
    November 14, 2021 at 08:48

    thank you. I will wait. FTP and admin access will remain open in the meantime.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 14, 2021 at 10:57

    Fixed. Check now

    Regards

    Avatar: densitysk
    densitysk
    Participant
    November 14, 2021 at 14:42

    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?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 15, 2021 at 08:27

    Globally fixed. In Next update will be included.

    Regards

  • Viewing 10 results - 1 through 10 (of 10 total)

The issue related to '‘FATAL ERROR Woocommerce Product Bundles with discount’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.