WordPress.org

Ready to get started?Download WordPress

Forums

Woo commerce variable prices not working (2 posts)

  1. danpayneuk
    Member
    Posted 9 months ago #

    Hi guys

    I have just downloaded woo commerce and the Flashlight theme to upgrade my website.

    Im new to this so I imagine my issue is something I am doing wrong.

    Basically I have set up a product for a photo, attributes have been added for 2 different sizes. I then set it as a variable product and set the variations with prices.

    However when I view the product page, I go to the drop down menu, all I see is choose an option. But no options are visible.

    The add to cart button does not appear either.

    I tried setting it as a simple product and it works fine.

    Here is a link to the test page with the issues.


    also here is a screen shot of the variables

    Thanks in advance for any help

  2. qubitoz
    Member
    Posted 8 months ago #

    I had the same problem this issue is a hosting one.
    You will need to add some functions to your theme functions.php file and change the name of the files.
    First you MUST rename:

    wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.js
    wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js

    to:

    wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.js
    wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.min.js

    Now then add this to your theme functions.php file:

    add_action( 'wp_enqueue_scripts', 'custom_frontend_scripts' );
    
    function custom_frontend_scripts() {
    
      	global $post, $woocommerce;
    
    		$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    		wp_deregister_script( 'jquery-cookie' );
    		wp_register_script( 'jquery-cookie', $woocommerce->plugin_url() . '/assets/js/jquery-cookie/jquery_cookie' . $suffix . '.js', array( 'jquery' ), '1.3.1', true );
    
    }

    Take care!

Reply

You must log in to post.

About this Topic