WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Add to cart button not showing up when selecting "Variable Product. (19 posts)

  1. peanut737
    Member
    Posted 1 year ago #

    Can't find anything abou this in the forum

    The add to cart button and the pricing updates when selecting a variable isn't working at all.

    http://evieevan.com/shop/cleen-mineral-concealer/

    http://wordpress.org/extend/plugins/woocommerce/

  2. royho
    Member
    Posted 1 year ago #

    Can't view your site, its under maintenance.

  3. peanut737
    Member
    Posted 1 year ago #

    Ooooops sorry. It's visible now. Thanks a bunch!

    I'm certainly not a developer but it appears to be a script issue to me.

  4. royho
    Member
    Posted 1 year ago #

    Your site is throwing errors...More specifically sucker fish script error I assuming as the error is abbreviated with SF...So this error is breaking the rest of the scripts...Fix that first and re-test.

  5. peanut737
    Member
    Posted 1 year ago #

    Thanks a bunch... We got the cart showing but now have a wrapper container issue. UGH

  6. peanut737
    Member
    Posted 1 year ago #

    We were able to fix the container & wrapper issues after we upgraded to the latest UDesign and made some mod's to CSS.

    Thanks again for your help Royho!

  7. miracon
    Member
    Posted 1 year ago #

    I am having the exact same problem. I have read the instructions on Variations and no matter what I do or how I tweak it, I can't get the "Add to Cart" button to display when I make my product a "Variable" and add variations. This is my first time using any eCommerce type plug in so I am sorry to be such a Newb. Here is the link to my test site... 108.179.221.22/~ellybean/shop/soapsicles-2/#tab-attributes

    EDIT: Not sure why my link isn't showing! I took the code off so someone can cut and paste.

  8. peanut737
    Member
    Posted 1 year ago #

    With the help of Royho above and our programer/developer we were able to find script errors that were causing the scripts that are are used for the variations cart and the image light box to not work.

    What theme are you using?

  9. miracon
    Member
    Posted 1 year ago #

    I'm using Catalyst/Dynamik and I do have the Catalyst Connect plugin activated on there. Thanks for any help! :-)

  10. miracon
    Member
    Posted 1 year ago #

    My issue has been resolved! I had a Header Script that was there for no purpose but was probably installed with one of the skins I tried. It created a conflict. As soon as I removed it, the Add to Cart button showed up! Here it the script

    [ Moderator note: please put the backtick on a new line above and below your code or it doesn't format correctly. ]

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
    </script>
    <script type="text/javascript">
    $(document).ready(function() {
      function filterPath(string) {
      return string
        .replace(/^\//,'')
        .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
        .replace(/\/$/,'');
      }
      var locationPath = filterPath(location.pathname);
      var scrollElem = scrollableElement('html', 'body');
      $('a[href*=#]').each(function() {
        var thisPath = filterPath(this.pathname) || locationPath;
        if (  locationPath == thisPath
        && (location.hostname == this.hostname || !this.hostname)
        && this.hash.replace(/#/,'') ) {
          var $target = $(this.hash), target = this.hash;
          if (target) {
            var targetOffset = $target.offset().top;
            $(this).click(function(event) {
              event.preventDefault();
              $(scrollElem).animate({scrollTop: targetOffset}, 1000, function() {
                location.hash = target;
              });
            });
          }
        }
      });
      // use the first element that is "scrollable"
      function scrollableElement(els) {
        for (var i = 0, argLength = arguments.length; i <argLength; i++) {
          var el = arguments[i],
              $scrollElement = $(el);
          if ($scrollElement.scrollTop()> 0) {
            return el;
          } else {
            $scrollElement.scrollTop(1);
            var isScrollable = $scrollElement.scrollTop()> 0;
            $scrollElement.scrollTop(0);
            if (isScrollable) {
              return el;
            }
          }
        }
        return [];
      }
    });
    </script>

    Hope that helps anyone else with the same problem! And a huge thanks to the Catalyst Support team for finding it! I can't take any credit. :-)

  11. travellers
    Member
    Posted 1 year ago #

    Well done for getting it sorted and thanks for posting it back here, so anyone else experiencing problems can save themselves the pain!

  12. VIVA Design
    Member
    Posted 1 year ago #

    Hi

    I am having the same problem, when do I copy that code too.

  13. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    @VIVA Design - your theme is missing wp_footer

    http://codex.wordpress.org/Function_Reference/wp_footer

    Add it to fix.

  14. VIVA Design
    Member
    Posted 1 year ago #

    Thanks a lot :D

  15. jdyach
    Member
    Posted 9 months ago #

    I am having the same problem; Add to Cart button not showing for variable products. When switching to the default theme it works fine. I have tried so many suggested solutions that I can't even list them all. The site is using a custom theme that was developed for the site. The URL is http://www.8degreesplato.com/shop/. The t-shirts are the variable products. I am not sure what else information to post here, but any help would be greatly appreciated! Thanks.

  16. vark
    Member
    Posted 9 months ago #

    hi @jdyach,
    your site has a js error, actually pointing to a woo js file, which will prevent the variable products from working:

    Timestamp: 10/18/2013 10:18:27 PM
    Error: TypeError: this.on is not a function
    Source File: http://www.8degreesplato.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.js
    Line: 43

    What version of WP and Woo are you running?

  17. jdyach
    Member
    Posted 9 months ago #

    hi @varktech.com, I am running WP V 3.5.1. and Woo V 2.0.17

  18. vark
    Member
    Posted 9 months ago #

    hi @jdyach,
    You're up to date, and have already verified that the default theme works just fine. You've successfully localized the problem to your theme, so the issue will be best addressed with your theme developer - something in the theme JS is fighting with woo ...

    You can also play a bit with your site, and localize the issue further by removing one JS file at a time which comes from your theme. For example, you've got 2 JS files running in the front end which are marked as admin files...

  19. jdyach
    Member
    Posted 9 months ago #

    The template header.php was missing <?php wp_head(); ?>

    Ahh! So annoying!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic