All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ools.sunrise.common_2.11.1.0.0-M10.source-code.reference.conf Maven / Gradle / Ivy

The newest version!
# Reference configuration for Sunrise
# https://github.com/typesafehub/config
# ~~~~~

sunrise {

  ctp {

    # CLIENT
    # ~~~~~

    client {

      # Project key of your commercetools project.
      # projectKey = "your-project-key"

      # API client ID for your commercetools project.
      # clientId = "your-client-id"

      # API client secret for your commercetools project.
      # clientSecret = "your-client-secret"

      # URL of the OAuth server, including HTTP protocol and ports.
      authUrl = "https://auth.sphere.io"

      # URL of the API server prepended to all endpoints, including HTTP protocol and ports.
      apiUrl = "https://api.sphere.io"

      # Set of permissions the client will have to access your commercetools project.
      # It is recommended that you specify only those scopes your application really needs, but not more.
      # Default grants full access to the APIs for the specified project.
      scopes = ["manage_project"]
    }

    # CATEGORIES
    # ~~~~~

    categories {

      # Key from the cache where to store the category tree.
      cacheKey = "category-tree"

      # Time in seconds until the category tree in cache expires.
      # If undefined no expiration is set.
      # cacheExpiration = 3600

      # List (for multisort) of sort expressions applied when querying the categories.
      # In CTP format (http://dev.commercetools.com/http-api.html#sorting) for Category Query.
      sortExpressions = ["orderHint asc"]

      # Defines whether the categories with no products assigned should be discarded from the navigation category tree.
      # Set to false to keep all categories.
      discardEmpty = false

      # External ID of the category in your CTP project which children represent the navigation category tree displayed to the user.
      # If undefined the whole category tree from your CTP project is used as navigation.
      # navigationExternalId = "navigation"

      # External ID of the category in your CTP project to which any product tagged as new is associated.
      # If undefined no product will be displayed as new.
      # newExternalId = "new"

      # List of navigation categories that do not display products associated with these categories.
      # Instead they will use the given filter expressions to display products.
      # If empty all categories will display their associated products.
      specialCategories = []
    }

    # PRODUCTS
    # ~~~~~

    products {

      attributes {

        # Product attribute list that is displayed for a specific product variant (this does not allow to select different
        # product variants, please check soft/hard selectable attributes for that purpose).
        displayed = []

        # List of product attribute names that enable selecting a different product variant.
        # In particular, those attributes that require re-loading the page to display the selected variant,
        # e.g. if you select a different color you may want to show different pictures, description, etc.
        primarySelectable = []

        # List of product attribute names that enable selecting a different product variant.
        # In particular, those attributes that DO NOT require re-loading the page to display the selected variant, e.g. size.
        secondarySelectable = []
      }
    }

    # PROJECT
    # ~~~~~

    project {

      # Enter the list of countries as ISO country codes (e.g. DE). Default country first.
      # If undefined or empty list, the application will use the countries defined in your commercetools project.
      # countries = ["DE", "US", "GB", "AT", "CH"]

      # Enter the list of currencies as ISO currency codes (e.g. EUR). Default currency first.
      # If undefined or empty list, the application will use the currencies defined in your commercetools project.
      # currencies = ["EUR", "USD"]

      # Enter the list of languages as language tags (e.g. en-UK). Default language first.
      # If undefined or empty list, the application will use the languages defined in your commercetools project.
      # languages = ["en", "de", "es"]
    }
  }
}


# SUGGESTIONS
# ~~~~~

# The categories to which the products shown in the home page suggestions belong. Enter a list of the category external IDs.
homeSuggestions.externalId = []

# The amount of products displayed in the home page suggestions.
homeSuggestions.count = 4

# The amount of products displayed for a product's suggestions.
productSuggestions.count = 4



# PRODUCT SEARCH
# ~~~~~

