@pinelab/vendure-plugin-facet-suggestions
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Vendure Facets Suggestion Plugin

Official documentation here

This plugin allows you to define facets that will show as suggestions on a product detail page. You can set facets to always show on every product detail, or dependant on other facet values. This feature is based on one of Michael Bromley's (Co-founder of Vendure) tutorials.

image

Getting started

  1. Add the plugin to your vendure-config.ts:
    ...
     plugins: [
      FacetSuggestionsPlugin,
      AdminUiPlugin.init({
        port: 3002,
        route: 'admin',
        app: compileUiExtensions({
          outputPath: path.join(__dirname, '__admin-ui'),
          extensions: [FacetSuggestionsPlugin.ui],
        }),
      }),
    ...
     ]
     ...
  1. Run a DB migration to add the new custom fields: https://docs.vendure.io/guides/developer-guide/migrations/#migration-workflow
  2. Start the server and login to the admin UI and go to facets
  3. On the facet detail page, check the box Show on product detail page
  4. Update the facet
  5. Go to a product detail page
  6. You should now see a facet value selector for your facet right below the name/description block

There are two ways to show facets on the product detail page:

  1. Show on product detail page - Always show for every product
  2. Show if product has facets - Only show if a product already has selected facets. For example, you can use this to create product types: "If product has category:laptop, it should also have a facet value from the memory facet"

Readme

Keywords

none

Package Sidebar

Install

npm i @pinelab/vendure-plugin-facet-suggestions

Weekly Downloads

153

Version

1.0.0

License

MIT

Unpacked Size

17.3 kB

Total Files

16

Last publish

Collaborators

  • mbrug