0.1.22 • Published 3 years ago

vendure-product-recommendations v0.1.22

Weekly downloads
42
License
MIT
Repository
github
Last release
3 years ago

About

This vendure plugin adds product recommendations, namely cross- and upselling, to the products. It's up to your frontend to fetch them, a graphql API is provided.

Disclaimers

  • I'm not actively supporting this plugin in the sense of that I will ensure its functionality for all possibe use cases or add features, I simply don't have the time for that. This repo just contains a copy of the plugin I'm using for my projects but if you're interested in adding features you are of course welcome to create pull requests.
  • There are no tests yet. If you plan to use this plugin in production, you're welcome to create pull requests.

Installation

Step 1): Install vendure-product-recommendations by using npm or yarn:

yarn add vendure-product-recommendations

Step 2): Import the vendure plugin from vendure-product-recommendations and add it the plugins section in

vendure-config.ts:

import { ProductRecommendationsPlugin } from "vendure-product-recommendations";
...
export const config: VendureConfig = {
  ...
  plugins: [
    ...,
	ProductRecommendationsPlugin
  ]
}

Usage

The following graphql endpoints are added:

Admin

enum RecommendationType {
    CROSSSELL
    UPSELL
  }
  
type ProductRecommendation {
    product: Product!
    recommendation: Product!
    type: RecommendationType!
}
extend type Query {
    productRecommendations(productId: ID!): [ProductRecommendation!]!
}
extend type Mutation {
    updateCrossSellingProducts(productId: ID!, productIds: [ID!]): Boolean!
    updateUpSellingProducts(productId: ID!, productIds: [ID!]): Boolean!
}

Shop

enum RecommendationType {
    CROSSSELL
    UPSELL
}
type ProductRecommendation {
    product: Product!
    recommendation: Product!
    type: RecommendationType!
}
extend type Query {
    productRecommendations(productId: ID!): [ProductRecommendation!]!
}
0.1.22

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago