For the complete documentation index, see llms.txt. This page is also available as Markdown.

Question and Answer Add-on old

Installation of Spurtcommerce Question and Answer Add-On

This document will help you to install Question and Answer add-on to your spurtcommerce server for single vendor as well as multi vendor

you can install this Add-on through following steps

step 1: Setup an API (Step By Step) to add extension for admin

step 2: Admin setup

step 3: you can easily install admin storefront with store setup. spurtcommerce provides 3 admin storefronts, built with Angular, Flutter and React.

Along with the above steps you need to further follow these steps below to install this Add-on for Multi-vendor platform

step 4: Setup an API (Step By Step) to add extension for multi vendor

step 5 : Multi Vendor front end setup

step 6: you can easily install vendor storefront with store setup. spurtcommerce provides 3 vendor storefronts, built with Angular, Flutter and React.

About Addon :

The Installation of Spurtcommerce Questions and Answers for Admin Products is for adding more information about product to let Customers know about what the product looks like, and what function it can perform. This feature also allows Customers to post questions for gathering information so that they can make an appropriate decision about purchase. When the plugin is installed, the Multi-Vendor eCommerce site becomes ready for Admin and Vendor to post questions and answers and also for Customers to ask questions about a product.

Features:

  • The Admin and vendor can post questions and answers about products in order to give more details on the uses, specifications and attributes of the product.

  • The Customers can view the questions and answers posted by the Admin on the product detail page.

  • Customers can post questions about the products, to which the admin can answer.

  • Customers can also answer questions about a product posted by another Customer, provided they have already purchased the particular product.

  • A question on the product can have multiple answers (answered by purchased customers or admin). However, Admin can enable any one as the default answer to show the display. On clicking ‘see more’, other answers will appear.

  • Admin and Vendor can enable any one answer from the multiple answers to a question on the product, from their control panel.

Setup an API (Step By Step)

For setting up the API, you need to execute the following steps:

  • Installing an extension

  • 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.

Usually spurtcommerce comes packed in a zip, whose name ends in "questionandanswer-addOn.zip". Extract the zip file, open api folder and open addon folder within that and copy the content of addon folder into the specified path

Path - <PROJECT_ROOT>/add-ons

Step 2 : Run the application

After you have completed the installation of the above mentioned steps, you can run the application and also view the changes.

Once you execute the above command, add-on file will get integrated into the backend API.

Step 3 : Make the build

These are the steps that need to be followed for generating the build.

To run the below command

Then latest built files can be deployed into the server.

Admin Setup

These are the steps that need to be followed to do the front end admin 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qa-addOn.zip".

Extract the zip file and copy the content of admin/add-ons folder into the specified path

Path - admin/add-ons

Note:

1) In add-ons folder if already a cms folder exists.

Inside cms folder paste Question and answer folder.

In cms routing file(cms.routing.ts) paste the below code.

export const questionAnswerRoutes = [

{

path: 'question_answer',

loadChildren: () => import('./QuestionAndAnswer/questionAnswer.module').then(m => m.questionAnswerModule),

canActivate: [AuthGuard],

},

];

2) Inside the addon if the cms folder doesn’t exist.

Paste the cms folder in add-ons.

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.

Update Reducer Config

Import below line into the add-ons/add-ons-reducer.ts

Add the reducer into the below object

questionAnswer: fromQuestionAnswer.reducer,

After adding its looks like below

Update State Config

Import below line into the add-ons/add-ons-state.ts

Add the state into the below object

After adding its looks like below

export interface AddOnAppState {

questionAnswer: questionAnswerState;

}

Step 3 : Change the routing file(cms.routing.ts) Inside the src/theme/default/admin/cms/components/manage-content/manage-content.routing.ts

Import below line

Add these routes below the manageContentRoutes array

Add Question And Answer Tab

In src/theme/admin/cms/components/header.component.html

Below line no:30

Step 4 : Run the application

After you have integrated the Question And Answer Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

Store 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qa-addOn.zip".

Extract the zip file and copy the content of store-angular/add-ons folder into the specified path

Path - store-angular/add-ons

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.

Update Reducer Config

Import below line into the add-ons/add-ons-reducer.ts

Add the reducer into the below object

questionAndAnswer: fromQuestionAndAnswer.reducer,

After adding its looks like below

Update Effect Config

Import below line into the add-ons/add-ons.effect.ts

Add the effect into the below object

QuestionAnswerEffect

After adding its looks like below

export const ADD_ON_EFFECT = [

QuestionAnswerEffect

];

Update State Config

Import below line into the add-ons/add-ons-state.ts

Add the state into the below object

questionAndAnswer: questionAnswerState;

After adding its looks like below

export interface AddOnAppState {

questionAndAnswer: questionAnswerState;

}

Update Component Config

  • Import below line into the add-ons/add-ons.shared.component

  • Add the following components into the below object

PostQuestionComponent,

ReportAbuseComponent,

PostAnswerComponent,

ProductQuestionComponent,

