PHPackages                             devkai/craft-shopify-resource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. devkai/craft-shopify-resource

ActiveCraft-plugin[API Development](/categories/api)

devkai/craft-shopify-resource
=============================

shopify-resource reference field via storefront api

1.0.2(6y ago)013[10 PRs](https://github.com/toyflish/craft-shopify-resource/pulls)MITPHP

Since Feb 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/toyflish/craft-shopify-resource)[ Packagist](https://packagist.org/packages/devkai/craft-shopify-resource)[ RSS](/packages/devkai-craft-shopify-resource/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (12)Used By (0)

craft-shopify-resource plugin for Craft CMS 3.x
===============================================

[](#craft-shopify-resource-plugin-for-craft-cms-3x)

shopify-resource reference field via storefront api

store shopify storefront id in craft field with dropdown using shopify storefront api

use shopify products and collecitons in craft fields, highly inspired by [nmaier95/craft-shopify-product-fetcher](https://github.com/nmaier95/craft-shopify-product-fetcher) but using the shopify storefront api, therefore ids compatible with [shopify buy sdk](https://github.com/Shopify/js-buy-sdk)

- send custom graphql queries to get resized images from shopify
- async clientside queries in cp do not slow down cp rendering with mutliple product fields

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require toyflish/craft-shopify-resource

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for craft-shopify-resource.

craft-shopify-resource Overview
-------------------------------

[](#craft-shopify-resource-overview)

adds a shopify resource select field to your control panel

Configuring craft-shopify-resource
----------------------------------

[](#configuring-craft-shopify-resource)

expects storefront-api credentials and locale settings to enable queries to the new shopify mutlilanguage api

```
return [
    'accessToken' => getenv('SHOPIFY_ACCESS_TOKEN'),
    'hostname' => getenv('SHOPIFY_HOSTNAME'),
    'hostnameOverwrite' => getenv('SHOPIFY_HOSTNAME_PUBLIC'),
    'locale' => 'en'
];

```

Using craft-shopify-resource
----------------------------

[](#using-craft-shopify-resource)

you can use the plugin provided query (simular to shopify buy sdks product query) or submit a custom query setup in twig

```

    Entry resource field with handle myResource
    shopify storefront id: {{entry.myResource}}

    use product query provided by plugin
    {%  set myResourceProduct  = craft.storefront.productById(entry.myResource) %}

    {% if myResourceProduct %}
        title : {{ myResourceProduct.title }}
    {% else %}
        myResource product not found
    {% endif %}

    Custom Query: list of products
    {% set query %}
        query searchProducts($term: String) {
            products(first: 250, query: $term) {
                edges {
                    node {
                        id
                        title
                    }
                }
            }
        }
    {% endset %}
    {% set productsResult = craft.storefront.query(query)['products']['edges'] %}
    {% if productsResult|length %}
        Product list
        {% for product in  productsResult|map(product => product.node) %}
            {{ product.title }}
        {% endfor %}
    {% endif %}

```

Brought to you by [devkai](https://toyflish.com)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2268d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12173370?v=4)[devkai](/maintainers/devkai)[@DevKai](https://github.com/DevKai)

---

Top Contributors

[![toyflish](https://avatars.githubusercontent.com/u/13130?v=4)](https://github.com/toyflish "toyflish (9 commits)")

---

Tags

cmsCraftcraftcmscraft-plugincraft-shopify-resource

### Embed Badge

![Health badge](/badges/devkai-craft-shopify-resource/health.svg)

```
[![Health](https://phpackages.com/badges/devkai-craft-shopify-resource/health.svg)](https://phpackages.com/packages/devkai-craft-shopify-resource)
```

###  Alternatives

[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[craftpulse/craft-typesense

Craft Plugin that synchronises with Typesense

122.7k](/packages/craftpulse-craft-typesense)[jsmrtn/craftagram

Grab Instagram content through the Instagram API

141.3k](/packages/jsmrtn-craftagram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
