Coupon Add-on old
Last updated
Last updated
Installation of Spurtcommerce coupon Addon
This document will help you to install coupon add-on to your Spurtcommerce server for single vendor as well as multi vendor
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 "coupon-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 executed for installation of the extension.
● 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 "coupon.addOn.zip".
Extract the zip file and copy the content of admin/add-ons folder into the specified path
Path - admin/add-ons
Note:
1) In add-ons folder if already a marketing folder exists.
Inside marketing folder paste coupon folder.
In marketing routing file(marketing.routing.ts) paste the below code.
2) Inside the addon if the marketing 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
1) 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
1) Import below line into the add-ons/add-ons-state.ts
Add the state into the below object
After adding its looks like below
export interface AddOnAppState {
coupon:CouponState
}
Step 3 : Change the routing file(manage-promotions.routing.ts)
Inside the /src/theme/default/admin/marketing/components/manage-promotions/manage-promotions.routing.ts
If the point one already exists in your file, skip point one
Import below line
2. Add these routes below the managePromotionRoutes array
managePromotionRoutes.push(marketingRouting.couponRoutes[0]);
For setting up the tab add this line in
/src/theme/default/admin/marketing/components/header/header.component.html
Below line no=11
Step 4 : Run the application
After you have integrated the catalog 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 executed for installation of the extension.
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 ."coupon.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
Add the reducer into the below object
After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
marketing: fromMarketing.reducer,
};
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
export interface AddOnAppState {
marketing: MarketingState;
}
Import below line into the add-ons/add-ons-effect.ts
Add the effect into the below object
After adding its looks like below
export const ADD_ON_EFFECT = [
MarketingEffect,
];
Update Component Config
Import below line into the add-ons/add-ons.shared.ts
Add the following components into the below object
AddCouponComponent,
CouponTrackingComponent,
CouponComponent,
After adding its looks like below
export const ADD_ON_COMPONENTS = [
AddCouponComponent,
CouponTrackingComponent,
CouponComponent,
]
Step 3 : Module Detail
AddCouponComponent,
CouponTrackingComponent,
CouponComponent
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 marketing in Spurtcommerce pages.
In the marketing addon having three component.
AddCouponComponent,
CouponTrackingComponent,
CouponComponent,
Add the below steps to configure routing
In /src/app/default/pages/component/marketing/manage-promotions/manage-promotions.module.ts
Import below line
2) Add these routes below the Routes array
For setting up the tab add this line in
/src/app/default/pages/component/marketing/layout/products.component.html
Below line = 17
Step 4 : Run the application
After you have integrated the marketing 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.