ControlsQuestionsComponent,

AnswerListComponent

  • After adding its looks like below

export const ADD_ON_COMPONENTS = [ PostQuestionComponent, ReportAbuseComponent, PostAnswerComponent, ProductQuestionComponent, ControlsQuestionsComponent, AnswerListComponent ];

Step 3 : Module Detail

The modules pertaining to controls-question and products-question are listed below. You may use these modules, in any page of Spurtcommerce.

Also, you can find the steps below to use the modules in WidgetList and WidgetProducts in Spurtcommerce pages.

In the rating and review addon having six components.

  1. PostQuestionComponent,

  2. ReportAbuseComponent,

  3. PostAnswerComponent,

  4. ProductQuestionComponent,

  5. ControlsQuestionsComponent,

  6. AnswerListComponent

ControlsQuestionsComponent

Directive

In the above directive have one input field

productDetails:[]

Step 4 : Run the application

After you have integrated the WidgetList and WidgetProduct Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

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.

Extract the store-flutter folder inside the folder go to (store-fluter → add-ons → QuestionAndAnswer folder) and copy the QuestionAndAnswer folder and place the copied folder

inside the project folder

Add on location:

projectFolder->lib->add-ons

After placing it it will look like this

projectFolder->lib->add-ons->QuestionAndAnswer

Once you finish these steps continue to the next step

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->add-ons->addonsshared.dart

Then inside addonsShared array paste the following content

After placing the above files it will look like this

List addonsShared = [ {"Questions": SpurtQuestions(), "data":""}, ];

Then give the following imports

Or

There will be a popup for quick fix

Step 3 : Module detail

After executing the above mentioned steps, we have to place these below lines in the core folder to show the question and answer to the user.

Detail Question and Answer

Once you finished updating the configuration then in the projectFolder->lib->core->modules->detail->details.dart file update this line where you seem comfortable with

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

Or

In Run menu select run without debugging In case if throws any exception

$ flutter run –no-sound-null-safety

Once 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.

If you want to split the abi then

For bundle build

These are the steps that need to be followed to do the front end store setup.

  • Installing an extension

  • Update the configuration

  • 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qa-addOns.zip". Extract the zip file and copy the content of store-react/addOns into the specified path as given below

Path - addOns/QuestionAndAnswer

Add on location:

projectFolder-> addOns

After placing it it will look like this

projectFolder->addOns-> QuestionAndAnswer

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce addonsconfig.js files. For this, you need to follow the steps below.

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file

Import below line into the addonconfig.js

Add the QuestionandAnswer plugin into the below object

export const AddonsComponent={

SpurtQuestionAndAnswer }

Step 3 : Module Detail

The modules pertaining to Question and Answer plugin are listed below. You may use these modules, you must send the productId to use this module in any page of Spurtcommerce.

QuestionandAnswer Component:

{ConnectPlugin.SpurtQuestionAndAnswer &&<ConnectPlugin.SpurtQuestionAndAnswer productId={productId}/>}

Step 4 : Run the application

After you have integrated the SpurtQuestionAndAnswer Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

Set up API (step by step) to add extension for Multi vendor

For setting up the API, you need to execute the following steps:

  • Installing an extension

  • 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.

Usually spurcommerce comes packed in a zip, whose name ends in "vendorquestionandanswer-addOn.zip".

Extract the zip file and copy the content of api folder into the specified path as given below.

Path - <PROJECT_ROOT>/add-ons

Step 2 : Run the application

After you have completed the installation of the above mentioned steps, you can run the application and also view the changes.

Once you execute the above command, add-on file will get integrated into the backend API.

Step 3 : Make the build

These are the steps that need to be followed for generating the build.

To run the below command

Then latest built files can be deployed into the server.

Multi Vendor front end Setup

These are the steps that need to be followed to do the front end admin 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.

Usually spurcommerce comes packed in a zip, whose name ends in "vendorproductquestionandanswer-addOn.zip".

Extract the zip file and copy the content of vendor/add-ons folder into the specified path

Path - vendor/add-ons

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.

Update Reducer Config

Import below line into the add-ons/add-ons-reducer.ts

Add the reducer into the below object

questionAnswer: fromQuestionAnswer.reducer,

After adding its looks like

Update State Config

Import below line into the add-ons/add-ons-state.ts

Add the state into the below object

After adding its looks like below

export interface AddOnAppState {

questionAnswer: ProductState;

}

Update Effect Config add-ons/add-ons.effect.ts

Add the effect into the below object

ProductEffect,

After adding its looks like below

export const ADD_ON_EFFECT = [

ProductEffect

];

Update Component Config add-ons / add-ons.shared.component.ts

Add the following components into the below object

addOnQuestionsDetailComponent,

addOnQuestionComponent,

addOnProductListComponent,

After adding its looks like below

export const ADD_ON_COMPONENTS = [

addOnQuestionsDetailComponent,

addOnQuestionComponent,

addOnProductListComponent

]

