Shopifex v0.3.5 API Reference

Modules

Welcome to Shopifex!

Configuration (All configuration options are required)

  • :app_name - This gets used in the Shopifex provided app installation page
  • :repo - The Ecto.Repo for your application
  • :shop_schema - Your Ecto.Schema that must have :url, :scopes, and :access_token properties. This is used to install and load stores into the session
  • :redirect_uri - The redirect URI used in the Shopify app installation process. Must be whitelisted in your Shopify app configuration
  • :reinstall_uri - The redirect URI used in the Shopify app reinstallation process. Must be whitelisted in your Shopify app configuration
  • :api_key - Your Shopify app's API key
  • :secret - Your Shopify app's secret
  • scopes - Shopify OAuth scopes which your application requires
  • :webhook_uri - When webhooks are created by Shopifex, this is used as the webhook endpoint
  • :webhook_topics - Topics to subscribe to after installation is complete

Example

Context behaviour responsible for fetching and using payment grants.

Fetches the flash in a way which maintains the session within Shopify iFrame

Ensures that a valid store is currently loaded in the session and is accessible in your controllers/templates as conn.private.shop

This module acts as the context for any database interaction from within the Shopifex package.

The entrypoint for shopifex web interface, such as controllers, views, channels and so on.

You can use this module inside of another controller to handle initial iFrame load and shop installation

Include body_reader: {ShopifexWeb.CacheBodyReader, :read_body, []} in your endpoint.ex file in Plug.Parser options

Conveniences for translating and building error messages.

A module providing Internationalization with a gettext-based API.

You can use this module inside of another controller to handle initial iFrame load and shop installation

You can use this module inside of another one of your application controllers. The conn, shop and topic will be called by handle_topic/3 which you can define in your parent controller.