SAP Commerce Cloud sap-commerce-cloud

After installation you can configure your instance:

Configure the Faceted Search for Geometrixx Outdoors configure-the-facetted-search-for-geometrixx-outdoors

NOTE
This is not needed for hybris 5.3.0.1 and later.
  1. In your browser, navigate to the hybris management console at:

    http://localhost:9001/hmc/hybris

  2. From the sidebar, select System, then Facet search, then Facet Search Config.

  3. Open Editor for the Sample Solr Configuration for clothescatalog.

  4. Under Catalog versions use Add Catalog version to add outdoors-Staged and outdoors-Online to the list.

  5. Save the configuration.

  6. Open SOLR Item types to add SOLR Sorts to ClothesVariantProduct:

    • relevance (“Relevance”, score)
    • name-asc (“Name (ascending)”, name)
    • name-desc (“Name (descending)”, name)
    • price-asc (“Price (ascending)”, priceValue)
    • price-desc (“Price (descending)”, priceValue)
    note note
    NOTE
    Use the context menu (usually right-button click) to select Create Solr sort.
    For Hybris 5.0.0 open the Indexed Types tab, double-click ClothesVariantProduct, then the tab SOLR Sort.

    chlimage_1-36

  7. In the Indexed Types tab, set the Composed Type to:

    Product - Product

  8. In the Indexed Types tab, adjust the Indexer queries for full:

    code language-shell
    SELECT {pk} FROM {Product} WHERE {pk} NOT IN ({{SELECT {baseProductpk} FROM {variantproduct}}})
    
  9. In the Indexed Types tab, adjust the Indexer queries for incremental:

    code language-shell
    SELECT {pk} FROM {Product} WHERE {pk} NOT IN ({{SELECT {baseProductpk} FROM {variantproduct}}}) AND {modifiedtime} <= ?lastIndexTime
    
  10. In the Indexed Types tab, adjust the category facet. Double-click the last entry in the category list to open the Indexed property tab:

    note note
    NOTE
    For hybris 5.2 make sure that the Facet attribute in the Properties table is selected according to the screenshot below:

    chlimage_1-37 chlimage_1-38

  11. Open the Facet Settings tab and adjust the field values:

    chlimage_1-39

  12. Save the changes.

  13. Again from SOLR Item types, adjust the price facet according to the following screenshots. As with category, double-click price to open the Indexed property tab:

    chlimage_1-40

  14. Open the Facet Settings tab and adjust the field values:

    chlimage_1-41

  15. Save the changes.

  16. Open System, Facet search, then Indexer operation wizard. Start a cronjob:

    • Indexer operation: full
    • Solr configuration: Sample Solr Config for Clothes

Configure the Catalog Version configure-the-catalog-version

The Catalog version ( hybris.catalog.version) that is imported can be configured for the OSGi service:

Day CQ Commerce Hybris Configuration
( com.adobe.cq.commerce.hybris.common.DefaultHybrisConfigurationService)

Catalog version is set to either Online or Staged (the default).

NOTE
When working with AEM, there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details. Also see the console for a full list of configurable parameters and their defaults.

The log output provides feedback on the created pages and components and reports potential errors.

Configure the Import Structure configure-the-import-structure

The following listing shows a sample structure (of assets, pages and components) that is created by default:

+ /content/dam/path/to/images
  + 12345.jpg (dam:Asset)
    + ...
  + ...
+ /content/site/en
  - cq:commerceProvider = "hybris"
  - cq:hybrisBaseStore = "basestore"
  - cq:hybrisCatalogId = "catalog"
  + category1 (cq:Page)
    + jcr:content (cq:PageContent)
      - jcr:title = "Category 1"
    + category11 (cq:Page)
      + jcr:content (cq:PageContent)
        - jcr:title = "Category 1.1"
      + 12345 (cq:Page)
        + jcr:content (cq:PageContent)
          + par
            + product (nt:unstructured)
              - cq:hybrisProductId = "12345"
              - sling:resourceType = "commerce/components/product"
              + image (nt:unstructured)
                - sling:resourceType = "commerce/components/product/image"
                - fileReference = "/content/dam/path/to/images/12345.jpg"
              + 12345.1-S (nt:unstructured)
                - cq:hybrisProductId = "12345.1-S"
                - sling:resourceType = "commerce/components/product"
                + image (nt:unstructured)
                  - sling:resourceType = "commerce/components/product/image"
                  - fileReference = "/content/dam/path/to/images/12345.1-S.jpg"
              + ...

Such a structure is created by the OSGi service DefaultImportHandler that implements the ImportHandler interface. An import handler is called by the actual importer to create products, product variations, categories, asset, and so on.

The structure to be generated when importing can be configured for:

``Day CQ Commerce Hybris Default Import Handler
(com.adobe.cq.commerce.hybris.importer.DefaultImportHandler)

When working with AEM, there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details. Also see the console for a full list of configurable parameters and their defaults.

Configure the Product Attributes to Load configure-the-product-attributes-to-load

The response parser can be configured to define the properties and attributes to be loaded for (variant) products:

  1. Configure the OSGi bundle:

    Day CQ Commerce Hybris Default Response Parser
    (com.adobe.cq.commerce.hybris.impl.importer.DefaultResponseParser)

    Here you can define various options and attributes needed for loading and mapping.

    note note
    NOTE
    When working with AEM, there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details. Also see the console for a full list of configurable parameters and their defaults.

Importing the Product Data importing-the-product-data

There are various ways to import the product data. The product data can be imported when initially setting up the environment, or after changes have been made in the hybris data:

Actual product information imported from hybris is held in the repository under:

/etc/commerce/products

