Purchase Options

TryNow solutions for multiple purchase options.

Background

Some themes automatically show all selling plans associated with a product as radio buttons or a dropdown. This is embedded in the theme code.

What's next?

It is the merchant's choice to keep multiple options. For TryNow experiences, TryNow recommends hiding the TryNow option in the multiple-choice fields in order to maintain better insights on conversion.

Purchase Options and Radio Buttons

Merchants who have multiple selling plans on a product have a few options.

First Things First

Determine where multiple options are being rendered. Likely it is on a product template in some loop:

{% for selling_plan in group.selling_plans %}
  // ... the rest
{% endfor%}

📘

Hint

Every theme is different. The best way to locate this selling plans loop is to look for something related to a selling plan or a selling plan group on whatever template the options are rendered.

It could be {% if selling_plans.length > 1 %} for example or {% for selling_plan in group.selling_plans %} or {%- if product.selling_plan_groups.size > 0 -%}.

Identifying Selling Plan Code

There a few ways in which Purchase Options can be rendered. The most common are dropdowns and radio buttons.

If a theme is rendering TryNow or multiple purchase options, it is likely embedded in the theme code. TryNow recommends looking for something referring to selling_plan_groups that would display multiple options. See the below example:

{%- if product.selling_plan_groups.size > 0 -%}
  <div class="sellingPlan">
      <label for="plans">{{ 'product.selling_plan' | t }}</label>
      <select name="selling_plan" id="plans">
          <option value="">{{ 'product.one_time_purchase' | t }}</option>
          {%- for variant in product.variants -%}
          <optgroup label="{{ variant.title }}">
              {%- for allocation in variant.selling_plan_allocations -%}
              <option value="{{ allocation.selling_plan.id }}">
                  {{ allocation.selling_plan.name }}
              </option>
              {%- endfor -%}
          </optgroup>
          {%- endfor -%}
      </select>
  </div>
{%- endif -%}

This can be removed from the product page theme code to hide the purchase options, or just the TryNow purchase option can be hidden.

Hide all Purchase Options

To hide all the Purchase options if the product contains the TryNow selling plan

{%- if product.selling_plan_groups.size > 0 -%}
  {% assign try_before_you_buy_found = false %}
  {%- for variant in product.variants -%}
    {%- for allocation in variant.selling_plan_allocations -%}
      {% if allocation.selling_plan.name contains "Try Before You Buy" %}
        {% assign try_before_you_buy_found = true %}
      {% endif %}
    {%- endfor -%}
  {%- endfor -%}

  {% unless try_before_you_buy_found %}
    <div class="sellingPlan">
        <label for="plans">{{ 'product.selling_plan' | t }}</label>
        <select name="selling_plan" id="plans">
            <option value="">{{ 'product.one_time_purchase' | t }}</option>
            {%- for variant in product.variants -%}
              <optgroup label="{{ variant.title }}">
                {%- for allocation in variant.selling_plan_allocations -%}
                  <option value="{{ allocation.selling_plan.id }}">
                    {{ allocation.selling_plan.name }}
                  </option>
                {%- endfor -%}
              </optgroup>
            {%- endfor -%}
        </select>
    </div>
  {% endunless %}
{%- endif -%}

Hiding the TryNow Purchase Option

To hide only the TryNow purchase option in the radio buttons or in a drop down, once can check for the inclusion of the Try Before You Buy selling plan name in the list of selling plan names.

<div class="sellingPlan">
  <label for="plans">{{ 'product.selling_plan' | t }}</label>
  <select name="selling_plan" id="plans">
    <option value="">{{ 'product.one_time_purchase' | t }}</option>
    {%- for variant in product.variants -%}
    <optgroup label="{{ variant.title }}">
      {%- for allocation in variant.selling_plan_allocations -%}
        {% unless allocation.selling_plan.name contains 'Try' %}
          <option value="{{ allocation.selling_plan.id }}">
            {{ allocation.selling_plan.name }}
          </option>
        {% endunless %}
      {%- endfor -%}
    </optgroup>
    {%- endfor -%}
  </select>
</div>

This can be commented, deleted, or an if statement can be utilized to hide the TryNow selling plan only.