Product Attribute Add-on
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.
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.
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.
Once the attributes are added, it will display as product specifications in the product detail page.
Product Attributes Addon Setup:
Frontend Setup - Seller Panel:
Follow these steps to set up the front end for the Rating and Review addon in Spurtcommerce Seller Panel.
Step 1: Install the Addon:
Locate the Spurtcommerce addon package, typically named seller.addOns.zip.
Extract the zip file and copy the specification folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns -> catalog -> specification
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:
// ---------------------Specification Routes---------------------
import * as ProductSpecification from './catalog/catalog.contant';
// Components paths
export const specificationComponents = ProductSpecification.componentLists;
// Route paths
export const SpecificationRoutes = ProductSpecification.routePath;
// Services
export const SpecificationService = ProductSpecification.service;
If you wish to uninstall or remove the Rating and Review addon, replace the component paths and route paths with an empty array.
// ---------------------Specification Routes---------------------
import * as ProductSpecification from './catalog/catalog.contant';
// Components paths
export const specificationComponents =[];
// Route paths
export const SpecificationRoutes = [];
// Services
export const SpecificationService = [];
Step 3: Run the Application:
To run the application with the integrated Rating and Review addon, use the following command:
$ npm run large-serveAfter executing this command, the addon will be available on Spurtcommerce on the designated page.
Step 4: Build the Application
Finally, to prepare the application for deployment, run the build command:
$ npm run large-buildThe latest build files will then be ready to deploy to the server.
Frontend Setup – Admin Panel:
Follow these steps to set up the front end for the Attribute addon in Spurtcommerce Admin Panel.
Step 1: Install the Addon:
Locate the Spurtcommerce addon package, typically named Admin.addOns.zip.
Extract the zip file and copy the Attribute folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns ->Settings-> Attribute
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:
//-------------------------Settings Addon Routes and Components ----------------------
import * as settingsAddon from './settings/addon/settings.constant'
// components paths
export const settingsAddonComponents = settingsAddon.settingsAddonComponent;
// route paths
export const settingsAddonRoute = settingsAddon.settingsAddonRoute;
If you wish to uninstall or remove the Attribute addon, replace the component paths and route paths with an empty array.
//-------------------------Settings Addon Routes and Components ----------------------
import * as settingsAddon from './settings/addon/settings.constant'
// components paths
export const settingsAddonComponents = [];
// route paths
export const settingsAddonRoute = [];
Step 3: Run the Application:
To run the application with the integrated Attribute addon, use the following command:
$ npm run large-serveAfter executing this command, the addon will be available on Spurtcommerce on the designated page.
Step 4: Build the Application
Finally, to prepare the application for deployment, run the build command:
$ npm run large-buildThe latest build files will then be ready to deploy to the server.
Frontend Setup – Admin Panel:
Follow these steps to set up the front end for the Attribute Filter addon in Spurtcommerce Admin Panel.
Step 1: Install the Addon:
Locate the Spurtcommerce addon package, typically named Admin.addOns.zip.
Extract the zip file and copy the Attribute Filter folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns ->Settings-> Attribute Filter
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the addon, update the add-ons.constant.ts file to include the necessary plugins:
import * as filterAddon from './settings/filters/filter.constant'
//-------------------------Settings Addon Routes and Components ----------------------
// components paths
export const filterAddonComponents = filterAddon.filterAddonComponent;
// route paths
export const filterAddonRoute = filterAddon.filterAddonRoute;
If you wish to uninstall or remove the Attribute Filter addon, replace the component paths and route paths with an empty array.
import * as filterAddon from './settings/filters/filter.constant'
//-------------------------Settings Addon Routes and Components ----------------------
// components paths
export const filterAddonComponents = [];
// route paths
export const filterAddonRoute = [];
Step 3: Run the Application:
To run the application with the integrated Attribute Filter addon, use the following command:
$ npm run large-serveAfter executing this command, the addon will be available on Spurtcommerce on the designated page.
Step 4: Build the Application
Finally, to prepare the application for deployment, run the build command:
$ npm run large-buildThe latest build files will then be ready to deploy to the server.
Store Setup
Follow these steps to set up the Product Attributes module on the front-end Next.js web store.
Setup Overview:
Install the extension
Update configuration
Integrate the module
Run the application
Build the application
Step 1: Install the Extension
Locate the Spurtcommerce addon package, typically named addOns.zip.
Extract the zip file and copy the Specification folder into the addOns folder in your project.
projectFolder -> addOns
After this step, the structure should look like:
projectFolder -> addOns -> Specification
Once completed, proceed to update the configuration.
Step 2: Update the Configuration
After installing the extension, update the configuration in Spurtcommerce’s addonsconfig.js as follows:
Import the required line into addonsconfig.js.
import Specification from './Specification/Specification'Add the Specification plugin to the specified object.
export const AddonsComponent = { Specification, Add the following components to the AddonsComponent object:
Specification
AttributeFilter
import Specification from './Specification/Specification' import AttributeFilter from './Specification/AttributeFilter' After making these updates, the AddonsComponent object should reflect the new components.
export const AddonsComponent = {
Specification,
AttributeFilter,
}
Step 3: Module Details
The Product Attributes module includes the following components that you can utilize in any page within Spurtcommerce by sending the required product data as props:
AttributeFilter Component
{ConnectPlugin.AttributeFilter && <ConnectPlugin.AttributeFilter params={params?.slug} />}Note: Use the AttributeFilter component by passing the product data as a prop:
<connectPlugin.AttributeFilter params={params.slug} />Step 4: Run the Application
Once you have integrated the Product Attributes module, run the application using:
$ npm run devThis command will launch Spurtcommerce with the integrated Product Attributes module visible on the specified page.
Step 5: Build the Application
To prepare the application for deployment, execute the following command:
$ npm run buildor
$ yarn run build The latest build files will then be ready for server deployment.
Product Attribute Add-On
Follow these below steps are installing Product Attribute addon
App setup
These are the steps that need to be followed to do the front end store setup.
· Installing an extension
· Update the configuration
· Module Detail
· Run the Application
· Make the build
Step 1 : Installing an extension
These are the steps that need to be executed for installation of the extension.
Locate the Spurtcommerce addon package, typically named addons.zip.
Extract the zip file and copy the Product Attribute folder into the addons folder in your project.
projectFolder->lib->module->add-ons
After this step, the structure should look like:
projectFolder->lib->module->add-ons->Attributes
projectFolder->lib->module->add-ons->Attributefilter
Once completed, proceed to update the configuration.
Step 2 : Update the configuration
After extracting the add on zip file for changing the configurations in addons.dart, you have to follow the steps below:
Go to
projectFolder->lib->module->add-ons->addonsshared.dart
Then inside addonsShared array paste the following content
{"Attribute": SpurtAttribute(), "data": ""},
{"Attributefilter": SpurtAttributefilter(), "data": ""},After placing the above files it will look like this,
List addonsShared = [
{"Attribute": SpurtAttribute(), "data": ""},
{"Attributefilter": SpurtAttributefilter(), "data": ""},
];
Then give the following imports
import 'package:spurtcommerce/module/add-ons/Attributes/Page/attributes.dart';
import 'package:spurtcommerce/module/add-ons/Attributefilter/attributefilter.dart';Or
There will be a popup for quick fix
Step 3 : Module details
After executing the above mentioned steps, we have to place these below lines in the module folder to show the Product Attribute to the user.
Attribute
Once you finished updating the configuration then in the projectFolder->lib->module->Tab->Product-detailpage->presentation->pages->details.dart
Use this line for view the Product Attribute
findMyClass('Attribute', {
"slug":
detail.details["productSlug"],
}),
Attribute Filter
you can see in the projectFolder->lib->module->Tab->search_categories->pages->filter.dart
Use this line for view the Attribute Filter
findMyClass("Attributefilter",
{"filterlist": widget.filterlist}),
After insert the line restart your application
Step 4 : Run the application
After integrating the Product Attribute Module into Spurt Commerce, you can use the following commands to run the application in terminal.
$ flutter runOr
In Run menu select run without debugging
In case if throws any exception
$ flutter run –no-sound-null-safetyOnce you execute the above command you can view the installed module in Spurt Commerce, within the page in which you have integrated
Step 5 : Make the build
In order to build, you need to run the following commands. In order to check the application, run the following commands and build the application.
$flutter buildIf you want to split the abi then
$flutter build –split-per-abiFor bundle build
$flutter build appbundle
Last updated