WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[closed] Checkout button not showing on Woo commerce product (83 posts)

  1. Sjobidoo
    Member
    Posted 1 year ago #

    Here's the screenshots:

    General

    Attributes

    Variations

  2. Sjobidoo
    Member
    Posted 1 year ago #

    According to this thread on Github, the issue is due to the variations JS not being loaded for some reason.

  3. SiteGround
    Member
    Posted 1 year ago #

    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.

  4. Myloomedia
    Member
    Posted 1 year ago #

    did not work four me

  5. Myloomedia
    Member
    Posted 1 year ago #

    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');

    ?>

  6. Myloomedia
    Member
    Posted 1 year ago #

    Thnx to mathew.hollingsworth

  7. Sjobidoo
    Member
    Posted 1 year ago #

    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!

  8. htayyub
    Member
    Posted 1 year ago #

    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

  9. cs.pt.fs
    Member
    Posted 1 year ago #

    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!

  10. allasai
    Member
    Posted 1 year ago #

    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');
    ?>

  11. Sjobidoo
    Member
    Posted 1 year ago #

    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');
    ?>
  12. dreamstream
    Member
    Posted 1 year ago #

    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?

  13. Sjobidoo
    Member
    Posted 1 year ago #

    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

  14. muzzleme
    Member
    Posted 1 year ago #

    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!

  15. muzzleme
    Member
    Posted 1 year ago #

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

  16. Sjobidoo
    Member
    Posted 1 year ago #

    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.

  17. muzzleme
    Member
    Posted 1 year ago #

    I'm using the Catalist themeat :
    http://www.yootheme.com/demo/wordpress/catalyst

    My site is in development, but here are links:
    Construct: http://www.muzzlelife.com
    Product page under Muzzle Wear menu: http://www.muzzlelife.com/webcon/?post_type=product

    Note that 2 "placeholder" products with Simple buttons work. The third is using the Variable button that does not work.

  18. robert5
    Member
    Posted 1 year ago #

    Looks like you got it to work.

    I got my yootheme working by copying the js file to the warp/js folder and adding:
    $this['asset']->addFile('js', 'js:add-to-cart-variation.js');
    to the file 'template.config.php'

    not the best but pretty easy.

    R

  19. muzzleme
    Member
    Posted 1 year ago #

    I tried many ways to make this work, but the winner was putting the script " <script type='text/javascript' src='http://my-site.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js?ver=1.6.5.2'></script> " in the head of template.php in the templatename\layout folder and it worked for me! ... now recovering from banging my head against the wall.

    James

  20. Shyju Pulari
    Member
    Posted 1 year ago #

    Pleas help me.
    I am using wp e-commerce plugin. Now both cart and checkout form are showing on the same page. How can i move checkout form to another page. How to call that url or that particular layout.

    Thanks in advance.

  21. citynode
    Member
    Posted 1 year ago #

    Shyju, you should start a new topic: your issue seems pretty different from the original post and thread title.

    You should check your settings for pages on Woocommerce -> Settings -> Pages -> Shop Pages

  22. Sjobidoo
    Member
    Posted 1 year ago #

    Had the wrong url in my former code..sorry.. This is the correct script to add to your functions.php and it should solve your problem:

    function mv_my_theme_scripts()
    {
    wp_enqueue_script('add-to-cart-variation', plugins_url() . '/woocommerce/assets/js/frontend/add-to-cart-variation.js',array('jquery'),'1.0',true);
    }
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');
    ?>
  23. Phil Ryan
    Member
    Posted 1 year ago #

    robert5 - Many thanks. if it weren't for people like you, we'd be @%^$#%^!!! haha.

    Looks like you got it to work.

    I got my yootheme working by copying the js file to the warp/js folder and adding:
    $this['asset']->addFile('js', 'js:add-to-cart-variation.js');
    to the file 'template.config.php'

    not the best but pretty easy.

    R

  24. Sjobidoo
    Member
    Posted 1 year ago #

    There is no need to copy anything to your warp folder...there was a typo on the original code I posted..that's why you probably didnt get it to work :)

    Simply putting this in your functions.php will make it work:

    function mv_my_theme_scripts()
    {
    wp_enqueue_script('add-to-cart-variation', plugins_url() . '/woocommerce/assets/js/frontend/add-to-cart-variation.js',array('jquery'),'1.0',true);
    }
    add_action('wp_enqueue_scripts','mv_my_theme_scripts');
  25. addesigns
    Member
    Posted 1 year ago #

    My Woocommerce add to cart button isn't showing up when viewed via a mobile device. Everything seems to be visible, variations and costs, but once you select variations, nothing happens. The stock doesn't pop up and neither does the add to cart button.

    I have WordPress Mobile Pack installed because my site wouldn't show via mobile otherwise although the WooTheme says it's supposed to show up. It just showed a small square of my site and wouldn't scroll so other parts could be viewed.

    If anyone knows how to make these two plugins play nice, please let me know! I am desperate to get this working again so that my customers can shop via mobile devices, which most of them do.

  26. citynode
    Member
    Posted 1 year ago #

    link to your site?

  27. addesigns
    Member
    Posted 1 year ago #

    Okay, I've found out that the add to cart button is only missing for variable products via a mobile device. Any clue why this is happening? It show up just fine if the website is viewed via a computer or tablet.

    Website URL: http://www.glamolous.com

  28. Sjobidoo
    Member
    Posted 1 year ago #

    @addesigns: I'd check with the developer of your mobile pack plugin as the problem seems to be related with it.

  29. addesigns
    Member
    Posted 1 year ago #

    I was hoping that wasn't the case because it is no longer supported. Does anyone know of a better plugin to "mobilze" your Woocommerce?

  30. addesigns
    Member
    Posted 1 year ago #

    Does anyone know where the "add to cart" button code is located? Maybe I can paste it into my WordPress Mobile Pack?? Any information will be greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic