Skip to main content
All CollectionsGetting started
Enabling Zapiet - Product Options on your theme
Enabling Zapiet - Product Options on your theme
Jelizaveta avatar
Written by Jelizaveta
Updated over a week ago

Zapiet - Product Options offers two app blocks: the product options app block for the product page, and the cart page app block for the cart page.

The product options app block must be enabled for our app to work correctly.

The cart options app block is optional, and requires additional changes to the theme file to work as expected.


Requirements

  • To enable the app block, you will need to have permission to manage apps from the store owner.

  • To enable the app block, you need to be using an Online Store 2.0 theme. We do not support legacy themes.


Enable the product options app block

The product options app block will allow your customers to select options on the product pages of your store.

  1. In Zapiet - Product Options, click Settings.

  2. In the Themes section, select the theme you would like to edit.

    • We recommend enabling our app on a duplicate theme first.

  3. In the Product options app block section, click Enable.

  4. This will open the Customize settings on your theme and enable the app block.

  5. You can change the placement of the app block according to your business needs.

  6. Click Save.

The product options app block will now be visible on your store. Before testing, make sure you have created both options and option sets.

If you enabled the app block on a duplicate theme, publish the theme after testing, so your customers can select product options on your store.


Enable the cart page app block

The cart page app block will allow your customers to make changes to the options they've selected directly on the cart page.

  1. In Zapiet - Product Options, click Settings.

  2. In the Themes section, select the theme you would like to edit.

    • We recommend enabling our app on a duplicate theme first.

  3. In the Cart page app block section, click Enable.

  4. This will open the Customize settings on your theme and enable the app embed.

  5. Click Save.

After you've enabled the app embed, you need to edit the code in your theme.


Edit your theme

If you're not comfortable editing the code, please let us know on chat, and we will be happy to help!

  1. Go to Online Store > Themes, expand the menu next to the theme you want to edit, then click Edit code.

  2. Open the liquid file for the cart page.

    • Commonly, cart related files are located in: templates (for example, cart.liquid), sections (for example, cart-template.liquid) or snippets for reusable code snippets related to the cart (for example, cart-item.liquid).

  3. Look for this snippet in the code.

    {%- for property in item.properties -%}
    {%- assign property_first_char = property.first | slice: 0 -%}
    {%- if property.last != blank and property_first_char != '_' -%}
    <div class="product-option">
    <dt>{{ property.first }}: </dt>
    <dd>
    {%- if property.last contains '/uploads/' -%}
    <a href="{{ property.last }}" class="link" target="_blank">
    {{ property.last | split: '/' | last }}
    </a>
    {%- else -%}
    {{ property.last }}
    {%- endif -%}
    </dd>
    </div>
    {%- endif -%}
    {%- endfor -%}

  4. Add this line of code below to create a new class.

    <div class ="edit-cart-options-button-container" id="{{ item.id }} </div>

  5. Open the liquid file for the cart drawer.

    • Look in the sections or snippets for files that might be related to the cart drawer. Common file names include: cart-drawer.liquid, cart.liquid, drawer-cart.liquid, mini-cart.liquid.

  6. Look for this snippet in the code.

     {%- for property in item.properties -%}
    {%- assign property_first_char = property.first | slice: 0 -%}
    {%- if property.last != blank and property_first_char != '_' -%}
    <div class="product-option">
    <dt>{{ property.first }}: </dt>
    <dd>
    {%- if property.last contains '/uploads/' -%}
    <a href="{{ property.last }}" class="link" target="_blank" aria-describedby="a11y-new-window-message">
    {{ property.last | split: '/' | last }}
    </a>
    {%- else -%}
    {{ property.last }}
    {%- endif -%}
    </dd>
    </div>
    {%- endif -%}
    {%- endfor -%}

  7. Add this line of code below to create a new class.

    <div class ="edit-cart-options-button-container" id="{{ item.id }} </div>

  8. Click Save.

Now your customers will be able to edit the options they've selected directly on the cart page.

If something went wrong, and you can't edit the selected options on the cart page, please let us know on chat!

Did this answer your question?