Step 3 : Module Detail

The modules pertaining to productvariantlist and productvariantupdate are listed below. You may use these modules, in any page of Spurtcommerce.

Also, you can find the steps below to use the modules in Product Variant in Spurtcommerce pages.

In the ProductQuestionAndAnswer addon having two component.

VariantProductListComponent,

VariantProductAddComponent

Routing

In src/app/default/pages/component/cms/manage-content/manage-content.module

Import below line

2) Add these routes below the Routes array

For setting up the tab add this line in

src/app/default/pages/component/cms/layout/products.component.html

Below line no:37

Step 4 : Run the application

After you have integrated the Question And Answer Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

Store 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qa-addOn.zip".

Extract the zip file and copy the content of store-angular/add-ons folder into the specified path

Path - store-angular/add-ons

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.

Update Reducer Config

Import below line into the add-ons/add-ons-reducer.ts

Add the reducer into the below object

questionAndAnswer: fromQuestionAndAnswer.reducer,

After adding its looks like below

Update Effect Config

Import below line into the add-ons/add-ons.effect.ts

Add the effect into the below object

QuestionAnswerEffect

After adding its looks like below

export const ADD_ON_EFFECT = [

QuestionAnswerEffect

];

Update State Config

Import below line into the add-ons/add-ons-state.ts

Add the state into the below object

questionAndAnswer: questionAnswerState;

After adding its looks like below

export interface AddOnAppState {

questionAndAnswer: questionAnswerState;

}

Update Component Config

  • Import below line into the add-ons/add-ons.shared.component

  • Add the following components into the below object

PostQuestionComponent,

ReportAbuseComponent,

PostAnswerComponent,

ProductQuestionComponent,

ControlsQuestionsComponent,

AnswerListComponent

  • After adding its looks like below

export const ADD_ON_COMPONENTS = [ PostQuestionComponent, ReportAbuseComponent, PostAnswerComponent, ProductQuestionComponent, ControlsQuestionsComponent, AnswerListComponent ];

Step 3 : Module Detail

The modules pertaining to controls-question and products-question are listed below. You may use these modules, in any page of Spurtcommerce.

Also, you can find the steps below to use the modules in WidgetList and WidgetProducts in Spurtcommerce pages.

In the rating and review addon having six components.

  1. PostQuestionComponent,

  2. ReportAbuseComponent,

  3. PostAnswerComponent,

  4. ProductQuestionComponent,

  5. ControlsQuestionsComponent,

  6. AnswerListComponent

ControlsQuestionsComponent

Directive

In the above directive have one input field

productDetails:[]

Step 4 : Run the application

After you have integrated the WidgetList and WidgetProduct Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

These are the steps that need to be followed to do the front end store setup.

  • Installing an extension

  • Update the configuration

  • 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qavendor-.addOn.zip". Extract the zip file and copy the content of store folder into the specified path as given below

Move QuestionAndAnswer folder from addOns/QuestionAndAnswer to Path - <PROJECT_ROOT>/addOns

Add on location:

projectFolder-> addOns

After placing it it will look like this

projectFolder->addOns-> QuestionAndAnswer

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce addonsconfig.js files. For this, you need to follow the steps below.

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file

  • Import below line into the addonconfig.js

  • Add the QuestionandAnswer plugin into the below object

Step 3 : Module Detail

The modules pertaining to Question and Answer plugin are listed below. You may use these modules, you must send the productId to use this module in any page of Spurtcommerce.

QuestionandAnswer Component:

{ConnectPlugin.SpurtQuestionAndAnswer &&<ConnectPlugin.SpurtQuestionAndAnswer productId={productId}/>}

Step 4 : Run the application

After you have integrated the SpurtQuestionAndAnswer Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Then the latest built files can be deployed into the server.

These are the steps that need to be followed to do the front end store setup.

  • Installing an extension

  • Update the configuration

  • 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.

Usually spurcommerce comes packed in a zip, whose name ends in "qa-addOns.zip". Extract the zip file and copy the content store-react/addOns into the specified path as given below

Path - addOns/QuestionAndAnswer

Add on location:

projectFolder-> addOns

After placing it it will look like this

projectFolder->addOns-> QuestionAndAnswer

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce addonsconfig.js files. For this, you need to follow the steps below.

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file

Import below line into the addonconfig.js

Add the QuestionandAnswer plugin into the below object

export const AddonsComponent={

SpurtQuestionAndAnswer }

Step 3 : Module Detail

The modules pertaining to Question and Answer plugin are listed below. You may use these modules, you must send the productId to use this module in any page of Spurtcommerce.

QuestionandAnswer Component:

{ConnectPlugin.SpurtQuestionAndAnswer &&<ConnectPlugin.SpurtQuestionAndAnswer productId={productId}/>}

Step 4 : Run the application

After you have integrated the SpurtQuestionAndAnswer Module into Spurtcommerce, you can use the following command to run the application.

Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.

Step 5 : Make the build

To run the below command

Last updated