WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WooCommerce – excelling eCommerce] Checkout button not showing on Woo commerce product

[Plugin: WooCommerce – excelling eCommerce] Checkout button not showing on Woo commerce product

Viewing 15 replies - 31 through 45 (of 82 total)
  • According to this thread on Github, the issue is due to the variations JS not being loaded for some reason.

    Hello,

    In your case the entire Add to Cart button is not generated. There are two things I can think of that you could try:

    1. Don’t use pipe but the Add new button to add all attributes.
    2. Check the “Visible on the product page” checkbox

    Maybe that will help. I am afraid I can’t be more specific without access to the particular site.

    did not work four me

    Ive got him.

    I was able to resolve this on my site.
    For whatever reason wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.js was not included.
    I manually added it by uploading it to /js/add-to-cart-variation.js in my template and adding the below to my functions.php in the template.

    function mv_my_theme_scripts()
    {
       wp_enqueue_script('add-to-cart-variation', get_template_directory_uri() . '/js/add-to-cart-variation.js',array('jquery'),'1.0',true);
    }
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');

    ?>

    Thnx to mathew.hollingsworth

    Ive got him.

    I was able to resolve this on my site.
    For whatever reason wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.js was not included.
    I manually added it by uploading it to /js/add-to-cart-variation.js in my template and adding the below to my functions.php in the template.

    function mv_my_theme_scripts()
    {
    wp_enqueue_script(‘add-to-cart-variation’, get_template_directory_uri() . ‘/js/add-to-cart-variation.js’,array(‘jquery’),’1.0′,true);
    }
    add_action(‘wp_enqueue_scripts’,’mv_my_theme_scripts’);
    ?>

    Awesome…solved the problem. Thanks alot.

    Btw: might wanna correct the source of the js to Woocommerce javascript folder. You’ve set it to the theme folder which is wrong 🙂

    Thanks again!

    Hi guys, I don’t know if you could help me! I am trying to create a Variable product but keep getting this message
    <blockquoteBefore adding variations, add and save some attributes on the Attributes tab.> I have already created the attributes and configured them.

    Thanks

    function mv_my_theme_scripts()
    {
    wp_enqueue_script(‘add-to-cart-variation’, get_template_directory_uri() . ‘/js/add-to-cart-variation.js’,array(‘jquery’),’1.0′,true);
    }
    add_action(‘wp_enqueue_scripts’,’mv_my_theme_scripts’);
    ?>

    So you add the above to the function.php?

    Can someone explain how to upload the add-to-cart-variation.js ?

    Thank you!

    Please help! I need to know how to upload the add-to-cart-variation.js and where to insert the following code:

    function mv_my_theme_scripts()
    {
    wp_enqueue_script(‘add-to-cart-variation’, get_template_directory_uri() . ‘/js/add-to-cart-variation.js’,array(‘jquery’),’1.0′,true);
    }
    add_action(‘wp_enqueue_scripts’,’mv_my_theme_scripts’);
    ?>

    Add this code to your functions.php file and you should be all set:

    function mv_my_theme_scripts()
    {
    wp_enqueue_script('add-to-cart-variation', plugins_url() . '/woocommerce/js/frontend/add-to-cart-variation.js',array('jquery'),'1.0',true);
    }
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');
    ?>
    dreamstream
    Member

    @dreamstream

    I’ve been suffering from the same “variables – missing add to cart button affliction. I’ve added the code to the functions.php file (though you programmer geeks do realize there are multiple functions.php files on any wordpress server. It really didn’t like it at the wp-content folder’s function file and did nothing at all in the Enfinity folder’s function.php file. So I’m thinking it’s the same thing that several have asked about (and not received an answer at least not in the posts) about how to “upload the add-to-cart-variation.js ” and what are the contents of that file?????? Or where does one get it or how does one (non php programmer) make one? ANd WHERE does that file go in the wp/theme/woocommerce file hierarchy?

    I’ve been suffering from the same “variables – missing add to cart button affliction. I’ve added the code to the functions.php file (though you programmer geeks do realize there are multiple functions.php files on any wordpress server. It really didn’t like it at the wp-content folder’s function file and did nothing at all in the Enfinity folder’s function.php file. So I’m thinking it’s the same thing that several have asked about (and not received an answer at least not in the posts) about how to “upload the add-to-cart-variation.js ” and what are the contents of that file?????? Or where does one get it or how does one (non php programmer) make one? ANd WHERE does that file go in the wp/theme/woocommerce file hierarchy?

    You paste the code inside your theme’s functions.php file. The javascript file you’re asking about should already be present inside the Woocommerce folder at the location shown in the code:
    plugins_url() . '/woocommerce/js/frontend/add-to-cart-variation.js
    This basically means: http://www.yourdomain.com/wp-content/plugins/woocommerce/js/frontend/add-to-cart-variation.js

    I’m dying here… I am using a YooTheme template with the WooCommerce plugin and have tried everything to get the “Add to Card” button to show with Variables… but luck. Then I thought, let’s try one of the WP default templates and WHA-LA! it works as it should. Then I go back and activate the YooTheme Template again and “Crap” it doesn’t work again. Does anyone know how to make the button work using a YooTheme template (Theme-Catalist)?

    The simple button works with the YooTheme template, showing the “Add to Cart” button – Just not when the variables option is selected.

    Many Thanks!

    To clerify, I tried all the fixes in the comments above. (code in funtions.php file) Banging my head here!

    I’m dying here… I am using a YooTheme template with the WooCommerce plugin and have tried everything to get the “Add to Card” button to show with Variables… but luck. Then I thought, let’s try one of the WP default templates and WHA-LA! it works as it should. Then I go back and activate the YooTheme Template again and “Crap” it doesn’t work again. Does anyone know how to make the button work using a YooTheme template (Theme-Catalist)?

    The simple button works with the YooTheme template, showing the “Add to Cart” button – Just not when the variables option is selected.

    Many Thanks!

    Which theme are you using? I’m using a Yootheme template aswell and the above sollution works fine here.

Viewing 15 replies - 31 through 45 (of 82 total)
  • The topic ‘[Plugin: WooCommerce – excelling eCommerce] Checkout button not showing on Woo commerce product’ is closed to new replies.