SOLD OUT button not displaying

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9290

    #16
    Originally posted by Matt Zimmermann View Post
    Hi Leslie,

    It would appear that the value attribute for your button is being removed, most like because of the version of out of stock function you are using. If you add data-value="Add to Cart", the display should come back.
    If I add the value data-value="Add to Cart" what happens when it's Sold Out? I seem to recall this is dynamically generated at least in other ReadyThemes, yes?
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest

    Comment

    • Matt Zimmermann
      Mega Mivite










      • Apr 2008
      • 2482

      #17
      It is controlled through the outofstock function
      Matt Zimmermann

      Miva Web Developer
      Alchemy Web Development
      https://www.alchemywebdev.com
      Site Development - Maintenance - Consultation

      Miva Certified Developer
      Miva Professional Developer

      https://www.dev4web.net | Twitter

      Comment

      • lesliekirk
        Super Moderator











        • Aug 2008
        • 9290

        #18
        Originally posted by Matt Zimmermann View Post
        It is controlled through the outofstock function
        Code:
         
         // ---- Update Button For "Out Of Stock" ---- // function outOfStock () { var button = $('#js-add-to-cart'), buttonText = button.val();  if (button.is(':disabled') == true) { button.addClass('bg-gray').val('Sold Out'); } else { button.removeClass('bg-gray').val(buttonText); }; }; outOfStock ();
        Okay, I reverted the code back, I have the Add to Cart back. Back to not displaying the Sold Out when the inventory level is 0:





        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: X | Facebook | Pinterest

        Comment

        • Matt Zimmermann
          Mega Mivite










          • Apr 2008
          • 2482

          #19
          I would recommend contacting support so they can access the administration portal to review all the settings.
          Matt Zimmermann

          Miva Web Developer
          Alchemy Web Development
          https://www.alchemywebdev.com
          Site Development - Maintenance - Consultation

          Miva Certified Developer
          Miva Professional Developer

          https://www.dev4web.net | Twitter

          Comment

          • lesliekirk
            Super Moderator











            • Aug 2008
            • 9290

            #20
            Thanks Matt, I just did.
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: X | Facebook | Pinterest

            Comment

            • sjattwood
              Mivite Lite

              • Jan 2017
              • 5

              #21
              Was a solution ever found for this? I'm having the same issue.

              Comment

              • hmendenhall
                Mivite

                • Nov 2014
                • 108

                #22
                Update the Add to cart input on the Product Display Layout template

                Suivant Readytheme FIX:

                <mvt:if expr="( l.settings:product:inv_level EQ 'out' )">
                <input type="submit" value="Add to Cart" data-value="Add to Cart" id="js-add-to-cart" class="button button-block uppercase add-to-cart bg-teal bold" disabled />
                <mvt:else>
                <input type="submit" value="Add to Cart" data-value="Add to Cart" id="js-add-to-cart" class="button button-block uppercase add-to-cart bg-teal bold" />
                </mvt:if>


                Coustic Readytheme FIX:

                <mvt:if expr="( l.settings:product:inv_level EQ 'out' )">
                <input type="submit" value="Add to Cart" data-value="Add to Cart" id="js-add-to-cart" class="button button-medium uppercase add-to-cart button-pill" disabled />
                <mvt:else>
                <input type="submit" value="Add to Cart" data-value="Add to Cart" id="js-add-to-cart" class="button button-medium uppercase add-to-cart button-pill" />
                </mvt:if>
                Happie Mendenhall
                Support Technician
                Miva, Inc.

                Comment

                • sjattwood
                  Mivite Lite

                  • Jan 2017
                  • 5

                  #23
                  Thank you. Unfortunately, the Coustic snippet is the code already in the PROD display layout.

                  Comment

                  • sjattwood
                    Mivite Lite

                    • Jan 2017
                    • 5

                    #24
                    Update: Changing 'Track Low Stock Level' from 'Default' to 'No' makes the greyed out button appear when Inventory is 0. That solved my problem.

                    Comment

                    • lesliekirk
                      Super Moderator











                      • Aug 2008
                      • 9290

                      #25
                      I realize I started this for the Suivant ReadyTheme but I'm having a similar issue with Iron & Wool. I created a new PROD page template, I copied everything over from a working PROD page template, I changed the body ID to body id="PROD" but the words "SOLD OUT" do not appear on the copy. The button is grayed out but no text on the button change. So why would it work on the on the page template and not this one? I changed the body ID so that the javascript would work for the page. This has me truly baffled.
                      Leslie Kirk
                      Miva Certified Developer
                      Miva Merchant Specialist since 1997
                      Previously of Webs Your Way
                      (aka Leslie Nord leslienord)

                      Email me: [email protected]
                      www.lesliekirk.com

                      Follow me: X | Facebook | Pinterest

                      Comment

                      • lesliekirk
                        Super Moderator











                        • Aug 2008
                        • 9290

                        #26
                        I figured it out - it should have been js-PROD that I changed it to. <mvt:doh>It works now</mvt:doh>
                        Leslie Kirk
                        Miva Certified Developer
                        Miva Merchant Specialist since 1997
                        Previously of Webs Your Way
                        (aka Leslie Nord leslienord)

                        Email me: [email protected]
                        www.lesliekirk.com

                        Follow me: X | Facebook | Pinterest

                        Comment

                        Working...
                        X