Announcement

Collapse
No announcement yet.

Variant Inventory Message

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

    Variant Inventory Message

    We use radio buttons for our variants and hide out of stock variants. If all variants are out of stock would like a inventory message that displays "This Product is Out of Stock".

    I am using <mvt:if expr="l.settings:attributemachine:product:inv_leve l EQ 'out'">
    <div><span class="inventory-message-button">This Product Is Currently Out of Stock</span></div></mvt:if>

    However, if just one variant is in stock the message still displays, of course. Is there a way to to do this conditional only if all variants are out of stock?

    #2
    I believe the only way to do this still is to track inventory at the main product level. You then add the variants as part products to the master so when you sell one it subtracts from both.
    Mark Hood
    Vermont Gear

    Comment


      #3
      Thanks for the suggestion Mark. It seems to work for a second. The out of stock message flashes for a moment then no longer displays.

      Comment


        #4
        As far as I know, the way to real with inventory message display would be to have the message containing element always on the page and linked to Attribute Machine. This is how it is set up in the newer release of Shadows.

        Code:
        <div id="inventory-message" class="x-messages x-messages--info x-product-layout-purchase__inventory-message">&mvt:product:inv_long;</div>
        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
          Thanks for the reply Matt. That is what I have and it works every where else except when all variants of a product are sold out.

          Comment


            #6
            If the master product is not set to track inventory, the variants are out of stock and using the default inventory settings, and the site is globally set to track inventory and track out of stock, then the product page should display that they are out of stock. Maybe someone from Miva will chime in, but if not, I would contact support.
            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