Skip to main content
All CollectionsShipping Rate Test
How to hide line item properties from your store
How to hide line item properties from your store

This article explains how to hide line item properties from store

Leo avatar
Written by Leo
Updated over 8 months ago

As a user of ABConvert, you may have noticed some text properties appearing on the orders or cart in your store after you enable the shipping script.

In the article, we will explain why this happens and how to hide them in your store.

What are line item properties?

Line item properties are used to collect customization information for an item added to the cart.

To learn more about line item properties, see the line_item object Liquid reference.

In ABConvert, line item properties of cart items are essential for performing shipping tests. They help identify which test group an order belongs to and whether it meets specific conditions for applying certain shipping rates. (If you are not testing shipping rate for now, you can simply disable the shipping test script.)

Imagine you set up a "Free shipping threshold" shipping test, our script needs to know the cart value via these properties so that it can decide whether to offer free shipping or not.

Why line item properties are displayed in your store?

By default, Shopify hides line item properties starting with _(underscore). However, there is no such mechanism for some custom themes or third-party apps.

How to hide line item properties through setting configuration?

Disable the shipping script if you are not running shipping tests

Disabling the shipping script is the simplest way to hide those properties.

  • Go to the settings page of ABConvert

  • Open theme embeds editor by hitting the button "Open theme settings"

  • Disable ABConvert shipping script and make sure you save the change before leaving this page

If you are running shipping tests, please check the instructions below to know how to hide properties in each part of your store.

Third-party app: Upcart

If you are using Upcart to conduct cart upsell in your store, you may find line item properties showing up on the page.

To hide those properties, simply go to the settings page of "cart Editor" in Upcart and check the advanced option Hide properties starting with single underscore "_".

Orders on the Shopify admin page

As Shopify's order page cannot be edited, please note that line item properties on the order page cannot be hidden.

How to hide line item properties by editing liquid files?

Basic knowledge of Shopify Liquid is required for this section.

You can follow these steps to hide those properties:

  1. Go to the template or snippet that shows line item properties

  2. Find the line of item properties for loop

    1. Example 1: {%- for p in properties -%}

    2. Example 2: {%- for property in item.properties -%}

  3. Add the condition to skip those properties

Here's an example within snippets/cart-drawer.liquid of Dawn theme.

Notification Emails

The default email templates in Shopify will hide line item properties of products. However, if your template is customized, you may see properties displayed in the emails.

You can follow these steps to hide them.

  • Go to “Settings“ page of your Shopify store

  • Click “Notifications“ in the side menu

  • Select the notification type of your email (We'll use customer notifications as an example here.)

  • Select the email template of your notification event. (We'll use order confirmation as an example here.)

  • Click “Edit code“ button on the top right corner to edit the email template.

  • Add the condition in the template to skip those properties in your template.

Package slip

  • Go to “Settings“ page of your Shopify store.

  • Click “Shipping and delivery“ in the side menu.

  • Scroll down on this page until you find the option “Packing slips“ and click “Edit template“.

  • Add the condition in the template to skip those properties in your template.

Cart drawer & Cart page

  • Go to the “Themes” page of the sales channel “Online Store“,

  • Click the action list and “Edit code“ to open up the code editor.

  • Find the liquid file of the cart drawer or cart page and edit it.

Please note that the name of the corresponding liquid file may be different across different themes.

Common liquid file path

  • Cart drawer: Sections/cart-drawer.liquid

  • Cart page: Sections/cart.liquid, Sections/main-cart-items.liquid,

Conclusion

To hide line item properties generated by ABConvert's shipping script, you can disable the script, adjust the settings of third-party apps like Upcart, or edit liquid files in your theme.

If you have any questions about this topic, please don't hesitate to contact our support team.

Did this answer your question?