💸
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 ProductVariantsQuery
  • Method _getVariantFields
  • Method getOptionsField
  • Method getVariantsField
  • Class ProductOptionComponent
  • Class ProductOptionContainer
  • Member containerFunctions
  • Member containerProps
  • Class ProductOptionsComponent

Was this helpful?

  1. Packages
  2. @scandipwa/shopify-product-variants

Internal Structure

Previous@scandipwa/shopify-product-variantsNext@scandipwa/shopify-products

Last updated 4 years ago

Was this helpful?

Class ProductVariantsQuery

import {ProductVariantsQuery} from '@scandipwa/shopify-product-variants/src/api/ProductVariants.query.js'

Description: Product variants query declaration. Read more:

Namespace: ShopifyProductVariants/Api/ProductVariants/Query/ProductVariantsQuery

Method _getVariantFields

Description: A function which returns an array of product variant fields. Read more

Method getOptionsField

Description: Getter for variant options [returns edges]

Method getVariantsField

Description: Getter for product variants [returns edges]

Class ProductOptionComponent

import {ProductOptionComponent} from '@scandipwa/shopify-product-variants/src/component/ProductOption/ProductOption.component.js'

Description: Product Option component

Namespace: ShopifyProductVariants/Component/ProductOption/Component/ProductOptionComponent

Class ProductOptionContainer

import {ProductOptionContainer} from '@scandipwa/shopify-product-variants/src/component/ProductOption/ProductOption.container.js'

Description: Product Option Container. Used to connect with the Product Context and define functions.

Namespace: ShopifyProductVariants/Component/ProductOption/Container/ProductOptionContainer

Member containerFunctions

Description: Function which returns an object of functions.

🔮 Common extension point: Add more logic to Product Option component

{
    'ShopifyProductVariants/Component/ProductOption/Container/ProductOptionContainer': {
        'member-properties': {
            'containerFunctions': (member, instance) => ({
                     ...member,
                     onBlur: () => doSomething()
                })
        }
    }
}

Member containerProps

Description: Function which returns an object of props that are going to be passed down to the component.

🔮 Common extension point: Add more props to Product Option component

{
    'ShopifyProductVariants/Component/ProductOption/Container/ProductOptionContainer': {
        'member-properties': {
            'containerProps': (member, instance) => ({
                     ...member,
                     myField: 'myField'
                })
        }
    }
}

Class ProductOptionsComponent

import {ProductOptionsComponent} from '@scandipwa/shopify-product-variants/src/component/ProductOptions/ProductOptions.component.js'

Description: Product Options Component. Used to display multiple Product Options

Namespace: ShopifyProductVariants/Component/ProductOptions/Component/ProductOptionsComponent

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