• Resolved nerdnestmedia

    (@nerdnestmedia)


    Hello!
    I am trying to get help with an issue I am having with one product that has 510 variations. I am using a code snippet that allows for the refreshing of variations in the drop down. This feature is required in order for a better user experience.

    /* Increase Woocommerce Variation Threshold */
     function wc_ajax_variation_threshold_modify( $threshold, $product ){
      $threshold = '600';
      return  $threshold;
     }
    add_filter( 'woocommerce_ajax_variation_threshold','wc_ajax_variation_threshold_modify', 10, 2 );

    I have tested this, and it seems the threshold is around 300-350 variations before I get the white screen when loading the front end of the product page. I need to be able to have the menus refresh based on the other variations selected, plus have a product that has over 510 variations.

    I have disabled the theme, and tested other themes as well as all plugins have been deactivated and reactivated one by one. All other products work just fine with the code the way it is, it is just a matter of having too many variations.

    Any ideas?
    THANK YOU!!

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • @nerdnestmedia Yes, It showing the blank page because due to its large variations. By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the max_execution_time directive in your php. ini file. Or you can contact to your server to increase the execution time then you will not face this issue

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    Hello! Thanks so much for your response. Max execution time is set to 180 on server side. However, we get a white screen within 5 seconds of loading. Is there anything else I can check or adjust?

    Thanks!!

    @nerdnestmedia Ok do one thing enable the wp_debug form the config file then let me know the exact error.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    Hi there!
    So the debug only shows errors with the Store Locator for WP plugin that is installed. When I deactivate that plugin, there are no errors.

    Here are the errors that show with that plugin installed:
    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Store_locator_wpress has a deprecated constructor in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/store_locator_wpress.php on line 50

    Notice: Undefined variable: code in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/activation.php on line 54

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Store_locator_wpress_admin has a deprecated constructor in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/admin.php on line 3

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Store_locator_wpress_db has a deprecated constructor in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/db.php on line 3

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Store_locator_wpress_display has a deprecated constructor in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/display.php on line 3

    Deprecated: Function create_function() is deprecated in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/widget_closest_stores.php on line 7

    Deprecated: Function create_function() is deprecated in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/widget_store_search.php on line 7

    Deprecated: Function create_function() is deprecated in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/widget_closest_stores.php on line 7

    Deprecated: Function create_function() is deprecated in /home1/nerdnest/public_html/brownsheep/wp-content/plugins/store_locator_wpress/widget_store_search.php on line 7

    Again, thank you so much for your time with this! I am perplexed since I cannot seem to see any errors this is throwing except for the white screen!

    @nerdnestmedia Do one thing deactivate all the plugin except woocommerce and default woo-commerce theme like storefront then check again.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    I have turned off the code snippets plugin (which is the issue). (all other plugins/themes/etc do not cause the white screen issue). I need both code snippets to work as well as this product with 510 variations. I have turned off this plugin so you can see the product. https://brownsheep.nerdnest.media/product/nature-spun/ Everything shows, but the drop downs do not work the way they should (select blue, and all colors show instead of just the ones in the blue color family.)

    Hope that makes sense! Thank you for your continued support!

    Hello, @nerdnestmedia I think something wrong has happened with this product(https://brownsheep.nerdnest.media/product/nature-spun/) can you please create another product then test again. Since I have checked other varaitble products and there are working fine.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    Hi again! I added the 2nd product (same product variations added), and anytime the code snippet threshold is set to 510 or higher, I get the white screen. Anything 509 and under, I can see the product but the dropdowns aren’t functioning.

    2nd product – https://brownsheep.nerdnest.media/product/nature-spun-2/

    code snippet now:

    /* Increase Woocommerce Variation Threshold */
     function wc_ajax_variation_threshold_modify( $threshold, $product ){
      $threshold = '509';
      return  $threshold;
     }
    add_filter( 'woocommerce_ajax_variation_threshold','wc_ajax_variation_threshold_modify', 10, 2 );

    Thank you!!!

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    With so many variations I think this wouldn’t make the user experience very easy on the front end of the site.

    I guess I will just have to break this product into multiple products since it seems no one has had a product with this many variations before and there is no real way to fix it.

    Thanks again for all of your help!

    Hello,

    I have same issue and the code isn’t working and due to variation screen is blank.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    @aghasalar9 unfortunately, I never was able to get this fixed. I opted for splitting the product into three products since there were so many variations.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Too Many Variations = White Screen’ is closed to new replies.