Product Variant Add-on old
Last updated
Last updated
Installation of Spurtcommerce Product Variant Add-On
This document will help you to install Product Variant 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:
step 3: you can easily install admin storefront with . spurtcommerce provides 3 admin storefronts, built with and
Along with the above steps you need to further follow these steps below to install this Add-on for Multi-vendor platform
step 4: to add extension for multi vendor
step 5 :
step 6: you can easily install vendor storefront with spurtcommerce provides 3 vendor storefronts, built with and
About Addon:
The Installation of Spurtcommerce Product Variant add-on will enable the feature of adding variant master When the plugin is installed, the multi-Vendor eCommerce site becomes ready for the admin and vendors to add variants under products and get them displayed for the visitors to view different variants in the same product.
Features:
The admin can create a master of variants. E.g., Colour or Size.
The admin can then add different variant values under the variant name. E.g., Under colour, they can add different values like red, green, blue, etc.
When the admin is listing a main product, they can choose different variants available in the masters to list different variants available for the same product.
While listing variants, they can specify different pricing for different variants and also specify the inventory (quantity stock available) for each variant separately.
For each variant under the same product, the SKU prefix followed by a unique number gets allocated. So, each variant under a product will have a unique SKU.
When the Vendor is listing a main product, they can choose different variants available in the variants master list created by the admin, in order to list different variants available for the same product.
While listing variants, they can specify different pricing for different variants and also specify the inventory (quantity stock available) for each variant separately.
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 "productvariant-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.
Once you execute the above command, add-on file will get integrated into the backend API.
Step 3 : Make the build
These are the steps that need to be followed for generating the build.
To run the below command
Then latest built files can be deployed into the server.
These are the steps that need to be followed to do the front end admin setup.
Installing an extension
Update the configuration
Module Detail
Run the application
Make the build
Step 1 : Installing an extension
These are the steps that need to be executed for installation of the extension.
Usually spurcommerce comes packed in a zip, whose name ends in "productvariant.addOn.zip".
Extract the zip file and copy the content of admin/add-ons folder into the specified path
Path - admin/add-ons
2) Inside the addon if the catalog folder doesn’t exist.
Paste
Step 2 : Update the configuration
After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.
Update Reducer Config
Import below line into the add-ons/add-ons-reducer.ts
Add the reducer into the below object
After adding its looks like below
Update State Config
Import below line into the add-ons/add-ons-state.ts
Add the state into the below object
After adding its looks like below
Step 3 : Change the routing file(manageproduct.routing.ts) Inside the src/theme/default/admin/catalog/components/manage-products/manage-products.routing.ts
Import below line
Add these routes below the manageProductsRoute array
For setting up the tab add this line in
src/theme/default/admin/catalog/components/header/header.component.html
Below line no:24
Step 4 : Filters configurations
Change the routing file (variant-routing.module.ts)
Inside the /add-ons/catalog/ProductVariant/template/variant/variant-routing.module.ts
1) Import below line
Add these routes below the variants array
{
path: 'filters', loadChildren: () =>
import('./filters/filters.module').then(m =>
m.FiltersModule), canActivate: [AuthGuard],
data: { permissionForHeader: 'settings-site-filters', root: 'settingsSite' }
}
For variants up the tab add this line in
/add-ons/catalog/ProductVariant/template/variant/variant-layout/variant-layout.component.html
Below line =13
<button [appHideIfUnauthorized]="'filters'"
[routerLinkActive]="'active'"[routerLink]="[
'/catalog/manage-products/product_variant/variant-settings/filters/list']" routerLinkActive="active" class="tablinks">
Filters
</button>
Step 5 : Run the application
After you have integrated the product attribute Module into Spurtcommerce, you can use the following command to run the application.
Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.
Step 6 : Make the build
To run the below command
Then the latest built files can be deployed into the server.
These are the steps that need to be followed to do the front end store setup.
Installing an extension
Update the configuration
Component Detail
Run the application
Make the build
Step 1 : Installing an extension
These are the steps that need to be executed for installation of the extension.
Usually spurcommerce comes packed in a zip, whose name ends in "productvariant.addOn.zip".
Extract the zip file and copy the content of store-angular/add-ons folder into the specified path
Path - store-angular/add-ons
Step 2 : Update the configuration
After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.
Update Component Config
Import below line into the add-ons/add-ons.shared.component
Add the following components into the below object
ControlsVariantComponent
After adding its looks like below
Step 3 : Component Detail
The modules pertaining to productsVariants are listed below. You may use these modules, in any page of Spurtcommerce.
In the ProductVariants addon having one components. ControlsVariantComponent
ControlsVariantComponent
Directive
In the above directive have one input field
ProductId:number;
Step 4 : Run the application
After you have integrated the ControlsVariantComponent Module into Spurtcommerce, you can use the following command to run the application.
Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.
Step 5 : Make the build
To run the below command
Then the latest built files can be deployed into the server.
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.
Once you execute the above command, add-on file will get integrated into the backend API.
Step 3 : Make the build
These are the steps that need to be followed for generating the build.
To run the below command
Then latest built files can be deployed into the server.
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
Usually spurcommerce comes packed in a zip, whose name ends in "vendorproductvariant-addOn.zip".
Extract the zip file and copy the content of vendor/add-ons folder into the specified path
Path - vendor/add-ons
Step 2 : Update the configuration
After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce config files. For this, you need to follow the steps below.
Update Reducer Config
Import below line into the add-ons/add-ons-reducer.ts
2. Add the reducer into the below object
variantList: fromProductVariant.reducer
3.After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
variantList: fromProductVariant.reducer
};
Update State Config
Import below line into the add-ons/add-ons-state.ts
2. Add the state into the below object
variantList:ProductVariantState;
3. After adding its looks like below
export interface AddOnAppState {
variantList:ProductVariantState;
}
Update Effect Config
Import below line into the add-ons/add-ons.effect.ts
2. Add the effect into the below object
ProductVariantEffect
After adding its looks like below
export const ADD_ON_EFFECT = [
ProductVariantEffect
];
Update Component Config
Import below line into the add-ons/add-ons.shared.ts
Add the following components into the below object
VariantProductListComponent,
VariantProductAddComponent
After adding its looks like below
export const ADD_ON_COMPONENTS = [
VariantProductListComponent,
VariantProductAddComponent
]
Step 3 : Module Detail
The modules pertaining to productvariantlist and productvariantupdate are listed below. You may use these modules, in any page of Spurtcommerce.
Also, you can find the steps below to use the modules in Product Variant in Spurtcommerce pages.
In the ProductVariant addon having two component.
VariantProductListComponent,
VariantProductAddComponent
Routing
In src/app/default/pages/component/calalog/manage-product/manage-product.module.ts
Import below line
Add these routes below the Routes array
For setting up the tab add this line in
src/app/default/pages/catalog/layout/products.component.html
Below line no:19
Step 4 : Run the application
After you have integrated the ProductVariant Module into Spurtcommerce, you can use the following command to run the application.
Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.
Step 5 : Make the build
To run the below command
Then the latest built files can be deployed into the server.
These are the steps that need to be followed to do the front end store setup.
Installing an extension
Update the configuration
Component Detail
Run the application
Make the build
Step 1 : Installing an extension
These are the steps that need to be executed for installation of the extension.
Usually spurcommerce comes packed in a zip, whose name ends in "productvariant.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 Component Config
Import below line into the add-ons/add-ons.shared.component
2. Add the following components into the below object
ControlsVariantComponent
After adding its looks like below
export const ADD_ON_COMPONENTS = [ ControlsVariantComponent
]
Step 3 : Component Detail
The modules pertaining to productsVariants are listed below. You may use these modules, in any page of Spurtcommerce.
In the ProductVariants addon having one components.
ControlsVariantComponent
ControlsVariantComponent Directive
In the above directive have one input field
ProductId:number;
Step 4 : Run the application
After you have integrated the ControlsVariantComponent Module into Spurtcommerce, you can use the following command to run the application.
Once you execute the above command you can view the installed module in Spurtcommerce, within the page in which you have integrated.
Step 5 : Make the build
To run the below command
Then the latest built files can be deployed into the server.