Quotation Request Add-on

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

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

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

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 "productquotation-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>/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.

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

Make sure your device is running on the device or simulator,or it will not show up in the list

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 ".addOn.zip".

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

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.

Update Reducer Config

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

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


Add the reducer into the below object

quotation: fromQuotationRequest.reducer

  1. After adding its looks like below

export const AddOnReducers: ActionReducerMap<State> = {

quotation: fromQuotationRequest.reducer

};

Update State Config

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

 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

export interface AddOnAppState {

quotation:QuotationRequestState

}

Step 3 : Change the routing file(sales.routing.ts)

Inside the src/theme/default/admin/sales/components/manage-orders/manage-orders.routing.ts

  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 src/theme/defalut/admin/sales/components/header.component.html

Below line no:34


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

 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.

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.

Store 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

Make sure your device is running on the device or simulator,or it will not show up in the list

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 ".addOn.zip".

Extract the zip file and copy the content of api folder into the specified path

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.

Update Reducer Config

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

      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

export const AddOnReducers: ActionReducerMap<State> = {

quotationList: fromQuotationList.reducer,

}

Update State Config

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

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

2) Add the state into the below object

  quotationList:QuotationListState,

3) After adding its looks like below

export interface AddOnAppState {

quotationList:QuotationListState,

}

Update Effect Config

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

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

Add the effect into the below object

QuotationListEffect

After adding its looks like below

export const ADD_ON_EFFECT = [

QuotationListEffect

]

Update Component Config

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

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

MakeQuotationComponent,

MakeQuatationPopupComponent

  1. After adding its looks like below

export const ADD_ON_COMPONENTS = [

MakeQuotationComponent,

MakeQuatationPopupComponent

]

Step 3 : Module Detail

The modules pertaining to quotationlist 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 quotationlist in Spurtcommerce pages.

In the QuotationRequest addon having two components.

  1. MakeQuotationComponent

  2. MakeQuatationPopupComponent

  3. QuotationListComponent

MakeQuotationComponent

Directive

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

in ControlsProductDetailComponent

MakeQuatationPopupComponent

Directive

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

QuotationListComponent

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 src/default/pages/account/account.module.ts

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

Add these lines below the routes array on src/default/pages/account/account.module.ts

Below line No:81

    { 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 src/default/pages/account/account.component.ts

Below line No:42


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

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.

 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

To run the below command

  ng build –prod

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

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 "vendorproductvariant-addOn.zip". Extract the zip file and copy the content of api folder into the specified path

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.

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

● Installing an extension

● Update the configuration

● Module Detail

● Run the application

● Make the build

Step 1 : Installing an extension

Make sure your device is running on the device or simulator,or it will not show up in the list

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

Extract the zip file and copy the content of api folder into the specified path

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.

Update Reducer Config

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


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

export const AddOnReducers: ActionReducerMap<State> = {

QuotationRequest:fromQuotationRequest.reducer,

};

Update State Config

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

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

2) Add the state into the below object

  QuotationRequest:QuotationRequestState;

3) After adding its looks like below

export interface AddOnAppState {

QuotationRequest:QuotationRequestState;

}

Update Effect Config

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

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

2) Add the effect into the below object

   QuotationRequestEffect,

3) After adding its looks like below

export const ADD_ON_EFFECT = [

QuotationRequestEffect,

];

Update Component Config

1) Import below line into the add-ons/add-ons.shared.ts

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

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

QuotationListComponent,

QuotationRequestComponent,

QuotationListViewComponent

QuotationListDetailComponent

3) After adding its looks like below

export const ADD_ON_COMPONENTS = [

QuotationListComponent,

QuotationRequestComponent,

QuotationListViewComponent

QuotationListDetailComponent

]

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.

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

In the Quotation addon having three component.

1) QuotationListComponent,

2) QuotationRequestComponent,

3) QuotationListViewComponent

4) QuotationListDetailComponent

Routing

In src/app/default/pages/component/sales/manage-orders/manage-orders.module.ts

1) Import below line

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

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

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' }]
        }
    }

 
 
 

In src/app/default/pages/component/sales/components/layout/orders.component.html

Below-line no :30

<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

To run the below command

   ng build –prod

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 admin setup.

● Installing an extension

● Update the configuration

● Module Detail

● Run the application

● Make the build

Step 1 : Installing an extension

Make sure your device is running on the device or simulator,or it will not show up in the list

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 ".addOn.zip".

Extract the zip file and copy the content of api folder into the specified path

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.

Update Reducer Config

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

      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

export const AddOnReducers: ActionReducerMap<State> = {

quotationList: fromQuotationList.reducer,

}

Update State Config

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

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

2) Add the state into the below object

  quotationList:QuotationListState,

3) After adding its looks like below

export interface AddOnAppState {

quotationList:QuotationListState,

}

Update Effect Config

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

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

Add the effect into the below object

QuotationListEffect

After adding its looks like below

export const ADD_ON_EFFECT = [

QuotationListEffect

]

Update Component Config

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

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

MakeQuotationComponent,

MakeQuatationPopupComponent

  1. After adding its looks like below

export const ADD_ON_COMPONENTS = [

MakeQuotationComponent,

MakeQuatationPopupComponent

]

Step 3 : Module Detail

The modules pertaining to quotationlist 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 quotationlist in Spurtcommerce pages.

In the QuotationRequest addon having two components.

  1. MakeQuotationComponent

  2. MakeQuatationPopupComponent

  3. QuotationListComponent

MakeQuotationComponent

Directive

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

in ControlsProductDetailComponent

MakeQuatationPopupComponent

Directive

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

QuotationListComponent

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 src/default/pages/account/account.module.ts

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

Add these lines below the routes array on

src/default/pages/account/account.module.ts

Below line No:81

    { 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 src/default/pages/account/account.component.ts

Below line No:42


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

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.

 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

To run the below command

  ng build –prod

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

Last updated