# Quotation Request Add-on old

**Installation of Spurtcommerce Quotation Request Add-On**

This document will help you to install **Quotation Request** 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)[<mark style="color:blue;">Setup an API (Step By Step)</mark> ](#user-content-fn-1)[^1]to add extension for admin

step 2: [<mark style="color:blue;">Admin setup</mark>](#admin-setup)

step 3: you can easily install admin storefront with[ <mark style="color:blue;">store setup</mark><mark style="color:blue;">**.**</mark>](#store-setup) spurtcommerce provides 3 admin storefronts, built with <mark style="color:blue;">Angular,</mark>[ <mark style="color:blue;">Flutter</mark>](#flutter) and[ <mark style="color:blue;">React.</mark>](#react) &#x20;

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

step 4: <mark style="color:blue;">Setup an API (Step By Step)</mark> to add extension for multi vendor

step 5 :[ <mark style="color:blue;">Multi Vendor front end setup</mark>](#multi-vendor-frontend-setup)

step 6: you can easily install vendor storefront with[ <mark style="color:blue;">store setup</mark><mark style="color:blue;">**.**</mark> ](#store-setup-1)spurtcommerce provides 3 vendor storefronts, built with [<mark style="color:blue;">Angular,</mark>](#store-setup-1) [<mark style="color:blue;">Flutter</mark> ](#store-setup-1)and [<mark style="color:blue;">React.</mark>  ](#store-setup-1)

About Add-on

The Installation of Spurtcommerce Quotation request addon will enable the feature of accepting quotation requests from the end customer. When the plugin is installed, the multi-Vendor eCommerce site becomes ready for the admin to enable quotation requests for each product separately. On enabling the quotation request, the customer in the storefront can raise quotation request for a particular product.

Features:

• The quotation request can be enabled or configured for each product     separately from the product list page.&#x20;

• On enabling the toggle, the product detail page will have the option of    'Request a Quote'.&#x20;

• The Customer can click on the 'Request a Quote'and fill in the form and submit to request for a quotation.

\
• On submission, the admin and both admin and vendor in Multi vendor  platform will receive a the quotation request, which they can view from the quotation requests list.

#### [<mark style="color:blue;">**Setup an API (Step By Step)**</mark>](#setup-an-api-step-by-step)

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

* Installing an extension&#x20;
* Run the application&#x20;
* Make the build

**Step 1 : Installing an extension**&#x20;

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 <mark style="color:green;">**"productquotation-addOn.zip".**</mark> Extract the zip file, open api folder and open addon folder within that and copy the content of addon folder into the specified path.

&#x20;                                      **Path - \<PROJECT\_ROOT>/addon**

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

```
$ npm start serve
```

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

```
$ npm run build
```

Then latest built files can be deployed into the server.

## <mark style="color:blue;">Admin setup</mark>

These are the steps that need to be followed to do the front end admin setup.&#x20;

<br>

* &#x20;Installing an extension
* Update the configuration
* Module Detail
* Run the application
* Make the build

\
**Step 1 : Installing an extension**

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

These are the steps that need to be executed for installation of the extension.

&#x20;Usually spurcommerce comes packed in a zip, whose name ends in ".addOn.zip".&#x20;

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

&#x20;                                                **Path - admin/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.

&#x20;**Update Reducer Config**

1. &#x20;Import below line into the <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```
import * as fromQuotationRequest from
 './sales/manage-orders/quotationRequest/core/reducer/quotationRequest.reducer'



```

&#x20;                             Add the reducer into the below object

&#x20;                            **quotation: fromQuotationRequest.reducer**

1. **After adding its looks like below**

export const AddOnReducers: ActionReducerMap\<State> = {

&#x20;     quotation: fromQuotationRequest.reducer

};

**Update State Config**

1. &#x20;Import below line into the <mark style="color:green;">**add-ons/add-ons-state.ts**</mark>

```
 import { QuotationRequestState } from
  './sales/manage-orders/quotationRequest/core/reducer/quotationRequest.state';

```

2\. **Add the state into the below object**

quotation:QuotationRequestState

3\. **After adding its looks like below**

&#x20;                                 export interface AddOnAppState {

&#x20; quotation:QuotationRequestState

<br>

}

**Step 3 : Change the routing file**<mark style="color:green;">**(sales.routing.ts)**</mark>

Inside the <mark style="color:green;">**src/theme/default/admin/sales/components/manage-orders/manage-orders.routing.ts**</mark>

1. Import below line

```
    import * as SalesInventoryRoutes  from 
    '../../../../../../../add-ons/sales/sales.routing';

```

2\. Add these routes below the cmsRoutes array

```
  manageOrderRoutes.forEach(data => {
  if (data) {
   manageOrderRoutes.push(SalesInventoryRoutes.quotationRequestRoutes[0]);
  }
});

```

Inside the <mark style="color:green;">**src/theme/defalut/admin/sales/components/header.component.html**</mark>&#x20;

<mark style="color:green;">**Below line no:34**</mark>

```

 <li>
                       <a href="javascript:void(0)" [routerLink]="['/sales/manage-orders/quotation_request']" [routerLinkActive]="'active'"> Quotation request </a>
                       </li>


```

**Step 4 : Run the application**

After you have integrated the Quotation Request Module into Spurtcommerce, you can use the following command to run the application.&#x20;

```
 npm run large-serve

```

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

**Step 5 : Make the build**

To run the below command

```
npm run large-build
```

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

## <mark style="color:blue;">**Store setup**</mark>

{% tabs %}
{% tab title="Angular" %}
These are the steps that need to be followed to do the front end admin setup.

&#x20;

●       Installing an extension

●      Update the configuration

●      Module Detail

●      Run the application

●      Make the build

&#x20;

**Step 1 : Installing an extension**

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

&#x20;

These are the steps that need to be executed for installation of the extension.

&#x20;Usually spurcommerce comes packed in a zip, whose name ends in ".addOn.zip".

&#x20;               Extract the zip file and copy the content of api folder into the specified path

&#x20;                                          **Path -  \<PROJECT\_ROOT>/add-ons**

&#x20;

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

&#x20;

&#x20;**Update Reducer Config**

&#x20;

1\)      Import below line into the <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```
      import * as fromQuotationList from   
       './QuotationRequset/core/reducer/quotationList.reducer';

```

2\)     Add the reducer into the below object

```
        quotationList: fromQuotationList.reducer,

```

3\)     After adding its looks like below

&#x20;export const AddOnReducers: ActionReducerMap\<State> = {                                     &#x20;

&#x20;                   quotationList: fromQuotationList.reducer,

&#x20;                                 }

**Update State Config**

1\)      Import below line into the <mark style="color:green;">**add-ons/add-ons-state.ts**</mark>

```
    import { QuotationListState } from 
    './QuotationRequset/core/reducer/quotationList.state';

```

&#x20;

2\)       Add the state into the below object

```
  quotationList:QuotationListState,

```

3\)     After adding its looks like below

&#x20;                                   export interface AddOnAppState {

&#x20;       quotationList:QuotationListState,

}

**Update Effect Config**

Import below line into the <mark style="color:green;">**add-ons/add-ons.effect.ts**</mark>

```
    import { QuotationListEffect } from                   
              './QuotationRequset/core/effects/quotationList.effects';

```

&#x20;Add the effect into the below object

**QuotationListEffect**

After adding its looks like below

&#x20;export const ADD\_ON\_EFFECT = \[

&#x20;       QuotationListEffect

]

**Update Component Config**

1. Import below line into the <mark style="color:green;">**add-ons/add-ons.shared.component**</mark>

```
import { MakeQuotationComponent } from 
'./QuotationRequset/template/make-quotation/make-quotation.component';

```

```
import { MakeQuatationPopupComponent } from 
'./QuotationRequset/template/model/make-quotation-popup/make-quotation-popup.component';

```

Add the following components into the below object&#x20;

&#x20;                                        MakeQuotationComponent,&#x20;

&#x20;                                                MakeQuatationPopupComponent

1. **After adding its looks like below**

&#x20;   export const ADD\_ON\_COMPONENTS = \[

&#x20;               MakeQuotationComponent,

&#x20;               MakeQuatationPopupComponent

]

**Step 3 : Module Detail**

The modules pertaining to quotationlist are listed below. You may use these modules, in any page of Spurtcommerce.&#x20;

Also, you can find the steps below to use the modules in quotationlist  in Spurtcommerce pages.&#x20;

&#x20; In the QuotationRequest addon having two components.

1. MakeQuotationComponent
2. MakeQuatationPopupComponent
3. QuotationListComponent

<br>

MakeQuotationComponent

&#x20;                            Directive&#x20;

```
 <app-spurt-make-quotation></app-spurt-make-quotation>
```

&#x20;                                 in ControlsProductDetailComponent

\
MakeQuatationPopupComponent

&#x20;    Directive

```
 <app-spurt-make-quotation></app-spurt-make-quotation>
```

&#x20;              &#x20;

QuotationListComponent

&#x20;                    This is a one page component. You can configure the route for this component.This component works,when the quotation list available

The route for this component:

```
 export const requestroutes = [
    
        {
             path: '', component: QuotationListComponent, data: { breadcrumb: 'Quotation Request List', urls: [{ title: 'Account' }, { title: 'Quotation Request List' }] } },
    
  
  ];

```

Import lines below <mark style="color:green;">**src/default/pages/account/account.module.ts**</mark>

```
import { QuotationListComponent } from 'add-ons/QuotationRequset/template/quotation-list/quotation-list.component';
```

<mark style="color:green;">**Add these lines below the routes array on src/default/pages/account/account.module.ts**</mark>

<mark style="color:green;">**Below line No:81**</mark>

```
    { path: 'quotation-list', component: QuotationListComponent, data: { breadcrumb: 'Quotation Request List', urls: [{ title: 'Account' }, { title: 'Quotation Request List' }] } },

```

Add these lines below the links array on <mark style="color:green;">**src/default/pages/account/account.component.ts**</mark>

<mark style="color:green;">**Below line No:42**</mark>

```

   { name: 'Quotation list', href: 'quotation-list', icon: 'add_shopping_cart', isClicked: false,option:'' },

```

**Step 4 : Run the application**&#x20;

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

```
 ng serve
```

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**

&#x20;         To run the below command

```
  ng build –prod

```

&#x20;         Then the latest built files can be deployed into the server.&#x20;

&#x20;&#x20;

\ <br>
{% endtab %}

{% tab title="React" %}

## Front End SetUp

These are the steps that need to be followed to do the front end store setup.&#x20;

* Installing an extension
* Update the configuration
* Run the application
* Make the build

#### &#x20;Step 1 :  Installing an extension

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

These are the steps that need to be executed for installation of the extension.

<br>

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

**Path - addOns/Quotation**

&#x20;

**Add on location:**

projectFolder->addOns

**After placing it it will look like this**

projectFolder->addOns->Quotation

**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.&#x20;

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file&#x20;

1. Import below line into the addonconfig.js

<mark style="color:green;">**import SpurtQuotationPop from './Quotation/QuoteModal'**</mark>

<mark style="color:green;">**import SpurtQuotationList from './Quotation/QuotationList'**</mark>

2\. Add the PartialSpecification into the below object         &#x20;

<mark style="color:green;">**export const AddonsComponent={**</mark>

<mark style="color:green;">**SpurtQuotationPop,**</mark>

<mark style="color:green;">**SpurtQuotationList**</mark>

<mark style="color:green;">**}**</mark>

**Step 3 : Module Detail**

The modules pertaining to RelatedProduct are listed below. You may use these modules, in any page of Spurtcommerce.&#x20;

SpurtQuotationPop Component: &#x20;

Implement this plugin for quotation popup model for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationPop &&  \<ConnectPlugin.SpurtQuotationPop product={product}/>}**</mark> &#x20;

SpurtQuotationComp Component:&#x20;

Implement this plugin for Listing a quotation for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationList &&  \<ConnectPlugin.SpurtQuotationList />}**</mark>

**Step 4 : Run the application**

After you have integrated the Quotation Module into Spurtcommerce, you can use the following command to run the application.&#x20;

```
$ npm run dev
```

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

**Step 5 : Make the build**

To run the below command

```
$ npm run build or yarn nun build
```

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

\ <br>
{% endtab %}

{% tab title="Flutter" %}

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

* 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 → Quotation folder) and copy the Quotation folder  and place the copied folder&#x20;

inside the project folder

<br>

**Add on location:**\
projectFolder->lib->add-ons

**After placing it it will look like this**\
projectFolder->lib->add-ons->Quotation

\
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<br>

&#x20; <mark style="color:green;">**{"Quotation": SpurtQuotation(), "data":""},**</mark>

After placing the above files it will look like this

\ <mark style="color:green;">**List addonsShared = \[**</mark>

&#x20;  <mark style="color:green;">**{"Quotation": SpurtQuotation(), "data":""},**</mark>

<mark style="color:green;">**];**</mark><br>

Then give the following imports

<mark style="color:green;">**import 'package:spurtcommerce/add-ons/Quotation/makequotation.dart';**</mark>

Or&#x20;

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 make quotation button to the user.&#x20;

**1)  MakeQuotation**

Once you finished updating the configuration then in the <mark style="color:green;">**projectFolder->lib->core->modules->detail->details.dart**</mark>

&#x20;file update this line where you seem comfortable with

&#x20;<mark style="color:green;">**findMyClass("Quotation", {“details”:details}),**</mark>

Add this line to get make quotation section

**Step 4 : Run the application**

After integrating the make quotation Module into Spurt Commerce, you can use the following commands to run the application in terminal.&#x20;

```
$ flutter run
```

Or&#x20;

In Run menu select run without debugging

In case if throws any exception&#x20;

```
$ 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.&#x20;

```
$flutter build
```

If you want to split the abi then

```
$flutter build –split-per-abi
```

For bundle build

```
$flutter build appbundle
```

#### QuotationList

These are the steps that need to be followed to do the front end store setup.&#x20;

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

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

<br>

Extract the flutter.zip file and place the extracted files inside the add-ons folder inside the project folder

**Add on location:**\
projectFolder->lib->add-ons

After placing it it will look like this\ <mark style="color:green;">**projectFolder->lib->add-ons->Quotation**</mark>

\
Once you finish these steps continue to the next step<br>

**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**

<mark style="color:green;">**projectFolder->lib->add-ons->addonsshared.dart**</mark>

Then inside addonsShared array paste the following content

&#x20;<mark style="color:green;">**{"QuotationList": SpurtQuotationName(), "data":""},**</mark>

After placing the above files it will look like this

\ <mark style="color:green;">**List addonsShared = \[**</mark>

&#x20;  <mark style="color:green;">**{"QuotationList": SpurtQuotationName(), "data":""},**</mark>

<mark style="color:green;">**];**</mark><br>

Then give the following imports

<mark style="color:green;">**import 'package:spurtcommerce/add-ons/Quotation/quotationlist.dart';**</mark>

Or&#x20;

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 Quotation List  to the user.&#x20;

**1)  QuotationList**

Once you finished updating the configuration then in the <mark style="color:green;">**projectFolder->lib->core->modules->shared->drawer.dart**</mark>

&#x20;file update this line where you seem comfortable with

&#x20;<mark style="color:green;">**findMyClass("QuotationList", {“req”:””}),**</mark>

Add this line to get quotation list blogs section

**Step 4 : Run the application**

After integrating the Quotation list Module into Spurt Commerce, you can use the following commands to run the application in terminal.&#x20;

```
$ flutter run
```

Or&#x20;

In Run menu select run without debugging

In case if throws any exception&#x20;

```
$ 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.&#x20;

```
$flutter build
```

If you want to split the abi then

```
$flutter build –split-per-abi
```

For bundle build

```
$flutter build appbundle
```

<br>

\
\ <br>

\
\ <br>
{% endtab %}
{% endtabs %}

### [<mark style="color:blue;">**Setup an API (Step By Step) to add  extension for multi vendor**</mark>](#setup-an-api-step-by-step-to-add-extension-for-multivendor)

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

* Installing an extension&#x20;
* Run the application&#x20;
* Make the build

**Step 1 : Installing an extension**&#x20;

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 "<mark style="color:green;">**vendorproductvariant-addOn.zip**</mark>". Extract the zip file and copy the content of api folder into the specified path

&#x20;                                      **Path - \<PROJECT\_ROOT>/addon**

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

```
$ npm start serve
```

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

```
$ npm run build
```

Then latest built files can be deployed into the server.<br>

### [<mark style="color:blue;">Multi vendor frontend  Setup</mark> ](#vendor-setup)

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

&#x20;

●       Installing an extension

●      Update the configuration

●      Module Detail

●      Run the application

●      Make the build

**Step 1 : Installing an extension**

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

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

&#x20;           Extract the zip file and copy the content of api folder into the specified path

&#x20;                 **Path -  \<PROJECT\_ROOT>/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.

&#x20;**Update Reducer Config**

1\)     Import below line into the <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```

import * as fromQuotationRequest from 
'./Quotation/core/reducer/QuotationRequest.reducer';

```

2\)   **Add the reducer into the below object**

```
       
     QuotationRequest:fromQuotationRequest.reducer,
                                                 
```

3\)  **After adding its looks like below**

&#x20;           export const AddOnReducers: ActionReducerMap\<State> = {

&#x20;                                                    QuotationRequest:fromQuotationRequest.reducer,

&#x20;                                           };                                           &#x20;

**Update State Config**              &#x20;

1\)     Import below line into the <mark style="color:green;">**add-ons/add-ons-state.ts**</mark>

```
  import { QuotationRequestState } from 
  "./Quotation/core/reducer/QuotationRequest.state";

```

2\)     Add the state into the below object

```
  QuotationRequest:QuotationRequestState;

```

&#x20;

3\)     After adding its looks like below

&#x20;                              export interface AddOnAppState {

&#x20;                                 QuotationRequest:QuotationRequestState;

&#x20;                                }

**Update Effect Config**

1\)     Import below line into the <mark style="color:green;">**add-ons/add-ons.effect.ts**</mark>

```
   import { QuotationRequestEffect } from 
   "./Quotation/core/effects/QuotationRequest.effect";

```

&#x20;           &#x20;

2\)     Add the effect into the below object

```
   QuotationRequestEffect,

```

3\)     After adding its looks like below

&#x20;                         export const ADD\_ON\_EFFECT = \[

&#x20;                                     QuotationRequestEffect,

];

**Update Component Config**

1\)    Import below line into the <mark style="color:green;">**add-ons/add-ons.shared.ts**</mark>

```
     import { QuotationListComponent } from 
     "./Quotation/template/quotation-list/quotation-list.component";

```

&#x20;

```
import { QuotationRequestComponent } from 
"./Quotation/template/quotation-request/quotation-request.component";

```

```
import { QuotationListViewComponent } from 
"./Quotation/template/quotation-list-view/quotation-list-view.component";

```

```
import { QuotationListDetailComponent } from "./Quotation/template/quotation-list-detail/quotation-list-detail.component";

```

2\)    Add the following components into the below object

&#x20;                                             QuotationListComponent,

&#x20;                                         QuotationRequestComponent,

&#x20;                                         QuotationListViewComponent

&#x20;                                        QuotationListDetailComponent

<br>

&#x20;     &#x20;

3\)     After adding its looks like below

&#x20;       **export const ADD\_ON\_COMPONENTS = \[**

&#x20;                      **QuotationListComponent,**

&#x20;                      **QuotationRequestComponent,**

&#x20;                      **QuotationListViewComponent**

&#x20;                  **QuotationListDetailComponent**

&#x20;     &#x20;

&#x20;**]**

**Step 3 : Module Detail**

The modules pertaining to quotationlist,quotationrequest and quotationlistview are listed below. You may use these modules, in any page of Spurtcommerce.

&#x20;

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

&#x20;

In the Quotation addon having three component.

1\)     QuotationListComponent,

2\)      QuotationRequestComponent,

3\)      QuotationListViewComponent&#x20;

4\)      QuotationListDetailComponent

**Routing**

&#x20;     In <mark style="color:green;">**src/app/default/pages/component/sales/manage-orders/manage-orders.module.ts**</mark>

&#x20;     &#x20;

1\)      Import below line

```
import { QuotationListComponent } from 
'../../../../../../../add-ons/Quotation/template/quotation-list/quotation-list.component';

```

&#x20;              &#x20;

```
import { QuotationListDetailComponent } from 
'../../../../../../../add-ons/Quotation/template/quotation-list-detail/quotation-list-detail.component';

```

&#x20;        2\)  Add these routes below the Routes array

```
      {
        path: 'quotation-list',
        component:QuotationListComponent,
        data: {
            title: 'Quotation Request',
            urls: [{ title: 'Home', url: '/dashboard' }, { title: 'Products', url: '/products/list' }, { title:  
'Quotation Request' }]
        }
      },

      {
        path: 'quotation-detail/:id', 
        component: QuotationListDetailComponent,
        
        data: {
            title: 'Quotation Request',
            urls: [{ title: 'Home', url: '/dashboard' }, { title: 'Products', url: '/products/list' }, { title: 'Quotation Request' }]
        }
    }

 
 
 
```

&#x20;    In <mark style="color:green;">**src/app/default/pages/component/sales/components/layout/orders.component.html**</mark>

<mark style="color:green;">**Below-line no :30**</mark>

```
<a href="javascript:void(0)"
                               [routerLink]="['/sales/manage-orders/quotation-list']">Quotation Request</a>




```

**Step 4 : Run the application**

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

```
 ng serve
```

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**

&#x20;         To run the below command

```
   ng build –prod
```

&#x20;         Then the latest built files can be deployed into the server.

&#x20;

### **Store setup**

{% tabs %}
{% tab title="Angular" %}
These are the steps that need to be followed to do the front end admin setup.

&#x20;

●       Installing an extension

●      Update the configuration

●      Module Detail

●      Run the application

●      Make the build

&#x20;

**Step 1 : Installing an extension**

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

&#x20;

These are the steps that need to be executed for installation of the extension.

&#x20;Usually spurcommerce comes packed in a zip, whose name ends in ".addOn.zip".

&#x20;               Extract the zip file and copy the content of api folder into the specified path

&#x20;                                          **Path -  \<PROJECT\_ROOT>/add-ons**

&#x20;

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

&#x20;

&#x20;**Update Reducer Config**

&#x20;

1\)      Import below line into the <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```
      import * as fromQuotationList from   
       './QuotationRequset/core/reducer/quotationList.reducer';

```

2\)     Add the reducer into the below object

```
        quotationList: fromQuotationList.reducer,

```

3\)     After adding its looks like below

&#x20;export const AddOnReducers: ActionReducerMap\<State> = {                                     &#x20;

&#x20;                   quotationList: fromQuotationList.reducer,

&#x20;                                 }

**Update State Config**

1\)      Import below line into the <mark style="color:green;">**add-ons/add-ons-state.ts**</mark>

```
    import { QuotationListState } from 
    './QuotationRequset/core/reducer/quotationList.state';

```

&#x20;

2\)       Add the state into the below object

```
  quotationList:QuotationListState,

```

3\)     After adding its looks like below

&#x20;                                   export interface AddOnAppState {

&#x20;       quotationList:QuotationListState,

}

**Update Effect Config**

Import below line into the <mark style="color:green;">**add-ons/add-ons.effect.ts**</mark>

```
    import { QuotationListEffect } from                   
              './QuotationRequset/core/effects/quotationList.effects';

```

&#x20;Add the effect into the below object

QuotationListEffect

After adding its looks like below

&#x20;export const ADD\_ON\_EFFECT = \[

&#x20;       QuotationListEffect

]

**Update Component Config**

1. Import below line into the <mark style="color:green;">**add-ons/add-ons.shared.component**</mark>

```
import { MakeQuotationComponent } from 
'./QuotationRequset/template/make-quotation/make-quotation.component';

```

```
import { MakeQuatationPopupComponent } from 
'./QuotationRequset/template/model/make-quotation-popup/make-quotation-popup.component';

```

Add the following components into the below object&#x20;

&#x20;                                        MakeQuotationComponent,&#x20;

&#x20;                                                MakeQuatationPopupComponent

1. After adding its looks like below

&#x20;   export const ADD\_ON\_COMPONENTS = \[

&#x20;               MakeQuotationComponent,

&#x20;               MakeQuatationPopupComponent

]

**Step 3 : Module Detail**

The modules pertaining to quotationlist are listed below. You may use these modules, in any page of Spurtcommerce.&#x20;

Also, you can find the steps below to use the modules in quotationlist  in Spurtcommerce pages.&#x20;

\
&#x20;In the QuotationRequest addon having two components.

1. MakeQuotationComponent
2. MakeQuatationPopupComponent
3. QuotationListComponent

<br>

MakeQuotationComponent

&#x20;  &#x20;

Directive&#x20;

```
<app-spurt-make-quotation></app-spurt-make-quotation>
```

&#x20;  &#x20;

in ControlsProductDetailComponent

MakeQuatationPopupComponent

&#x20;  Directive

```
  <app-spurt-make-quotation></app-spurt-make-quotation>
```

&#x20;               &#x20;

QuotationListComponent

&#x20;                    This is a one page component. You can configure the route for this component.This component works,when the quotation list available

The route for this component:

```
 export const requestroutes = [
    
        {
             path: '', component: QuotationListComponent, data: { breadcrumb: 'Quotation Request List', urls: [{ title: 'Account' }, { title: 'Quotation Request List' }] } },
    
  
  ];
                                                                                
```

Import lines below <mark style="color:green;">src/default/pages/account/account.module.ts</mark>

```
import { QuotationListComponent } from 'add-ons/QuotationRequset/template/quotation-list/quotation-list.component';
```

Add these lines below the routes array on&#x20;

<mark style="color:green;">**src/default/pages/account/account.module.ts**</mark>

<mark style="color:green;">**Below line No:81**</mark>

```
    { path: 'quotation-list', component: QuotationListComponent, data: { breadcrumb: 'Quotation Request List', urls: [{ title: 'Account' }, { title: 'Quotation Request List' }] } },

```

Add these lines below the links array on <mark style="color:green;">**src/default/pages/account/account.component.ts**</mark>

<mark style="color:green;">**Below line No:42**</mark>

```

   { name: 'Quotation list', href: 'quotation-list', icon: 'add_shopping_cart', isClicked: false,option:'' },

```

**Step 4 : Run the application**&#x20;

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

```
 ng serve
```

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**

&#x20;         To run the below command

```
  ng build –prod

```

&#x20;         Then the latest built files can be deployed into the server.&#x20;

\ <br>
{% endtab %}

{% tab title="React" %}

## Front End SetUp

These are the steps that need to be followed to do the front end store setup.&#x20;

* Installing an extension
* Update the configuration
* Run the application
* Make the build

#### &#x20;Step 1 :  Installing an extension

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

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 ".addOns.zip". Extract the zip file and copy the content of store folder into the specified path as given below

Move Attributes folder from addOns/Quotation to Path - **\<PROJECT\_ROOT>/addOns**

&#x20;Add on location:

projectFolder->addOns

After placing it it will look like this

projectFolder->addOns->Quotation

**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.&#x20;

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file&#x20;

1. Import below line into the addonconfig.js

<mark style="color:green;">**import SpurtQuotationPop from './Quotation/QuoteModal'**</mark>

<mark style="color:green;">**import SpurtQuotationList from './Quotation/QuotationList'**</mark>

2\. Add the PartialSpecification into the below object         &#x20;

<mark style="color:green;">**export const AddonsComponent={**</mark>

<mark style="color:green;">**SpurtQuotationPop,**</mark>

<mark style="color:green;">**SpurtQuotationList**</mark>

<mark style="color:green;">**}**</mark>

**Step 3 : Module Detail**

The modules pertaining to RelatedProduct are listed below. You may use these modules, in any page of Spurtcommerce.&#x20;

SpurtQuotationPop Component: &#x20;

Implement this plugin for quotation popup model for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationPop &&  \<ConnectPlugin.SpurtQuotationPop product={product}/>}**</mark> &#x20;

SpurtQuotationComp Component:&#x20;

Implement this plugin for Listing a quotation for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationList &&  \<ConnectPlugin.SpurtQuotationList />}**</mark>

**Step 4 : Run the application**

After you have integrated the Quotation Module into Spurtcommerce, you can use the following command to run the application.&#x20;

```
$ npm run dev
```

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

**Step 5 : Make the build**

To run the below command

```
$ npm run build or yarn nun build
```

Then the latest built files can be deployed into the server.Front End SetUp

These are the steps that need to be followed to do the front end store setup.&#x20;

* Installing an extension
* Update the configuration
* Run the application
* Make the build

#### &#x20;Step 1 :  Installing an extension

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

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 ".addOns.zip". Extract the zip file and copy the content of store folder into the specified path as given below

Move Attributes folder from addOns/Quotation to Path - **\<PROJECT\_ROOT>/addOns**

&#x20;Add on location:

projectFolder->addOns

After placing it it will look like this

projectFolder->addOns->Quotation

**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.&#x20;

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file&#x20;

1. Import below line into the addonconfig.js

<mark style="color:green;">**import SpurtQuotationPop from './Quotation/QuoteModal'**</mark>

<mark style="color:green;">**import SpurtQuotationList from './Quotation/QuotationList'**</mark>

2\. Add the PartialSpecification into the below object         &#x20;

<mark style="color:green;">**export const AddonsComponent={**</mark>

<mark style="color:green;">**SpurtQuotationPop,**</mark>

<mark style="color:green;">**SpurtQuotationList**</mark>

<mark style="color:green;">**}**</mark>

**Step 3 : Module Detail**

The modules pertaining to RelatedProduct are listed below. You may use these modules, in any page of Spurtcommerce.&#x20;

SpurtQuotationPop Component: &#x20;

Implement this plugin for quotation popup model for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationPop &&  \<ConnectPlugin.SpurtQuotationPop product={product}/>}**</mark> &#x20;

SpurtQuotationComp Component:&#x20;

Implement this plugin for Listing a quotation for a registered user

<mark style="color:green;">**{ConnectPlugin.SpurtQuotationList &&  \<ConnectPlugin.SpurtQuotationList />}**</mark>

**Step 4 : Run the application**

After you have integrated the Quotation Module into Spurtcommerce, you can use the following command to run the application.&#x20;

```
$ npm run dev
```

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

**Step 5 : Make the build**

To run the below command

```
$ npm run build or yarn nun build
```

Then the latest built files can be deployed into the server.
{% endtab %}

{% tab title="Untitled" %}
These are the steps that need to be followed to do the front end store setup. <br>

* 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 flutter.zip file and place the extracted files inside the add-ons folder inside the project folder

**Add on location:**\
projectFolder->lib->add-ons

**After placing it it will look like this**\
projectFolder->lib->add-ons->Quotation

\
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<br>

&#x20; <mark style="color:green;">**{"Quotation": SpurtQuotation(), "data":""},**</mark>

After placing the above files it will look like this

\ <mark style="color:green;">**List addonsShared = \[**</mark>

&#x20;  <mark style="color:green;">**{"Quotation": SpurtQuotation(), "data":""},**</mark>

<mark style="color:green;">**];**</mark><br>

Then give the following imports

<mark style="color:green;">**import 'package:spurtcommerce/add-ons/Quotation/makequotation.dart';**</mark>

Or&#x20;

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 make quotation button to the user.&#x20;

**1)  MakeQuotation**

Once you finished updating the configuration then in the <mark style="color:green;">**projectFolder->lib->core->modules->detail->details.dart**</mark>

&#x20;file update this line where you seem comfortable with

&#x20; <mark style="color:green;">**findMyClass("Quotation", {“productId”:details\[“productId”]}),**</mark>

Add this line to get make quotation section

**Step 4 : Run the application**

After integrating the make quotation Module into Spurt Commerce, you can use the following commands to run the application in terminal.&#x20;

```
$ flutter run
```

Or&#x20;

In Run menu select run without debugging

In case if throws any exception&#x20;

```
$ 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.&#x20;

```
$flutter build
```

If you want to split the abi then

```
$flutter build –split-per-abi
```

For bundle build

```
$flutter build appbundle
```

#### QuotationList

These are the steps that need to be followed to do the front end store setup.&#x20;

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

{% hint style="info" %}
Make sure your device is running on the device or simulator,or it will not show up in the list
{% endhint %}

<br>

Extract the flutter.zip file and place the extracted files inside the add-ons folder inside the project folder

**Add on location:**\
projectFolder->lib->add-ons

After placing it it will look like this\ <mark style="color:green;">**projectFolder->lib->add-ons->Quotationlist**</mark>

\
Once you finish these steps continue to the next step<br>

**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**

<mark style="color:green;">**projectFolder->lib->add-ons->addonsshared.dart**</mark>

Then inside addonsShared array paste the following content

&#x20;<mark style="color:green;">**{"QuotationList": SpurtQuotationName(), "data":""},**</mark>

After placing the above files it will look like this

\ <mark style="color:green;">**List addonsShared = \[**</mark>

&#x20;  <mark style="color:green;">**{"QuotationList": SpurtQuotationName(), "data":""},**</mark>

<mark style="color:green;">**];**</mark><br>

Then give the following imports

<mark style="color:green;">**import 'package:spurtcommerce/add-ons/Quotationlist/quotationlist.dart';**</mark>

Or&#x20;

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 Quotation List  to the user.&#x20;

**1)  QuotationList**

Once you finished updating the configuration then in the <mark style="color:green;">**projectFolder->lib->core->modules->shared->drawer.dart**</mark>

&#x20;file update this line where you seem comfortable with

&#x20;<mark style="color:green;">**findMyClass("QuotationList", {“req”:””}),**</mark>

Add this line to get quotation list blogs section

**Step 4 : Run the application**

After integrating the Quotation list Module into Spurt Commerce, you can use the following commands to run the application in terminal.&#x20;

```
$ flutter run
```

Or&#x20;

In Run menu select run without debugging

In case if throws any exception&#x20;

```
$ 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.&#x20;

```
$flutter build
```

If you want to split the abi then

```
$flutter build –split-per-abi
```

For bundle build

```
$flutter build appbundle
```

{% endtab %}
{% endtabs %}

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spurtcommerce.com/addons/b2b-related-addons/quotation-request-add-on-old.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
