Line item properties are used when you need to attach information to cart line items without the need for creating Shopify variants. It can be a great way to gather additional information that can be seen when viewing the order in Shopify.

In this example, we will set up custom properties for an Upsell Wizard offer which will capture the day of the week that the customer wants to pick up their purchase.

Note: This utilizes our code editor in the edit offer window.

The first step is to set up an offer in the app that you want to apply custom properties. In this case, we have set up a cross-sell series offer.

Now we will use the Code Editor to apply a dropdown for the days of the week. The region highlighted in yellow shows the additional code added to display the custom options.

Code template:

{# Custom properties #}

{# Required values #}
{% set customProperties = "UW_CUSTOM_PROPERTIES_" ~ %}
{% set customKey = "UW_CUSTOM_KEY_" ~ %}
{% set customSelect = "UW_CUSTOM_SELECT_" ~ %}
{# Required values #}

<div id="{{ customProperties }}">
<label id="{{ customKey }}" class="day">Pick a day</label><br>
<select class="form-control" id="{{ customSelect }}">
<option value="monday">Monday</option>
<option value="tuesday">Tuesday</option>
<option value="wednesday">Wednesday</option>


You will notice that there are required values that must be present for the custom properties to be captured. The <label> "class" will equal the title of the custom property. In this case, it is "day" since we are capturing the day of the week. The multiple <option> elements indicate the different options with the "value" property being the value that will be displayed for the line item when viewing the order.

After you have set up the desired options it is time to save the changes and examine the results:

The offer now displays the custom options and the customer can pick a day that will transfer over to the order.

The Shopify order:

Please let us know if you have any questions. We're happy to help!

The Upsell Wizard Team

Did this answer your question?