The following properties indicate the link with hybris:

  • commerceProvider
  • cq:hybrisCatalogId
  • cq:hybrisProductID
NOTE
The hybris implementation (that is, geometrixx-outdoors/en_US) only stores product IDs and other basic information under /etc/commerce.
The hybris server is referenced every time information about a product is requested.

Full Import full-import

  1. If necessary, delete all existing product data using CRXDE Lite.

    1. Navigate to the subtree holding the product data:

      /etc/commerce/products

      For example:

      http://localhost:4502/crx/de/index.jsp#/etc/commerce/products

    2. Delete the node that holds your product data; for example, outdoors.

    3. Save All to persist the change.

  2. Open the hybris importer in AEM:

    /etc/importers/hybris.html

    For example:

    http://localhost:4502/etc/importers/hybris.html

  3. Configure the required parameters; for example:

    chlimage_1-42

  4. Click Import Catalog to start the import.

    When complete, you can verify the data imported at:

    code language-none
        /etc/commerce/products/outdoors
    

    You can open this in CRXDE Lite; for example:

    [http://localhost:4502/crx/de/index.jsp#/etc/commerce/products](http://localhost:4502/crx/de/index.jsp#/etc/commerce/products)

Incremental Import incremental-import

  1. Check the information held in AEM for the relevant products, in the appropriate subtree under:

    /etc/commerce/products

    You can open this in CRXDE Lite; for example:

    http://localhost:4502/crx/de/index.jsp#/etc/commerce/products

  2. In hybris, update the information held on the relevant products.

  3. Open the hybris importer in AEM:

    /etc/importers/hybris.html

    For example:

    http://localhost:4502/etc/importers/hybris.html

  4. Select the checkbox Incremental Import.

  5. Click Import Catalog to start the import.

    When complete, you can verify the data updated in AEM under:

    code language-none
        /etc/commerce/products
    

Express Update express-update

The import process can take a long time, so as an extension to the Product Synchronization you can select specific areas of the catalog for an express update that is triggered manually. This uses the export feed together with the standard attributes configuration.

  1. Check the information held in AEM for the relevant products, in the appropriate subtree under:

    /etc/commerce/products

    You can open this in CRXDE Lite; for example:

    http://localhost:4502/crx/de/index.jsp#/etc/commerce/products

  2. In hybris, update the information held on the relevant products.

  3. In hybris, add one or more products to the Express Queue; for example:

    chlimage_1-43

  4. Open the hybris importer in AEM:

    /etc/importers/hybris.html

    For example:

    http://localhost:4502/etc/importers/hybris.html

  5. Select the checkbox Express Update.

  6. Click Import Catalog to start the import.

    When complete, you can verify the data updated in AEM under:

    code language-none
        /etc/commerce/products
    

Configure the Catalog Importer configure-the-catalog-importer

The hybris catalog can be imported into AEM, using the batch importer for hybris catalogs, categories, and products.

The parameters used by the importer can be configured for:

Day CQ Commerce Hybris Catalog Importer
( com.adobe.cq.commerce.hybris.impl.importer.DefaultHybrisImporter)

When working with AEM, there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details. Also see the console for a full list of configurable parameters and their defaults.

Catalog Import catalog-import

The hybris package comes with a catalog importer for setting up the initial page structure.

This is available from:

http://localhost:4502/etc/importers/hybris.html

ecommerceimportconsole

The following information must be provided:

  • Base store
    The identifier of the base store configured in hybris.

  • Catalog
    The identifier of the catalog to import.

  • Root path
    The path where the catalog should be imported into.

Removing a Product from the Catalog removing-a-product-from-the-catalog

To remove one, or more, products from the catalog:

  1. Configure the for OSGi service Day CQ Commerce Hybris Catalog Importer; see also Configure the Catalog Importer.

    Activate the following properties:

    • Enable product removal
    • Enable product asset removal
    note note
    NOTE
    When working with AEM, there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details. Also see the console for a full list of configurable parameters and their defaults.
  2. Initialize the importer by performing two incremental updates (see Catalog Import):

    • The first-time run result in a set of changed products - indicated in the log list.
    • For the second time, no products should be updated.
    note note
    NOTE
    The first import is to initialize the product information. The second import verifies that everything worked and the is product set is ready.
  3. Check the category page that contains the product you want to remove. The product details should be visible.

    For example, the following category shows details of the Cajamara product:

    http://localhost:4502/editor.html/content/geometrixx-outdoors/en_US/equipment/biking.html

  4. Remove the product in the hybris console. Use the option Change approval status to set the status to unapproved. The product is removed from the live-feed.

    For example:

  5. Perform another incremental update (see Catalog Import). The log lists the deleted product.

  6. Rollout the appropriate catalog. The product and product page have been removed from within AEM.

    For example:

  7. To reinstate the product:

    1. In hybris, set the approval status back to approved

    2. In AEM:

      1. perform an incremental update
      2. rollout the appropriate catalog again
      3. refresh the appropriate category page

Add Order History Trait to the Client Context add-order-history-trait-to-the-client-context

To add order history to the client context:

  1. Open the client context design page, by either:

  2. Add the Order History component to the Shopping Car t component of the client context.

  3. You can confirm that the client context is showing details of your order history. For example:

    1. Open the client context.

    2. Add an item to the cart.

    3. Complete the checkout.

    4. Check the client context.

    5. Add another item to the cart.

    6. Navigate to the checkout page:

      • The client context shows a summary of the order history.
      • The message “You’re a returning customer” is shown.
    note note
    NOTE
    The message is realized by:
recommendation-more-help
19ffd973-7af2-44d0-84b5-d547b0dffee2