pop {
  # Field in the URL query string containing the searched term.
  searchTerm.fieldName = "q"
  searchTerm.fieldName = ${?SEARCH_PRODUCTS_FIELD}

  pagination = {
    # Field in the URL query string containing the page.
    fieldName = "page"
    fieldName = ${?PAGINATION_FIELD}

    # The amount of pages on each side of the current page that are going to be directly displayed.
    displayedPages = 2
    displayedPages = ${?PAGINATION_DISPLAYED_PAGES}
  }

  productsPerPage = {
    # Field in the URL query string containing the amount of products per page.
    fieldName = "ppp"
    fieldName = ${?PRODUCTS_PER_PAGE_FIELD}

    # Available options to select the amount of products per page. Consist of:
    # - fieldValue: identifier of this option, e.g. used in the URL query string
    # - label: the name to be displayed, it can be either a regular text or a i18n message key
    # - amount: products per page of this option, the allowed range goes from 0 to 500
    # - default: whether this option should be default (only the first one will be taken into account)
    options = [
      {
        fieldValue = "24"
        fieldLabel = "24"
        amount = 24
        default = true
      },
      {
        fieldValue = "48"
        fieldLabel = "48"
        amount = 48
      }
    ]
    options = ${?PRODUCTS_PER_PAGE_OPTIONS}
  }

  sortProducts = {
    # Field in the URL query string containing the sorting criteria.
    fieldName = "sort"
    fieldName = ${?SORT_PRODUCTS_FIELD}

    # Available options to sort products. Consist of:
    # - fieldValue: identifier of this sort option, e.g. used in the URL query string
    # - label: the name to be displayed, it can be either a regular text or a i18n message key
    # - expr: list (for multisort) of sort expressions applied for that option, in CTP format (http://dev.commercetools.com/http-api-projects-products-search.html#search-sorting)
    #     - use {{locale}} inside the expression to replace it for the user's language (e.g. "name.{{locale}}" would be transformed into "name.en" when the user has English selected)
    # - default: whether this option should be default (only the first one will be taken into account)
    options = [
      {
        fieldValue = "default"
        fieldLabel = "-"
        default = true
      },
      {
        fieldValue = "new"
        fieldLabel = "catalog:sortSelector.new"
        expressions = ["createdAt desc"]
      },
      {
        fieldValue = "price-asc"
        fieldLabel = "catalog:sortSelector.priceAsc"
        expressions = ["price asc", "createdAt desc"]
      },
      {
        fieldValue = "price-desc"
        fieldLabel = "catalog:sortSelector.priceDesc"
        expressions = ["price desc", "createdAt desc"]
      }
    ]
    options = ${?SORT_OPTIONS}
  }

  # Available facets for products. Consist of:
  # - uiType: UI type of the facet, default available options are:
  #     - list: a simple list with facet options
  #     - columnsList: a two columns list with facet options
  # - key: the field in the URL query string containing this facet criteria
  # - label: the name to be displayed, it can be either a regular text or a i18n message key
  # - expr: attribute path of the facet expression applied, in CTP format (http://dev.commercetools.com/http-api-projects-products-search.html#search-facet-term-query-parameter)
  #     - use {{locale}} inside the expression to replace it for the user's language (e.g. "name.{{locale}}" would be transformed into "name.en" when the user has English selected)
  # - count: whether the product count is shown or hidden
  # - threshold: minimum amount of facet options required to display the facet, otherwise the facet is hidden
  # - limit: maximum amount of facet options displayed
  # - multiSelect: whether you can select multiple options from the facet to filter by or just one per request
  # - matchingAll: whether the filtered products should match all selected facet options (matches all) or just at least one (matches any)
  # - mapper: transforms the facet options somehow, default available types are:
  #    - customSorted: it sorts the options according to a given list of values, missing values are appended
  #    - alphabeticallySorted: it sorts the options in alphabetical order
  facets = [
    {
      fieldName = "productType"
      fieldLabel = "catalog:filters.productType"
      type = "categoryTree"
      attributePath = "categories.id"
      count = true
    },
    {
      fieldName = "size"
      fieldLabel = "catalog:filters.size"
      type = "term"
      uiType = "columnsList"
      attributePath = "variants.attributes.commonSize.label"
      count = true
      threshold = 2
      mapper = {
        type = "customSorted"
        values = ["one Size", "XXS", "XS", "S", "M", "L", "XL", "XXL", "XXXL", "34", "34.5", "35", "35.5", "36", "36.5", "37", "37.5",
          "38", "38.5", "39", "39.5", "40", "40.5", "41", "41.5", "42", "42.5", "43", "43.5", "44", "44.5", "45", "45.5", "46", "46.5",
          "47", "47.5", "70", "75", "80", "85", "90", "95", "100", "105", "110", "115", "120"]
      }
    },
    {
      fieldName = "color"
      fieldLabel = "catalog:filters.color"
      type = "term"
      uiType = "columnsList"
      attributePath = "variants.attributes.color.label.{{locale}}"
      count = true
      threshold = 2
      mapper = {
        type = "alphabeticallySorted"
      }
    },
    {
      fieldName = "brands"
      fieldLabel = "catalog:filters.brand"
      type = "term"
      uiType = "list"
      attributePath = "variants.attributes.designer.label"
      count = true
      threshold = 2
    }
  ]
  facets = ${?FACETS}
}


