|
|
пре 1 недеља | |
|---|---|---|
| .. | ||
| api | пре 6 месеци | |
| dashboard | пре 2 месеци | |
| entities | пре 6 месеци | |
| ui | пре 2 година | |
| .gitignore | пре 2 година | |
| README.md | пре 2 година | |
| generated-admin-types.ts | пре 2 година | |
| generated-shop-types.ts | пре 2 година | |
| index.ts | пре 6 месеци | |
| package.json | пре 1 недеља | |
| reviews-plugin.ts | пре 3 месеци | |
| tsconfig.json | пре 6 месеци | |
| types.ts | пре 2 година | |
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.