Forum Replies Created

Viewing 8 replies - 31 through 38 (of 38 total)
  • Thread Starter elmersw

    (@elmersw)

    Thanks for your quick reply.

    I agree with you that the most likely cause would be any field stored as a string (or just an empty field) instead of a number.

    In my webshop I use 3 categories. Products, bundles and giftcards. Each category only contains only 1 type of product. Products: simple product. Bundles: smart bundle (created by plugin WPC Product Bundles). Giftcards: PW gift card (created by plugin PW Giftcards). The giftcard product type also has variations.

    Given the error message I suspect that my custom meta field ‘alcoholpercentage’ is causing the error. In the filter set I use a slider on this field.

    I have not made any recent changes to the products and bundles. To be sure I have reviewed all simple products that are published: no values missing and all values seem to be a number. My bundles do not contain the field ‘alcoholpercentage’. For debugging purposes I have unpublished and deleted all these bundles.

    The giftcards may cause the problem. I have added these just after updating your plugin. I’m not sure whether the filter plugin was working after the update and before adding this giftcard plugin. I have already tried removing the plugin completely and deleting the related gift cards and category. If the gift cards would cause the error, I would expect the error to disappear after these actions. Unfortunately it didn’t.

    Additionally I have removed all products with the unpublished status. The only products left are the published simple products. And as said before, I have not made any changes to these products.

    So, I believe all published products have the necessary fields for the filter to work properly. If you want to see for yourself, I can share the export of the products.

    As a last attempt, I removed all products except for one for which I’m absolutely sure the filter was working. Still get an error.

    Is the previous version of the plugin still available? I’d like to manually install the previous version to see if it makes any difference.

    Is it possible to change the filter settings outside the regular settings screen? I can’t change the filter set in the settings screen while this error occurs. I’d like to make sure it’s this particular custom field causing the error and remove it from the filter set.

    Thread Starter elmersw

    (@elmersw)

    I can’t remember when this was fixed, but the filter was working the last couple of weeks. Until now. Since yesterday’s update the error is back.

    Unfortunately I can’t even change the filter set, because the error appears in the backend too.

    Thread Starter elmersw

    (@elmersw)

    Unfortunately this will not help. This just alters the text. My problem is that messages are generated (at least the errors), but not displayed.

    Current plan is to use the woocommerce_add_to_cart_fragments filter to add the notices html using this function.

    function ace_ajax_add_to_cart_add_fragments() {

    // Exclude Checkout Page
    if (is_checkout()) {
    return;
    }

    // Exclude Cart Page
    if (is_cart()) {
    return;
    }

    // Exclude Single Product Page
    if (is_product()) {
    return;
    }

    ob_start();

    woocommerce_output_all_notices();
    $notices_html = ob_get_clean();
    $htmlelement = “.woocommerce-notices-wrapper”;

    $fragments = array ($htmlelement => $notices_html);

    //wc_clear_notices(); // should probably be uncommented

    return $fragments;
    }
    add_filter( ‘woocommerce_add_to_cart_fragments’, ‘ace_ajax_add_to_cart_add_fragments’ );`

    Still have to figure out how to add the notices to the filter on specific pages only. Using it on the cart page / checkout page and single product page causes the notices to disappear: they were already displayed and overwritten by the fragment refresh Ajax call that no longer contains notices. Code above is not working yet with respect to the exclusions.

    Thread Starter elmersw

    (@elmersw)

    Thanks. Ajax is already enabled. To make sure, I have disabled, saved, enabled and saved it again. No difference…

    In the meantime I have altered the javascript as mentioned in the OP and now messages are displayed on the single product page.

    @theotheo Great idea, but the vote link does not work…

    Thread Starter elmersw

    (@elmersw)

    Never mind. Apparently it took some time. Code still works.

    As I experience the same issue (Snapshot) and this one is marked as resolved I would really like to know the solution.

    The default structure on the checkout page is causing problems when applying custom style sheets.

    • This reply was modified 3 years, 3 months ago by elmersw.
    Thread Starter elmersw

    (@elmersw)

    I didn’t expect you would even supply the code. Got it working within a minute. Thanks a lot.

Viewing 8 replies - 31 through 38 (of 38 total)