WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Add to cart button not showing up when selecting "Variable Product.

[Resolved] Add to cart button not showing up when selecting "Variable Product.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author royho

    @royho

    Can’t view your site, its under maintenance.

    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.

    Plugin Author royho

    @royho

    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.

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

    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!

    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.

    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?

    I’m using Catalyst/Dynamik and I do have the Catalyst Connect plugin activated on there. Thanks for any help! 🙂

    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. 🙂

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

    Hi

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

    Plugin Author Mike Jolley

    @mikejolley

    @viva Design – your theme is missing wp_footer

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

    Add it to fix.

    Thanks a lot 😀

    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.

    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?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] Add to cart button not showing up when selecting "Variable Product.’ is closed to new replies.