Announcement

Collapse
No announcement yet.

Inventory Popup Message Issue with Inventory Variants

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

    Inventory Popup Message Issue with Inventory Variants

    The store owner is having a two-fold issue with the Add to Cart button on the PROD page. The have inventory variants set up (with quantities assigned to each one). But in order to get the Add to Cart button to display, they have also activated the Product Inventory level. Without it activated the Add to Cart button displays Out of Stock no matter which attribute is selected but the customer can still add to cart (although they may not realize it). If a quantity more than what is available is entered and attempted to be added the popup message will display the Product Level quantity. I did try testing with the Product Level Inventory unassigned and the popup message wasn't able to display the quantity available.

    I seem to recall similar issues with the Add to Cart button not displaying the correct message as needed and I'll go dig around to see if I can find that. I don't recall anything about the AJAX Add To Cart function not displaying the correct inventory level (which actually gets the level from
    Code:
    $('#currentStock').val(result.inv_available);
    ) Can the result.inv_available be changed? If so, to what?
    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
    Hi Leslie,

    That line of script is not from the default Suivant code. However, in looking at the code, the Google Rich Snippets section of the PROD page may hold a clue to the add to cart issue since Suivant would probably still be relying on product based inventory levels and not variants.
    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


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

      That line of script is not from the default Suivant code. However, in looking at the code, the Google Rich Snippets section of the PROD page may hold a clue to the add to cart issue since Suivant would probably still be relying on product based inventory levels and not variants.
      It looks like it may have been added for a Wait List (Tess's). But if Suivant relies on product based inventory levels this may all be a moot point.
      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
        As for the Add to Cart button - it too looks like it runs off the Product Inventory level and not the Inventory Variant levels:

        Code:
        <mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code_WithRuntimeInventory( l.settings:product:code, l.settings:prod )" />
        <mvt:if expr="l.settings:prod:inv_available GT 0">
        <input type="submit" value="Add to Cart" id="js-add-to-cart" class="button button-block button-square uppercase add-to-cart bg-aqua bold" />
        <mvt:else>
        <input type="submit" value="Out of Stock" id="js-add-to-cart" class="button button-block button-square uppercase add-to-cart bg-grey bold" style="background-color: #e5e5e5 !important;" disabled="disabled" />
        </mvt:if>
        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


          #5
          Hi Leslie,

          You might try changing that IF statement to:
          Code:
          l.settings:product:inv_level NE 'out'
          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