Beautiful apps for Shopify

Appmate Objects

Since Appmate templates are rendered in the browser, it's important to understand that you cannot access all Shopify Objects in your Appmate templates. We have tried to keep our data structure as similar to Shopify's data as we can. If you do encounter differences we would greatly appreciate if you could drop us a line.

Wishlists

It's a collection of wishlist objects. The first wishlist is always the default one.

Currently we don't support multiple wishlists, but it's coming very soon.

{% for wishlist in wishlists %}
    {{ wishlist.title }}
{% endfor %}

Wishlist

wishlist.id

The id of the wishlist.

<a href="#"
   data-wishlist="{{ wishlist.id }}"
   class="wishlist-clear-button">Clear Wish List</a>

wishlist.item_count

The number of products in this wishlist.

Your wishlist contains {{ wishlist.item_count }} items.

wishlist.products

It's a collection of the wishlist products.

{% for product in wishlist.products %}
    {{ product.title }}
{% endfor %}

wishlist.state

A string that represents the wihlist state (filled or empty), which is useful for css classes.

<a href="{{ wishlist.url }}" class="wk-link wk-{{ wishlist.state }}" title="View Wishlist">
    Wishlist
</a>

wishlist.url

A url handle for the wishlist. You can change this by setting the handle option.

<a href="{{ wishlist.url }}" class="wishlist">Wishlist</a>

Product

The Product object contains all the properties from Shopify's Product Object and adds the following for greater convenience.

product.in_wishlist

A boolean that indicates if the product is added to a wishlist.

<a href="#"
   class="wishlist-toggle-button"
   data-product="{{ product.id }}">{% if product.in_wishlist %}Remove from wish list{% else %}Add to wish list{% endif %}</a>

product.selected_variant_id

The products selected variant id. This is required for implementing variant selection in the wishlist page.

product.wishlist_item_id

This id references the wishlist item. An is required when updating or removing a wishlist product.

<a href="#"
   class="wishlist-remove-button"
   data-wishlist-item="{{ product.wishlist_item_id }}">Remove from wish list</a>

product.wishlist_state

A string that represents the products wihlist state (added or not-added), which is useful for css classes.

<button type="button" class="wk-button-toggle wk-product-{{ product.wishlist_state }}">
    Wishlist
</button>