Preventing "Hidden" Line Item Properties from Displaying on Your Store

Follow
 

 

If you use Giftship's, or Multiship's shipping to multiple address process, then navigate back to the cart page, you may notice some strange characters. Here is how to prevent them from displaying on your store.

 

The "_gs_master_reference", and "_gs_r" properties seeing here are referred to as "hidden" line item properties, since they start with an underscore. They are hidden during the Shopify checkout, and themes usually have the code built in to ensure that these are not displayed, but sometimes this needs to be added in manually.

 

To fix this, all we need to do is add a condition to the line item property loop in your cart.liquid template:

 

Find this line:

{% for p in item.properties %}

 

and paste this directly beneath it:

{% if p.first.first == "_" %}{% continue %}{% endif %}
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.