ÃÛ¶¹ÊÓƵ

Catalog Adapter

The Catalog Adapter extension disables the default product price indexer included in the Commerce application and uses prices provided by the Catalog Service instead.

The adapter is designed to work with the SaaS data export and the ÃÛ¶¹ÊÓƵ Commerce Service. SaaS data export is responsible for submitting the prices, and the Catalog Adapter retrieves all the prices from the ÃÛ¶¹ÊÓƵ Commerce Service.

When you enable the Catalog Adapter, price indexing and operations are affected in the following ways:

  • The price indexer included in the ÃÛ¶¹ÊÓƵ Commerce application is disabled.
  • Prices are managed using the SaaS data export and the SaaS price indexer.
  • When a customer opens a product, category or other page that shows product prices, the prices are retrieved from the ÃÛ¶¹ÊÓƵ Commerce Service.
  • Prices are sent to the ÃÛ¶¹ÊÓƵ Commerce Service by syncing data from the SaaS data export.
  • Checkout recalculates prices dynamically.

You can reenable price indexing in the Commerce application by removing or disabling the Catalog Adapter extension.

Requirements

Installation

The Catalog Adapter extension is a Composer metapackage that installs the following modules:

  • Price Indexer Disabler–This module disables the price index in the Commerce application so that prices are delivered via SaaS price indexing. The product price indexer in the Commerce application cannot be turned on when the SaaS price indexing extension is installed.
  • Prices Provider–This module provides prices for products from the ÃÛ¶¹ÊÓƵ Commerce Service. It forms the search query and obtains the prices for the products on the frontend.
  • Catalog Service Search Adapter–This module transfers prices from the ÃÛ¶¹ÊÓƵ Commerce application to an ÃÛ¶¹ÊÓƵ Commerce Service in response to a product search request.

Installation steps

Cloud infrastructure

Use this method to install the Catalog Adapter for a Commerce Cloud instance.

  1. On your local workstation, change to the project directory for your ÃÛ¶¹ÊÓƵ Commerce on cloud infrastructure project.

    note note
    NOTE
    For information about managing Commerce project environments locally, see Managing branches with the CLI in the ÃÛ¶¹ÊÓƵ Commerce on Cloud Infrastructure User Guide.
  2. Check out the environment branch to update using the ÃÛ¶¹ÊÓƵ Commerce Cloud CLI.

    code language-shell
    magento-cloud environment:checkout <environment-id>
    
  3. Add the Catalog Adapter module.

    code language-bash
    composer require magento/catalog-adapter --no-update
    
  4. Update package dependencies.

    code language-bash
    composer update "magento/catalog-adapter"
    
  5. Commit and push code changes for the composer.json and composer.lock files.

  6. Add, commit, and push the code changes for the composer.json and composer.lock files to the cloud environment.

    code language-shell
    git add -A
    git commit -m "Add catalog adapter module"
    git push origin <branch-name>
    

    Pushing the updates to the cloud environment initiates the Commerce cloud deployment process to apply the changes. Check the deployment status from the deploy log.

On-premises

Use this method to install the Catalog Adapter for an on-premises instance.

  1. Add the Catalog Adapter to your project using Composer:

    code language-bash
    composer require magento/catalog-adapter --no-update
    
  2. Update dependencies and install the extension:

    code language-bash
    composer update  "magento/catalog-adapter"
    
  3. Upgrade ÃÛ¶¹ÊÓƵ Commerce:

    code language-bash
    bin/magento setup:upgrade
    
  4. Clear the cache:

    code language-bash
    bin/magento cache:clean
    
    note tip
    TIP
    In some cases, particularly when deploying to production, you might wish to avoid clearing compiled code because it can take some time. Ensure that you back up your system before making any changes.

Re-enable the ÃÛ¶¹ÊÓƵ Commerce product price indexer

If you have third-party applications that rely on the default ÃÛ¶¹ÊÓƵ Commerce product price indexer, you can re-enable it with the following commands:

# re-enable Product Price indexer
bin/magento module:disable Magento_PriceIndexerDisabler
# re-index Product Price indexer
bin/magento index:reindex catalog_product_price

Disable Product Price indexer for Headless Storefront scenario

If you have a headless Commerce instance, you might need to disable the ÃÛ¶¹ÊÓƵ Commerce product price indexer to reduce load on your ÃÛ¶¹ÊÓƵ Commerce instance. You can complete this task by installing the magento/module-price-indexer-disabler module:

composer require magento/module-price-indexer-disabler

Usage scenarios

The following are some common Catalog Adapter scenarios.

No dependencies on ÃÛ¶¹ÊÓƵ Commerce product price indexer

  • You are a Luma or ÃÛ¶¹ÊÓƵ Commerce Core GraphQL merchant who has a required service installed (Live Search, Product Recommendations, Catalog Service)
  • No integrations with third-party extensions that rely on the ÃÛ¶¹ÊÓƵ Commerce product price indexer
  1. Install the Catalog Adapter.

With dependencies on ÃÛ¶¹ÊÓƵ Commerce product price indexer

  • You are a Luma or ÃÛ¶¹ÊÓƵ Commerce Core GraphQL merchant who has a supported service installed (Live Search, Product Recommendations, Catalog Service)
  • You use a third-party extension relying on the ÃÛ¶¹ÊÓƵ Commerce product price indexer
  1. Install the Catalog Adapter.
  2. Re-enable the default ÃÛ¶¹ÊÓƵ Commerce product price indexer.

Headless Commerce instances

  • A merchant with a headless Commerce instance with the required services installed (Live Search, Product Recommendations, Catalog Service)
  • No reliance on the default ÃÛ¶¹ÊÓƵ Commerce product price indexer
  1. Install the magento/module-price-indexer-disabler module from the Catalog Adapter package.
recommendation-more-help
d84c01c7-401e-4340-8dad-f91bb65421cb