Add "ea" (or Other Text) after each Price in the Quantity Breaks Grid

Follow

To have the last row show "and more", follow these steps:

  1. From Shopify's admin, select Online Store.

    select online store

  2. Select Actions.

    Actions

  3. Select Edit code.

    Edit code

  4. Under "Templates", select product.liquid.

    Note: If your theme contains sections, you may have to make these changes in a different file, like product-template.liquid under "Sections".

    select product.liquid

  5. Add this code to the bottom of the file:

    Note: If you wanted to add something instead of "ea", replace "ea" with the text that you want to use.

    <script> 
    window.done = false;
    $(document).ready(function(){$('#shappify-qty-msg').on('DOMNodeInserted', function(e) {
    if (window.done == false ) { 
    window.done = true;
    
    $( ".shappify_qb_grid tr td:nth-of-type(2)" ).each(function() {
     $(this).html($(this).html() + " ea");
    });
    
    }
    });
    });
    </script>

    copy and paste the code

  6. Select Save.

    select save

That's it!

Next Steps:

Blog Posts:

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.