# WISHLIST
# ~~~~~

wishlist = {
  # Number of recently added items viewed in the mini wishlist view
  recentlyAddedItems = 3
}


# CHECKOUT
# ~~~~~

form.titles = [
  "main:form.personTitles.mr",
  "main:form.personTitles.mrs",
  "main:form.personTitles.ms",
  "main:form.personTitles.dr"
]

payment.settings = [
  {
    name = "sunrise:payment.prepaid"
    method = "prepaid"
  },
  {
    name = "sunrise:payment.creditcard"
    method = "creditcard"
    paymentInterface = "payone"
  }
]

checkout.customerServiceNumber = "+49 899982996-0"


# LOCALIZATION
# ~~~~~

application.i18n = {
  # List of i18n bundles to load.
  bundles = ["sunrise", "main", "banner", "catalog", "checkout", "my-account-login", "my-account"]

  # If you want to change the way i18n messages are resolved, you can change the list of resolver loaders you want to use.
  # Keep in mind that the list order determines the order in which the resolvers are going to be invoked for each message.
  resolverLoaders = [
    {
      type = "yaml"
      path = "i18n"
    },
    {
      type = "yaml"
      path = "META-INF/resources/webjars/i18n"
    }
  ]
}


# TEMPLATE ENGINE
# ~~~~~

# If you want to change the way templates sources are loaded, you can change the list of template loaders you want to use.
# Keep in mind that the list order determines the order in which the loaders are going to be invoked.
handlebars.templateLoaders = [
  {
    type = "classpath"
    path = "/templates"
  },
  {
    type = "classpath"
    path = "/META-INF/resources/webjars/templates"
  }
]


# CMS
# ~~~~~

application.cms.i18n = {
  # List of CMS bundles to load.
  # (only if used file-based CMS)
  bundles = ["home"]

  # If you want to change the way CMS messages are resolved, you can change the list of resolver loaders you want to use.
  # Keep in mind that the list order determines the order in which the resolvers are going to be invoked for each message.
  # (only if used file-based CMS)
  resolverLoaders = [
    {
      type = "yaml"
      path = "cms"
    }
  ]
}

# EMAIL SENDER
# ~~~~~~~~~~~~~

email.sender.smtp = {
  
  # Timeout in milliseconds for all SMTP connections (creating, reading from and writing to).
  timeoutMs = 3000
  
  # Name of the host running the SMTP server.
  # host = smtp.host.com
  
  # Port to connect to the SMTP server.
  port = 25
  
  # Security protocol applied for the SMTP connections.
  # Options: "None", "SSL_TLS", "STARTTLS"
  security = "SSL_TLS"

  # Username for the authentication against the SMTP server.
  # username = [email protected]
  
  # Password for the authentication against the SMTP server.
  # password = secret
}

# BASIC AUTH
# ~~~~~

httpAuth.basic = {
  # LEAVE COMMENTED IF YOU DO NOT WANT TO ENABLE BASIC ACCESS AUTHENTICATION!
  # If you only want authorized users to access your website, please enter here the required credentials
  # separated by colon ':'. For example, for a username 'john' and password 'secret', enter 'john:secret'.
  # credentials = "username:password"

  # Authentication realm that identifies your application. This is only necessary when basic authentication is enabled.
  realm = "Sunrise Demo"
}


# PLAY
# ~~~~~

play = {
  http.errorHandler = "com.commercetools.sunrise.play.http.SunriseDefaultHttpErrorHandler"

  modules {
    enabled += "com.commercetools.sunrise.framework.injection.SunriseModule"
    enabled += "com.commercetools.sunrise.ctp.client.SphereClientModule"
    enabled += "com.commercetools.sunrise.ctp.project.ProjectModule"
    enabled += "com.commercetools.sunrise.framework.localization.LocalizationModule"
    enabled += "com.commercetools.sunrise.framework.template.ThemeModule"
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy