Top

Remove Customer Specific Pricing Tag Names from Product and Cart Pages

To remove the Customer Specific Pricing tag names from the product and cart pages, follow these steps: 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Select Actions 

  3. Select Edit code.

    Select Edit code 

  4. Under "Layout", select theme.liquid.

    select theme.liquid 

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

    <script> 
    
    jQuery(window).bind("load", function () { 
    
    $.each($('.single-option-selector option'), function(index, obj){ 
    if(typeof(bold_option_clean_names)==='object' && typeof(bold_option_clean_names[$(obj).text()])!='undefined') 
    $(obj).text(bold_option_clean_names[$(obj).text()]); 
    }); 
    
    }); 
    
    </script>

    add this code 

    Note: The above code removes the tags from the variant selectors on the product page. The following steps remove the tags from the variant titles on the cart page.

  6. Select Save.

    select save 

  7. Under "Templates", select cart.liquid.

    Note: If your theme contains sections, you may have to look under "Sections" in cart-template.liquid instead.

    select cart.liquid 

  8. Find the line:

    {% for item in cart.items %}

    find this line 

  9. Copy and paste this code directly under it:

    {% assign strip_tag = item.variant.metafields.shappify_csp.csp_tag | append: ')' |  prepend: '(' %}

    copy and paste this code 

  10. Find the line like this:

    <a href="{{ item.product.url }}">{{ item.title | escape }}

    find this line 

  11. Add this code to the line:

    | remove: strip_tag

    The result should look similar to this:

    <a href="{{ item.product.url }}">{{ item.title | escape | remove: strip_tag  }}

    add the code 

  12. Select Save.

    select save 

That's it!

Next Steps