Announcement

Collapse
No announcement yet.

PROD Page Sold Out button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PROD Page Sold Out button

    Is there an ability to have the button display 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: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    When I've done this, in Iron and Wool RT, I needed to play around with the functions in "scripts.js" (I think it was). But, it might have also required some JQuery on the PROD page.

    There is other background. It was a more complex integration scenario with my WAITLIST module that needed to work much like swatch-style functions. Maybe all you need to do is a conditional that will replace the button when inventory is zero. As we all know, it's rarely that simple though aye?

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    Comment


      #3
      Originally posted by ids View Post
      When I've done this, in Iron and Wool RT, I needed to play around with the functions in "scripts.js" (I think it was). But, it might have also required some JQuery on the PROD page.

      There is other background. It was a more complex integration scenario with my WAITLIST module that needed to work much like swatch-style functions. Maybe all you need to do is a conditional that will replace the button when inventory is zero. As we all know, it's rarely that simple though aye?

      Scott
      Same here - but I did a search through the scripts.js for Shadows and didn't find anything similar. I was thinking that these things would have been included...
      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: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Nothing comes baked into Shadows to toggle a text change when a product/variant is out of stock. Instead, the default functionality of setting the button to disabled takes place. Having the ability to change the text has been added to the list of possible extension. https://github.com/mivaecommerce/Extensions/projects/1
        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


          #5
          Can't you use something like this?

          <mvt:if expr="l.settings:attributemachine:product:inv_avai lable EQ 0">
          <input class="c-button c-button--full c-button--huge u-bg-gray-40 u-color-white u-text-bold u-font-small u-text-uppercase" data-action="&mvte:urls:BASK:auto;" data-hook="add-to-cart" data-value="Add To Cart" type="submit" value="SOLD OUT">
          <mvt:else>
          <input class="c-button c-button--full c-button--huge u-bg-gray-40 u-color-white u-text-bold u-font-small u-text-uppercase" data-action="&mvte:urls:BASK:auto;" data-hook="add-to-cart" data-value="Add To Cart" type="submit" value="Add to Cart">
          </mvt:if>

          Not sure if you're looking for something more robust.

          Comment


            #6
            Unfortunately, that would only work for products not using attributes since the MVT statement will only run on page load.
            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


              #7
              Originally posted by Matt Zimmermann View Post
              Nothing comes baked into Shadows to toggle a text change when a product/variant is out of stock. Instead, the default functionality of setting the button to disabled takes place. Having the ability to change the text has been added to the list of possible extension. https://github.com/mivaecommerce/Extensions/projects/1
              What about for Levels? Should I ask this same question there (if I haven't already)?
              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: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Hi Leslie,

                The Legacy ReadyThemes, like Levels, usually came with a JavaScript function for his. Look in you scripts.js file for Update Button For "Out Of Stock".
                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


                  #9
                  Hi Matt,

                  In previous Readytheme, there is a function under the jsPROD to listen to events . Do we have this in the new Shadow Readytheme? I like to implement the WAITLIST the same way. If not, any recommendation on how to incorporate the WAITLIST function into the Prod page?


                  MivaEvents.SubscribeToEvent('variant_changed', function(product_data) {
                  gallery.length = 0;
                  mainImageZoom.attr('data-index', 0);
                  thumbnailIndex = 0;
                  updateWaitlist(product_data);
                  inventoryMessage();
                  outOfStock();
                  selectedSwatch();
                  });

                  Comment


                    #10
                    While Shadows doesn't ship with that function included in the theme.js file, you can add it and it will work as expected.
                    Code:
                    MivaEvents.SubscribeToEvent('variant_changed', function (product_data) {
                        /* Your Code Here */
                    });
                    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

                    Working...
                    X