# Product Attribute Add-on old

**Installation of Spurtcommerce Product Attribute Add-On**

This document will help you to install Product Attribute 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: [<mark style="color:blue;">Setup an API (Step By Step)</mark>](#setup-an-api-step-by-step) 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>](#store-setup)<mark style="color:blue;">**.**</mark> spurtcommerce provides 3 admin storefronts, built with [<mark style="color:blue;">Angular,</mark> ](#store-setup)[<mark style="color:blue;">Flutter</mark>](#store-setup) and [<mark style="color:blue;">React.</mark>  ](#store-setup)

**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> ](#setup-an-api-step-by-step-1)to add extension for multi vendor

step 5 : [<mark style="color:blue;">Multi Vendor front end setup</mark>](#vendor-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)

### **Installation of Spurtcommerce Product Attribute Add-On**

**About Addon :**

The Installation of Spurtcommerce Product Attributes add-on will enable the feature of creation of attribute masters for the admin. When the plugin is installed, the multi-Vendor eCommerce portal becomes ready for the admin to create attribute masters that can be used for providing product specifications to the Customers.

**Features**

* Create an attribute group, to list various attribute under that attribute group. For example, Laptop can be an attribute group.&#x20;
* Add various attributes under the attribute group. E.g., Under Laptop as the attribute group, various attributes can be operating system, memory disk space, etc.&#x20;
* Map attributes to the product. While mapping the attribute, they can provide the specification in the free text box available. E.g., if the attribute selected is operating system, in the free text box, you can enter Windows 11.
* &#x20;Once the attributes are added, it will display as product specifications in the product detail page.

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

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;">**"product attribute-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>/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.

```
$ 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> ](#admin-setup)

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

* Installing an extension&#x20;
* Update the configuration&#x20;
* Module Detail&#x20;
* Run the application&#x20;
* 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 "productattribute.addOn.zip".

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

&#x20;         **Path -  admin/add-ons**

{% hint style="info" %} <br>

Note:

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

Inside cms folder paste productVarient folder.

<br>

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

<br>
{% endhint %}

```
export const productAttributeRoutes = [
 {
   path: 'product_attribute',
   loadChildren: () => import('./ProductAttributes/template/product_attribute.module').then(m => m.ProductAttributeModule),
   canActivate: [AuthGuard],
 },
];

```

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

Paste

**Step 2 : Update the configuration**&#x20;

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 <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```
    import * as fromProductAttribute 
    from'./catalog/ProductAttributes/core/reducer/productAttributes.reducer';

```

```
import * as fromProductAttributes from 
'./catalog/ProductAttributes/core/attributes/attributes-reducer/attributes.reducer';

```

```
import * as fromProductAttributeGroup from 
'./catalog/ProductAttributes/core/attributes-group/attributes-group-reducer/attributes-group.reducer';

```

**Add the reducer into the below object**

&#x20;**productAttribute: fromProductAttribute.reducer,**

&#x20; **masterAttribute:fromProductAttributes.reducer,**

&#x20;  **masterAttributeGroup:fromProductAttributeGroup.reducer,**

<br>

After adding its looks like below

**export const AddOnReducers: ActionReducerMap\<State> = {**

&#x20;  **productAttribute: fromProductAttribute.reducer,**

&#x20;  **masterAttribute:fromProductAttributes.reducer,**

&#x20;  **masterAttributeGroup:fromProductAttributeGroup.reducer,**

<br>

**};**

**Update State Config**

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

```
  
         import { ProductAttributeState } from
          './catalog/ProductAttributes/core/reducer/productAttributes.state';


```

```
import { AttributeState } from
 './catalog/ProductAttributes/core/attributes/attributes-reducer/attributes.state';

```

```
import { AttributeGroupState } from 
'./catalog/ProductAttributes/core/attributes-group/attributes-group-reducer/attributes-group.state';

```

**Add the state into the below object**

&#x20;   **productAttribute: ProductAttributeState,**

&#x20;  **masterAttribute:AttributeState,**

&#x20;  **masterAttributeGroup:AttributeGroupState,**

**After adding its looks like below**

&#x20;  export interface AddOnAppState {

&#x20;   productAttribute: ProductAttributeState,

&#x20;  masterAttribute:AttributeState,

&#x20;  masterAttributeGroup:AttributeGroupState,

<br>

}

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

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

&#x20; If the point one already exists in your file, skip point one

Import below line

```
import * as catalogRouting from'../../../../../../../add-ons/catalog/catalog.routing';



```

Add these routes below the *manageProductsRoute* array

```
manageProductsRoute.forEach(data => {
 if (data) {
   manageProductsRoute.push(catalogRouting.
     productAttributeRoutes[0]);
 }
});

```

For setting up the tab add this line in

<mark style="color:green;">**src/theme/default/admin/catalog/components/header/header.component.html/**</mark>&#x20;

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

```
<li [appHideIfUnauthorized]="'product-attribute'" >
                       <a href="javascript:void(0)" [routerLink]="['/catalog/manage-products/product_attribute/product-list']" [routerLinkActive]="'active'">
                           Product Attributes
                       </a>
                   </li>
```

**Step 4** : Filters configurations

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

Inside the /add-ons/catalog/ProductAttributes/template/settings/settings.routing.ts

1. Import below line

<pre><code>import { SettingsLayoutComponent } from './layout/layout.component';
<strong>
</strong><strong>
</strong></code></pre>

2. Add these routes below the settings array

**{**&#x20;

**path: 'filters',**

&#x20;**loadChildren: () => import('./filters/filters.module').then(m =>**&#x20;

**m.FiltersModule),**&#x20;

**canActivate: \[AuthGuard],**

&#x20;**data: { permissionForHeader: 'settings-site-filters', root: 'settingsSite' }**

&#x20;**},**

For setting up the tab add this line in

<mark style="color:green;">**/add-ons/catalog/ProductAttributes/template/settings/layout/layout.component.html**</mark>

**Below line no=14**

\<button \[appHideIfUnauthorized]="'filters'" \[routerLinkActive]="'active'" \[routerLink]="\['/catalog/manage-products/product\_attribute/settings/filters/list']" routerLinkActive="active" class="tablinks">

Filters

\</button>

**Step 5 : Run the application**

After you have integrated the ***ProductAttribute 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 6 : 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>](#store-setup)

{% tabs %}
{% tab title="Angular" %}
These are the steps that need to be followed to do the front end store setup. &#x20;

<br>

* Installing an extension
* &#x20;Update the configuration
* &#x20;Component Detail&#x20;
* Run the application&#x20;
* 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 "productattribute.addOn.zip".

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

&#x20;                  **Path -  store-angular/add-ons**

**Step 2 : Update the configuration**

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

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

```
import { SpecificationControlsComponent } from 
'./ProductAttributes/template/specification-controls/specification-controls.component';

```

Add the following components into the below object

&#x20;                               *SpecificationControlsComponent*

After adding its looks like below

```
export const ADD_ON_COMPONENTS = [ SpecificationControlsComponent
                     ]
```

**Step 3 : Component Detail**&#x20;

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

In the ProductAttributes addon having one components.               &#x20;

***SpecificationControlsComponent***

SpecificationControlsComponent

Directive

```
 <app-spurt-specification-controls [productId]="(productDetail.productDetails$ | async)?.productId">
```

&#x20;

In the above directive have one input field

&#x20;                               ProductId:number;

**Step 4 : Run the application**

After you have integrated the Product Attributes module into Spurtcommerce, you can use the following command to run the application.

```
 ng serve

```

**Step 5 : Make the build**

To run the below command

```
 ng build –prod
```

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

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

* Installing an extension&#x20;
* Update the configuration
* &#x20;Module Detail&#x20;
* Run the Application
* &#x20;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 → Attributes folder) and copy the Attribute folder  and place the copied folder  inside the add-ons folder inside the project folder

<br>

Add on location:&#x20;

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

After placing it it will look like this&#x20;

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

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

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

Then inside *addonsShared* array paste the following content

```
  {"Attribute": SpurtAttribute(), "data":""},
```

After placing the above files it will look like this

**List addonsShared = \[ {"Attribute": SpurtAttribute(), "data":""}, ];**\
\
Then give the following imports import **'package:spurtcommerce/add-ons/Attributes/attributes.dart';**

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 rating and review to the user.

**Attributes**&#x20;

Once you finished updating the configuration then in the <mark style="color:green;">**projectFolder->lib->core->modules->detail->details.dart**</mark> file update this line where you seem comfortable with

```
findMyClass("Attribute", {“ProductId”:details[“productId”]}),
```

Add this line to your side menu to get blogs section

**Step 4 : Run the application**

After integrating the *Rating and Review* Module into Spurt Commerce, you can use the following commands to run the application in terminal.

```
$ flutter run
```

Or&#x20;

In **Run** menu select run without debugging In case if throws any exception&#x20;

**$ flutter run –no-sound-null-safety**&#x20;

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

&#x20;In order to build, you need to run the following commands. In order to check the application, run the following commands and build the application.

```
$flutter build
```

If you want to split the abi then

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

For bundle build

```
$flutter build appbundle
```

{% endtab %}

{% tab title="React" %}
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
* &#x20;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 "productattribute.addOns.zip". Extract the zip file and copy the content of store-react/addOns folder into the specified path as given below

&#x20;**Path - addOns/Attributes**

Add on location:&#x20;

<mark style="color:green;">**projectFolder->addOns**</mark>&#x20;

After placing it it will look like this&#x20;

<mark style="color:green;">**projectFolder->addOns->Attributes**</mark>

**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 <mark style="color:green;">**addonconfig.js**</mark>

```
import SpurtPartialSpecification from './Attributes/PartialSpecification'
```

**Add the PartialSpecification into the below object** &#x20;

```
export const AddonsComponent={
SpurtPartialSpecification
}
```

**Step 3 : Module Detail**

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

SpurtAttributes Component:     &#x20;

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

<br>

**Step 4 : Run the application**

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

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

**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 %}
{% endtabs %}

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

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

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;">**vendorproductattribute-addOn.zip**</mark>".

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

&#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;">Vendor Setup</mark> ](#vendor-setup)

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

* Installing an extension&#x20;
* Update the configuration.&#x20;
* Module Detail&#x20;
* Run the application.&#x20;
* 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 "productattribute.addOn.zip".

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

&#x20;                    **Path - vendor/add-ons**

**Step 2 : Update the configuration.**&#x20;

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 <mark style="color:green;">**add-ons/add-ons-reducer.ts**</mark>

```
import * as fromProductAttribute from           
 './ProductAttribute/core/reducer/ProductAttribute.reducer';



```

* Add the reducer into the below object

*productAttribute: fromProductAttribute.reducer,*

* After adding its looks like below

**export const AddOnReducers: ActionReducerMap = { productAttribute: fromProductAttribute.reducer, };**

**Update State Config**

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

```
           import { ProductAttributeState } from
            "./ProductAttribute/core/reducer/ProductAttribute.state";
```

* Add the state into the below object

&#x20;                      &#x20;

```
                productAttribute: ProductAttributeState;
```

&#x20;&#x20;

* After adding its looks like below

&#x20;        export interface AddOnAppState {

&#x20;         productAttribute: ProductAttributeState;

&#x20;

}

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

```
         import { ProductAttributeEffect } from './ProductAttribute/core/effects/ProductAttribute.effect';

```

Add the effect into the below object

&#x20;     ProductAttributeEffect

After adding its looks like below

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

&#x20;  ProductAttributeEffect,

];

**Update Component Config**

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

```
  import { ProductAttributeListComponent } from "./ProductAttribute/template/product-attribute-list/product-attribute-list.component";

```

```
import { ProductAttributeUpdateComponent } from "./ProductAttribute/template/product-attribute-update/product-attribute-update.component";

```

Add the following components into the below object

&#x20;ProductAttributeListComponent,

&#x20; ProductAttributeUpdateComponent

After adding its looks like below

**export const ADD\_ON\_COMPONENTS = \[**

&#x20;                         **ProductAttributeListComponent,**

&#x20;                                                  **ProductAttributeUpdateComponent**

<br>

&#x20;                    **]**

**Step 3 : Module Detail**

The modules pertaining toProductAttributeListComponent,

&#x20;and ProductAttributeUpdateComponent

&#x20;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 Product Variant in Spurtcommerce pages.&#x20;

In the ProductAttribute addon having two component.

1. &#x20; ProductAttributeListComponent,
2. &#x20; ProductAttributeUpdateComponent

&#x20;Add the below steps to configure routing&#x20;

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

1. &#x20;Import below line

```
import { ProductAttributeListComponent } from '../../../../../../../add-ons/ProductAttribute/template/product-attribute-list/product-attribute-list.component';

```

```
import { ProductAttributeUpdateComponent } from '../../../../../../../add-ons/ProductAttribute/template/product-attribute-update/product-attribute-update.component';

```

Add these routes below the Routes array

```
        {
           path: 'product-attribute-list',
           component: ProductAttributeListComponent,
           data: {
               title: 'Product Attributes',
               urls: [{ title: 'Home', url: '/dashboard' }, { title: 'Products', url: '/products/attribute' }, { title: 'Product Attributes' }]
           }
         },
         {
           path: 'product-attribut-update/:id',
           component: ProductAttributeUpdateComponent,
           data: {
               title: 'Add Attribute Product',
               urls: [{ title: 'Home', url: '/dashboard' }, { title: 'Products', url: '/products/add' }, { title: 'Add Attribute Products' }]
           }
         },



```

For setting up the tab add this line in

<mark style="color:green;">**src/app/default/pages/catalog/layout/products.component.html**</mark>

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

```
 <a href="#" [routerLink]="['/catalog/manage-products/product-attribute-list']" class="">Product Attributes</a>
```

**Step 4 : Run the application**

After you have integrated the *ProductAttribute* 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.

### [<mark style="color:blue;">**Store Setup**</mark>](#store-setup-1)

{% tabs %}
{% tab title="Angular" %}

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

<br>

* Installing an extension
* &#x20;Update the configuration
* &#x20;Component Detail&#x20;
* Run the application&#x20;
* 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 "productattribute.addOn.zip".

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

&#x20;                  **Path -  store-angular/add-ons**

**Step 2 : Update the configuration**

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

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

```
import { SpecificationControlsComponent } from 
'./ProductAttributes/template/specification-controls/specification-controls.component';

```

Add the following components into the below object

&#x20;                               *SpecificationControlsComponent*

After adding its looks like below

```
export const ADD_ON_COMPONENTS = [ SpecificationControlsComponent
                     ]
```

**Step 3 : Component Detail**&#x20;

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

In the ProductAttributes addon having one components.                ***SpecificationControlsComponent***

SpecificationControlsComponent

Directive&#x20;

```
<app-spurt-specification-controls [productId]="(productDetail.productDetails$ | async)?.productId">
```

In the above directive have one input field

&#x20;                               ProductId:number;

**Step 4 : Run the application**

After you have integrated the Product Attributes module into Spurtcommerce, you can use the following command to run the application.

```
 ng serve

```

**Step 5 : Make the build**

To run the below command

```
 ng build –prod
```

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

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

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

**Step 1 : Installing an extension**

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

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

Add on location:&#x20;

*projectFolder->lib->add-ons*

After placing it it will look like this&#x20;

*projectFolder->lib->add-ons->Attributes*

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

*projectFolder->lib->add-ons->addonsshared.dart*

Then inside *addonsShared* array paste the following content

```
  {"Attribute": SpurtAttribute(), "data":""},
```

After placing the above files it will look like this

**List addonsShared = \[ {"Attribute": SpurtAttribute(), "data":""}, ];**

Then give the following imports

```
import 'package:spurtcommerce/add-ons/Attributes/attributes.dart';
```

Or&#x20;

There will be a popup for quick fix<br>

**Step 3 : Module detail**

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

**Attributes**&#x20;

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

**findMyClass("Attribute", {“ProductId”:details\[“productId”]}),**

Add this line to your side menu to get blogs section

**Step 4 : Run the application**

After integrating the Rating and Review Module into Spurt Commerce, you can use the following commands to run the application in terminal.

```
$ flutter run
```

Or&#x20;

In **Run** menu select **run without debugging**\
In case if throws any exception\
\&#xNAN;**$ 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**&#x20;

In order to build, you need to run the following commands. In order to check the application, run the following commands and build the application.

```
$flutter build
```

If you want to split the abi then

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

For bundle build

```
$flutter build appbundle
```

\
\
\ <br>
{% endtab %}

{% tab title="React" %}
These are the steps that need to be followed to do the front end store setup.&#x20;

* Installing an extension&#x20;
* Update the configuration&#x20;
* Run the application&#x20;
* 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 "productattribute.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/Attributes to&#x20;

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

Add on location:&#x20;

*projectFolder->addOns*&#x20;

After placing it it will look like this&#x20;

*projectFolder->addOns->Attributes*

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 <mark style="color:green;">**addonconfig.js**</mark>

```
import SpurtPartialSpecification from './Attributes/PartialSpecification'
```

* Add the PartialSpecification into the below object

```
export const AddonsComponent={
SpurtPartialSpecification
}

```

Step 3 : Module Detail

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

&#x20;                           *SpurtAttributes Component:*  &#x20;

**{ConnectPlugin.SpurtPartialSpecification && \<ConnectPlugin.SpurtPartialSpecification productId={product.productId} />}**

**Step 4 : Run the application**

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

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

**Step 5 : Make the build**

To run the below command

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

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


---

# 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/catalogue-related-addons/product-attribute-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.
