Beautiful apps for Shopify

Configuration

The appmate toolkit requires a few settings to be made on initialisation. The default templates we provide are already setup to work and don't require any modifications. In some cases however you might want to change or extends certain things to better suit your needs.

Configuration options are set on initialisation, which happens by default in snippets/appmate-apps.liquid. The default configuration looks like this.

Appmate.init({
    app: {
        autoLoad: true
    },
    shop: {
        domain: '{{ shop.domain }}'
    },
    session: {
        customer: '{{ customer.id }}',
        cacheScripts: true,
        expiration: 14
    },
    wishlist: {
        loginRequired: false,
        handle: '/pages/wishlist'
    },
    globals: {
        settings: {{ settings | json }},
        cookie_policy_handle: '{{ pages.cookie-policy.handle }}'
    }
});

app.autoload

Should the toolkit automatically load it's data on startup or not. We strongly recommend to leave this option enabled. If you for some good reason decide to disable this option, you have to call Appmate.load() manually.

shop.domain

Your shops domain is required to connect the application. Never change this value!

session.customer

This settings is required if you want your customers wishlists to be permanently saved when they login. We highly recommend to not change this setting.

session.cacheScripts

Should the toolkit be cached in the users local storage. This is required for a seamless shopping experience and should not be disabled unless you have a very good reason to do so.

session.expiration

When users are not logged in, their data will be temporarily stored in their browser. This values defines after how many days the data gets discarded. Think of it as: for how many days will a wishlist exist, if the user is nor logged in. Wishlists of logged in users will never expire!

wishlist.loginRequired

Set this value to true if you want to force your users to login before they can use the wishlist. We personally think that everyone should be allowed to have wishes. You can still recommend them to login or create an account if they want to permanently store their wishlists.

wishlist.handle

This options sets the handle that's used to show a customers wishlist. If have choosen to not use the handle wishlist, when you installed Wishlist King, this is the place to update accordingly in order to have wishlist.url return the right url in your templates.

globals

Appmate templates run client side and even thought they look a lot like your theme files, they don't have access to the same data. This setting is intended to pass data from Shopify to Appmate templates. Anything you set here will be available in your client side Appmate templates. We usually pass the settings object here so that your client side templates can be configured just like the server side templates.

Once set in the globals configuration you can access the values in your Appmate templates.

{% if settings.products_per_row == '3' %}{% assign span_size = 'span4' %}{% endif %}
{% if settings.products_per_row == '4' %}{% assign span_size = 'span3' %}{% endif %}