|
|
il y a 9 mois | |
|---|---|---|
| .. | ||
| api | il y a 2 ans | |
| dashboard | il y a 9 mois | |
| entities | il y a 2 ans | |
| ui | il y a 2 ans | |
| .gitignore | il y a 2 ans | |
| README.md | il y a 2 ans | |
| generated-admin-types.ts | il y a 2 ans | |
| generated-shop-types.ts | il y a 2 ans | |
| reviews-plugin.ts | il y a 9 mois | |
| types.ts | il y a 2 ans | |
The reviews plugin add product reviews to Vendure.
This plugin demonstrates many capabilities of the Vendure plugin system:
@vendure/testing package.Start the Vendure server and then in the Shop API (http://localhost:3000/shop-api) try the following mutation:
mutation {
submitProductReview(input: {
productId: 2
summary: "Good tablet"
body: "The screen is clear, bright and sharp!"
rating: 5
authorName: "Joe Smith"
authorLocation: "London"
}) {
id
state
}
}
You should then be able to log into the Admin UI (http://localhost:3000/admin) and see the new "Product Reviews" menu item on the left. Clicking this takes you to a brand new extension module listing all product reviews. You can approve the review that was just submitted.
When viewing the Tablet product (http://localhost:3000/admin/catalog/inventory/2) you'll now see the review rating and count which make use of the custom UI controls defined in the ui extension.