parameters:
  #    product_entity_class: \App\Entity\Product
  #    variant_entity_class: \App\Entity\Variant
  #    inventory_entity_class: \App\Entity\Inventory
  #
  #    shopify_endpoint: 'https://jennys-boutique-cork-sandbox.myshopify.com/admin/api/2019-10/'
  #    shopify_user: '5e2ceca80ef89375f7ad7bc2b57f5d7b'
  #    shopify_password: 'cf4f5cce8d1bb4bf732f8742feb5993c'
  #    shopify_location_id: '31333220398'

  #    shopify_endpoint: 'https://jennys-boutique-cork.myshopify.com/admin/api/2019-10/'
  #    shopify_user: 'ece7c7cc49db4ace46bb6a2ae387c05d'
  #    shopify_password: '05fba9e9736cf7c4f0a84d731bafd2f8'
  #    shopify_location_id: '15925608494'


  #### New Config ####


  shopify_endpoint: 'https://jennys-boutique-cork-sandbox.myshopify.com/admin/api/2021-04/'
  shopify_user: '5e2ceca80ef89375f7ad7bc2b57f5d7b'
  shopify_password: 'cf4f5cce8d1bb4bf732f8742feb5993c'
  shopify_location_id: '31333220398'

  shopify_connection_default: &shopify-connection-default
    endpoint: 'https://jennys-boutique-cork-sandbox.myshopify.com/admin/api/2021-04/'
    user: '5e2ceca80ef89375f7ad7bc2b57f5d7b'
    password: 'cf4f5cce8d1bb4bf732f8742feb5993c'

  ## Mapping configurations

  sf9_meridian.path.inventory_files: 'var/epos/meridian/import/stock/'


  ############ Shopify Config #############

  sf9_shopify.mapping.product.create:  &shopify-mapping-product-create-custom
    - { target: 'title', sources: 'name' }
    - { target: 'body_html', sources: 'description', expression: 'strsanitize(description)' }
    - target: 'handle'
      sources:
        - key: 'name'
          alias: 'name'
        - key: 'style_code'
          alias: 'style_code'
      expression: 'strtokebab(name) ~ "-" ~ strtolower(style_code)'
    - { target: 'published', literal: false }

    - target: 'product_type'
      sources:
        - key: 'product_type'
          alias: 'product_type'
          default:
            type: 'variable'
            value: false
      expression: 'strtolower(product_type)'
    - target: 'vendor'
      sources:
        - key: 'supplier'
          alias: 'supplier'
      expression: 'supplier'

  sf9_shopify.mapping.product.update: &shopify-mapping-product-update-custom
    - { target: 'product_type', sources: 'product_type|0', expression: 'strtolower(product_type)' }
    - { target: 'vendor', sources: 'supplier|' }

  sf9_shopify.mapping.variant.create: &shopify-mapping-variant-create-custom
    - { target: 'price', sources: 'price' }
    - { target: 'sku', sources: 'sku' }
    - { target: 'inventory_management', literal: 'shopify' }
    - { target: 'fulfillment_service', literal: 'manual' }
    - { target: 'inventory_policy', literal: 'deny' }


  sf9_shopify.mapping.variant.update: &shopify-mapping-variant-update-custom
    - { target: 'price', sources: 'price' }
    - { target: 'sku', sources: 'sku' }


#  channel.default:
#    general:
#      price_list: 'ie'
#      order_prefix: ''
#    shopify:
#      connection: *shopify-connection-default
#      option_fields:
#        - source: 'getSize'
#          title: 'Size'
#        - source: 'getColour'
#          title: 'Colour'
#      location_id: '31333220398'
#      mapping_product_create: *shopify-mapping-product-create-custom
#      mapping_product_update: *shopify-mapping-product-update-custom
#      mapping_variant_create: *shopify-mapping-variant-create-custom
#      mapping_variant_update: *shopify-mapping-variant-update-custom
