💸
Shopify
  • Modular Shopify Storefront
  • Supported Features
  • Architecture
    • Modularity
    • Extensibility
    • Structure
    • Framework
    • Documentation
    • Typings
  • Solutions
    • SortedMap & SortedRenderMap
    • Query Controller
  • Packages
    • @scandipwa/shopify-checkout
      • Internal Structure
    • @scandipwa/shopify-checkout-line-items
      • Internal Structure
    • @scandipwa/shopify-checkout-web
      • Internal Structure
    • @scandipwa/shopify-collections
      • Internal Structure
    • @scandipwa/shopify-collections-products
      • Internal Structure
    • @scandipwa/shopify-customer
      • Internal Structure
    • @scandipwa/shopify-product-tags
      • Internal Structure
    • @scandipwa/shopify-product-variants
      • Internal Structure
    • @scandipwa/shopify-products
      • Internal Structure
    • @scandipwa/shopify-shop
      • Internal Structure
Powered by GitBook
On this page
  • Class ShopQuery
  • Method _getShopFields
  • Function processShop
  • Class ShopProvider
  • Method getContextValue

Was this helpful?

  1. Packages
  2. @scandipwa/shopify-shop

Internal Structure

Previous@scandipwa/shopify-shop

Last updated 4 years ago

Was this helpful?

Class ShopQuery

import {ShopQuery} from '@scandipwa/shopify-shop/src/api/Shop.query.js'

Description: * Query declarations for shop Read more:

Namespace: ShopifyShop/Api/Shop/Query/ShopQuery

Method _getShopFields

Description: A function which returns an array of shop fields Read more:

Function processShop

import {processShop} from '@scandipwa/shopify-shop/src/api/Shop.processor.js'

Description: Shop processor

Namespace: ShopifyShop/Api/Shop/Processor/processShop

🔮 Common extension point: Great place to add some "calculated" field into shop

{
    'ShopifyShop/Api/Shop/Processor/processShop': {
        'function': ([shop], callback) => {
                 callback(shop);
                 shop.translatedDescription = translate(shop.description);
            }
    }
}

Class ShopProvider

import {ShopProvider} from '@scandipwa/shopify-shop/src/context/Shop.provider.js'

Description: Provider class for Shop Context. Used to make shop data available to every component in the app.

Namespace: ShopifyShop/Context/Shop/Provider/ShopProvider

Method getContextValue

Description: A function which returns an object that will be visible in the Shop Context

🔮 Common extension point: Add more fields to Shop Context outside of Shopify API

{
    'ShopifyShop/Context/Shop/Provider/ShopProvider': {
        'member-function': {
            'getContextValue': (args, callback) => ({
                     ...args,
                     supportedLanguages: ['EN', 'IT', 'ES']
                })
        }
    }
}

This page is automatically generated

All modification will be erased during the next deployment. If you intend to modify the contents, please refer to the source-code.

Query controller
Extending Query controllers