Top

Remove "- 1" from "1 - 1" in the Quantity Breaks Grid

To replace text or characters in the quantity breaks grid, follow these steps:

  1. From "Shopify 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:
    <script>
    
    var has_changed = false;
    
    $('#shappify-qty-msg').on('DOMNodeInserted', function(e) {
    if(has_changed==false){
    has_changed = true;
    
    var newtext = $(".shappify_qb_grid:visible tbody").children(":first-child").children(":first-child").text().replace('- 1', '');
    
    $(".shappify_qb_grid:visible tbody").children(":first-child").children(":first-child").text(newtext); 
     } 
    });
    </script>

    copy and paste this code 

  6. Select Save.

    select save 

That's it!

Next Steps:

Blog Posts: