Make a selection

Replace Text or Characters in the Quantity Breaks Grid

Laurel
Laurel
  • Updated

In Quantity Breaks, you can replace text or characters which already appear in the Quantity Breaks grid with text of your own. To do this, please follow the steps below.

Alert

  • The Quantity Breaks (standalone) app is no longer available for new installations. If you are currently using Quantity Breaks, you will be able to continue using the app on a grandfathered plan.
  • New requests for Quantity Breaks will be directed to Custom Pricing. Custom Pricing's Select plans can be used to create quantity breaks. For more information on pricing, please visit Custom Pricing Overview.
  • If you'd like move from Quantity Breaks (standalone) to Custom Pricing, please visit Switch from Quantity Breaks to Custom Pricing.

 


 

Setup

  1. From Shopify's admin, select Online Store.
  2. Select Actions.

    Actions

  3. Select 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: Replace "replacethis" with the code that you want to change. Replace "withthat" with the text you want to replace it with.

    <script>
    
    var has_changed = false;
    
    $('#shappify-qty-msg').on('DOMNodeInserted', function(e) {
    if(has_changed==false){
    has_changed = true;
    $('#shappify-qty-msg td').each(function(){
    var new_text = $(this).text().replace('replacethis', 'withthat');
    $(this).text(new_text);
    });
    }
    });
    </script>

    add code to bottom of file

  6. Select Save.