GitHub

Shopify

The @daffodil/navigation Shopify driver connects your storefront's navigation menus to your Shopify store using the Shopify Storefront API to retrieve collection-based navigation structures.

Features

  • Collection-based navigation: Builds navigation trees from Shopify collections
  • GraphQL integration: Uses Shopify Storefront API for efficient data fetching

Prerequisites

Before using the Shopify navigation driver, ensure you have:

  • A Shopify store with Storefront API enabled
  • A valid Storefront API access token
  • Collections configured in your Shopify admin

Usage

import { ApplicationConfig } from '@angular/core';
import { provideRouter } from '@angular/router';
import { provideHttpClient } from '@angular/common/http';
import { provideDaffShopifyDriver } from '@daffodil/driver/shopify';
import { provideDaffNavigationShopifyDriver } from '@daffodil/navigation/driver/shopify';

export const appConfig: ApplicationConfig = {
    providers: [
        provideRouter(routes),
        provideHttpClient(),
        provideDaffShopifyDriver({
            domain: 'https://your-shopify-store.myshopify.com',
            accessToken: 'YOUR_STOREFRONT_ACCESS_TOKEN'
        }),
        provideDaffNavigationShopifyDriver(),
    ],
};