Ratings and Review Add-on
About Addon :
The installation of Spurtcommerce Rating and Review Plugin helps to display the aggregate rating and review for products in the store. When this plugin is installed, the eCommerce site becomes ready for the Customers to post review about the product that they have purchased from the eCommerce store.
Features:
The Customer can provide a star rating.
The Customer can also add a comment along with the star rating.
Vendors and Admin can moderate the reviews.
Display of Reviews on the Storefront.
Display of number of 5 stars, 4 stars, 3 stars, 2 stars and 1s star ratings
Display of aggregate/overall rating.
Frontend Setup - Seller Panel:
Follow these steps to set up the front end for the Rating and Review addon in Spurtcommerce Seller Panel.
Step 1: Install the Addon:
Locate the Spurtcommerce addon package, typically named seller.addOns.zip.
Extract the zip file and copy the RatingAndReview folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns -> RatingAndReview
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:
// ----------------------Rating and Review--------------------------
import * as CrmRatingAndReview from './RatingAndReview/RatingandreView.constant'
// components paths
export const CrmRatingAndReviewComponents = CrmRatingAndReview.componentLists;
// route paths
export const CrmRatingAndReviewRoutes = CrmRatingAndReview.routePath;
If you wish to uninstall or remove the Rating and Review addon, replace the component paths and route paths with an empty array.
// ----------------------Rating and Review--------------------------
import * as CrmRatingAndReview from './RatingAndReview/RatingandreView.constant'
// components paths
export const CrmRatingAndReviewComponents = [];
// route paths
export const CrmRatingAndReviewRoutes =[];
Step 3: Run the Application:
To run the application with the integrated Rating and Review addon, use the following command:
$ npm run large-serveAfter executing this command, the addon will be available on Spurtcommerce on the designated page.
Step 4: Build the Application
Finally, to prepare the application for deployment, run the build command:
$ npm run large-buildThe latest build files will then be ready to deploy to the server.
Frontend Setup - Admin Panel:
Follow these steps to set up the front end for the Rating and Review addon in Spurtcommerce Admin Panel.
Step 1: Install the Addon:
Locate the Spurtcommerce addon package, typically named seller.addOns.zip.
Extract the zip file and copy the RatingAndReview folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns -> RatingAndReview
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:
// ----------------------Rating and Review --------------------------
import * as ratingAndReview from './Cms/manage-page/ratingAndReview/rating-review.constant'
// components paths
export const ratingAndReviewComponents = ratingAndReview.ratingAndReviewComponents;
// route paths
export const ratingAndReviewComponentRoutes=ratingAndReview.routePath;
If you wish to uninstall or remove the Rating and Review addon, replace the component paths and route paths with an empty array.
// ----------------------Rating and Review --------------------------
import * as ratingAndReview from './Cms/manage-page/ratingAndReview/rating-review.constant'
// components paths
export const ratingAndReviewComponents = [];
// route paths
export const ratingAndReviewComponentRoutes=[];
Step 3: Run the Application:
To run the application with the integrated Rating and Review addon, use the following command:
$ npm run large-serveAfter executing this command, the addon will be available on Spurtcommerce on the designated page.
Step 4: Build the Application
Finally, to prepare the application for deployment, run the build command:
$ npm run large-buildThe latest build files will then be ready to deploy to the server.
Store Setup
Rating And Review Addon
Follow these steps to set up the Ratings & Reviews module on the front-end Next.js web store.
Setup Overview:
Install the extension
Update configuration
Integrate the module
Run the application
Build the application
Step 1: Install the Extension
Locate the Spurtcommerce addon package, typically named addOns.zip.
Extract the zip file and copy the RatingAndReview folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns -> RatingAndReview
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the extension, update the configuration in Spurtcommerce’s addonsconfig.js as follows:
Import the required line into addonsconfig.js.
import ReviewRating from './RatingAndReview/ReviewRating'Add the ReviewRating plugin to the specified object.
export const AddonsComponent = { ReviewRating, } Add the following components to the AddonsComponent object:
ReviewRating
VendorRating
CompareProductRating
OrderDetailAddReview
import ReviewRating from './RatingAndReview/ReviewRating' import VendorRating from './RatingAndReview/VendorRating' import CompareProductRating from'./RatingAndReview/CompareProductRating' import OrderDetailAddReview from './RatingAndReview/OrderAddRating' After making these updates, the AddonsComponent object should reflect the new components.
export const AddonsComponent = {
ReviewRating,
VendorRating,
CompareProductRating,
OrderDetailAddReview,
}
Step 3: Module Details
The Ratings & Reviews module includes the following components that you can utilize in any page within Spurtcommerce by sending the required product data as props:
OrderDetailAddReview Component
{ConnectPlugin.OrderDetailAddReview && <ConnectPlugin.OrderDetailAddReview orderId={params?.id} />}Note: Use the OrderDetailAddReview component by passing the product data as a prop:
<connectPlugin.OrderDetailAddReview orderId={params.id} />Step 4: Run the Application
Once you have integrated the OrderDetailAddReview module, run the application using:
$ npm run devThis command will launch Spurtcommerce with the integrated Ratings & Reviews module visible on the specified page.
Step 5: Build the Application
To prepare the application for deployment, execute the following command:
$ npm run buildor
$ yarn run buildThe latest build files will then be ready for server deployment.
Rating and Review Add-On
Follow these below steps are installing rating and reveiw addon
App setup
These are the steps that need to be followed to do the front end store setup.
· Installing an extension
· Update the configuration
· Module Detail
· Run the Application
· Make the build
Step 1 : Installing an extension
These are the steps that need to be executed for installation of the extension.
Locate the Spurtcommerce addon package, typically named addons.zip.
Extract the zip file and copy the RatingAndReview folder into the addons folder in your project.
projectFolder->lib->module->add-ons
After this step, the structure should look like:
projectFolder->lib->module->add-ons->RatingAndReview
projectFolder->lib->module->add-ons->comparerating
projectFolder->lib->module->add-ons->vendorrating
Once completed, proceed to update the configuration.
Step 2 : Update the configuration
After extracting the add on zip file for changing the configurations in addons.dart, you have to follow the steps below:
Go to
projectFolder->lib->module->add-ons->addonsshared.dart
Then inside addonsShared array paste the following content
{"Rating": SpurtProductReviews(), "data":""},
{"ProductReview":SpurtProductRating(),"data":""},
{"Comparerating":SpurtComparerating(),"data":""},
{"Vendorrating":SpurtVendorrating(),"data":""},After placing the above files it will look like this,
List addonsShared = [
{"Rating": SpurtProductReviews(), "data":""},
{"ProductReview":SpurtProductRating(),"data":""},
{"Comparerating":SpurtComparerating(),"data":""},
{"Vendorrating":SpurtVendorrating(),"data":""},
];
Then give the following imports
import
'package:spurtcommerce/module/add-ons/RatingAndReview/Page/detailpage_ratingreview.dart';
import 'package:spurtcommerce/module/add-ons/RatingAndReview/Page/cancelorder_ratingreview.dart';
import 'package:spurtcommerce/module/add-ons/comparerating/comparerating.dart';
import 'package:spurtcommerce/module/add-ons/vendorrating/vendorrating.dart';Or
There will be a popup for quick fix
Step 3 : Module details
After executing the above mentioned steps, we have to place these below lines in the module folder to show the rating and review to the user.
Detail rating and review
Once you finished updating the configuration then in the projectFolder->lib->module->Tab->Product-detailpage->presentation->pages->details.dart
Use this line for view the rating
findMyClass('Rating', {
"slug":
detail.details["productSlug"],
"details": {
"productId":
detail.details["productId"],
"Images": detail
.details['productImage'],
"price": detail.price,
"name": detail.details["name"]
}
}),
Post your rating and feedback
If you want to post your rating and feedback for your ordered products add the below line where you feel free in projectFolder->lib->module->Tab->Profile->Myorders->pages->orderdetails.dart
Use this line for view the rating
findMyClass("ProductReview", {
"orderdetail":
orderdetailscubit.orderDeatil
}),
Compare rating
If you want to see rating for compared products add the below line where you feel free in projectFolder->lib->module->Tab->Profile->Compare->pages->compare.dart
Use this line for view the rating
findMyClass("Comparerating", {
"comparedata": comparebloc
.compareData
}),
Vendor rating
If you want to see seller detail rating for seller add the below line where you feel free in projectFolder->lib->module->Tab->Profile->seller->pages->sellerdetail.dart
Use this line for view the rating
findMyClass("Vendorrating",{
"rating":vendordetailCubit
.vendortotalRating
})
After insert the line restart your application and post your ordered products rating and feedback
Step 4 : Run the application
After integrating the Rating and Review Module into Spurt Commerce, you can use the following commands to run the application in terminal.
$ flutter runOr
In Run menu select run without debugging
In case if throws any exception
$ flutter run –no-sound-null-safetyOnce you execute the above command you can view the installed module in Spurt Commerce, within the page in which you have integrated
Step 5 : Make the build
In order to build, you need to run the following commands. In order to check the application, run the following commands and build the application.
$flutter buildIf you want to split the abi then
$flutter build –split-per-abiFor bundle build
$flutter build appbundle
Last updated