Common Product Add-on old
Last updated
Last updated
Installation of Spurtcommerce common product for Vendor Products Add-On
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 Common Product addon will allow the Admin to convert a particular product, either their own or any vendor's as a common product, which means any vendor on the portal can sell the same product, by just updating the price at which they want to sell the product and the quantity they have of that product.
Features
Make any product from your entire product list, a common product, by just enabing the toggle.
You can make admin products as well as Vendor products, the common product that will be available for all the vendors to sell on the online portal.
The vendor can sell any product that is available on the list of common products, by simply updating the price and the quantity that they have.
The Product detail page of a common product, will display the common products, along with the vendor's name and their price.
The product detail page will show the list of all the vendors that are selling the same product.
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 "commonproduct-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 "commonproducts.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
Import below line into the add-ons/add-ons-reducer.ts
Add the reducer into the below object
commonCatalog:fromCommonCatalog.reducer,
After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
commonCatalog: fromCommonCatalog.reducer
};
Update State Config
Import below line into the add-ons/add-ons-state.ts
Add the state into the below object
commonCatalog: commonCatalogState
3) After adding its looks like below
export interface AddOnAppState {
commonCatalog: commonCatalogState
}
Step 3 : Change the routing file(catalog.routing.ts)
Inside the src/theme/default/admin/marketplace/components/manage-products/manage-products.routing.ts
Import below line
Add these routes below the cmsRoutes array
Add this line to keep the header tab
src/theme/default/admin/marketplace/components/header/header.component.html
Below line no:46
Step 4 : 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 5: 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 "common-product-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
1) Import below line into the add-ons/add-ons-reducer.ts
2) Add the reducer into the below object
3) After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
commonProducts:fromCommonProduct.reducer,
};
Update State Config add-ons/add-ons-state.ts
1) Add the state into the below object
2) After adding its looks like below
export interface AddOnAppState {
commonProductst:commonProductsState,
}
Update Effect Config
1) Import below line into the add-ons/add-ons.effect.ts
2) Add the effect into the below object
3) After adding its looks like below
export const ADD_ON_EFFECT = [
commonProductsEffect
];
Update Component Config
1) Add the following components into the below object
2) After adding its looks like below
export const ADD_ON_COMPONENTS = [
CommonProductComponent
]
Step 3 : Module Detail
Routing
In src/app/default/pages/component/calalog/manage-product/manage-product.module
1) Import below line
2) Add these routes below the Routes array
Add this line to keep the header tab
src/app/default/pages/component/catalog/layout/products.component.html
Below line no:20
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
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 "commonproducts.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 Reducer Config
Import below line into the add-ons/add-ons-reducer.ts
Add the reducer into the below object
commonProducts: fromCommonProducts.reducer,
After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
commonProducts: fromCommonProducts.reducer,
}
Update State Config
Import below line into the add-ons/add-ons-state.ts
Add the state into the below object
commonProducts:commonProductState
After adding its looks like below
export interface AddOnAppState {
commonProducts:commonProductState
}
Update Effect Config
Import below line into the add-ons/add-ons.effect.ts
Add the effect into the below object
commonProductsEffect
After adding its looks like below
export const ADD_ON_EFFECT = [ commonProductsEffect ];
Update Component Config
Import below line into the add-ons/add-ons.shared.component
Add the following components into the below object
ViewProductsComponent,
CommonproductsComponent
After adding its looks like below
export const ADD_ON_COMPONENTS = [
ViewProductsComponent,
CommonproductsComponent
];
Step 3 : Component Detail
The modules pertaining to viewproducts and commonproducts 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 ViewProducts and CommonProducts in Spurtcommerce pages.
In the CommonProducts addon having two components.
ViewProductsComponent
CommonproductsComponent
ViewProductsComponent
Directive
In the above directive have one input field
ProductId:number;
Productslug:any;
CommonProductsComponent
This is a one page component. You can configure the route for this component.
This component only works with productslug,because after clicking sellers in productdetail page it redirects to the commonproducts component.
Step 4 : Run the application
After you have integrated the Common Product 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.