Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphcommerce/algolia-products

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphcommerce/algolia-products

An implementation of Algolia Products through the GraphQL Mesh.

  • 9.0.1-canary.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
586
decreased by-6.39%
Maintainers
0
Weekly downloads
 
Created
Source

Algolia Magento 2

An implementation of Algolia Products through the GraphQL Mesh.

Prerequisites

Make sure the Magento 2 module is correctly installed and working.

Installation

  1. Find current version of your @graphcommerce/next-ui in your package.json.

  2. yarn add @graphcommerce/algolia-products@9.0.0 (replace 9.0.0 with the version of the step above)

  3. Configure the following (configuration values) in your graphcommerce.config.js:

    const config = {
      algolia: {
        applicationId: 'your-algolia-application-id', // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Application ID
        indexNamePrefix: 'default_', // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Index name prefix
        searchOnlyApiKey: 'blabla', // Stores > Configuration > Algolia Search > Credentials and Basic Setup > Search-only (public) API key
        catalogEnabled: false, // start with search and if everything works as expected, you can move on to the catalog.
      },
    }
    

Configuration

  1. Setup the fields that you want to index in algolia Stores > configuration > Algolia Search > Products > Products
  2. Configure your aggregations/filters, make sure that the aggregation fields are also indexed in step 2 Stores > Configuration > Algolia Search > Instant Search Results Page > Facets
  3. Make sure the aggregations fields are made filterable(Use in layerd Navigation), so the attributeList query can retrieve the labels. Stores > Products > Attributes
  4. To configure sorting options, enable Virtual Replica's. Stores > Configuration > Algolia Search > Instant Search Results Page > Use Virtual Replica

Customer Group Pricing

const config = {
  algoliaCustomerGroupPricingEnabled: true,
}

To enable customer group pricing, make sure customers groups prices are mapped to algolia. Stores > Configuration > Algolia Search > Advanced > Enable Customer Groups.

⚠️ Warning: Catalog price rules for a specific customer group do not seem to be indexed.It seems only: [Product] > Advanced Pricing > Customer Group Price gets indexed.

Note: The GraphQL API does not expose the customer group_id by default. We're doing an additional REST API call to get the value. This means a somewhat slower (few hundred ms) when the Customer is loaded.

Customization

By default algoliaFacetsToAggregations and algoliaHitToMagentoProduct can be plugged in.

Algolia for Catalog

Sorting is defined by Algolia and can not be configured per category as each sorting option is a separate (virtual) index.

Suggestions

To get query suggestions/autocomplete enter your Algolia dashboard > Search > configure > Query Suggestions > new Query Suggestions Index. This will create a new index which will be used for suggestions

Don't mind to use the suggestions setting in magento admin. It will create a suggestions index but it will not record suggestions. This requires instantSearch

FAQs

Package last updated on 20 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc