Advanced Promotions
Installation of Spurtcommerce Advanced Promotions Add-On
you can install this Add-on through following steps
step 1: Setup an API (Step By Step) to add extension for admin
step 2: Admin setup
step 3: you can easily install admin storefront with store setup. spurtcommerce provides 3 admin storefronts, built with Angular, Flutter and React.
About Addon :
The Installation of Spurtcommerce Promotions add-on will enable the feature of creation of various promotions for the admin. When the plugin is installed, the multi-Vendor eCommerce site becomes ready for the admin to post promotions and get them displayed for the visitors to view.
Features
You can create promotions such as ‘Hot summer offer’ or ‘Christmas sale’, etc.
Easily map certain selected products to the promotions that they create.
Also, you may map one whole category for the promotions that they create.
provide an attractive title for that promotion. E.g., stylish women deal.
Define the position of the promotion for displaying it on the home page.
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 "promotions-addOn.zip".
Extract the zip file and copy the content of api folder into the specified path
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 spurtcommerce comes packed in a zip, whose name ends in "promotions.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
Note:
In addon folder if already a cms folder exists, Inside cms folder paste Widget-list and Widgets-layout folder. In cms routing file(cms.routing.ts) paste the below code.
In addon folder if cms folder doesn’t exists. Paste the cms folder in addon.
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
3. 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(cms.routing.ts) Inside the src/theme/default/admin/cms/cms.routing.ts
Import below line
Add these routes below the cmsRoutes array
Step 4 : Run the application
After you have integrated the Widgets 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 "promotions.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
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
Update Effect Config
Import below line into the add-ons/add-ons.effect.ts
Add the effect into the below object
After adding its looks like below
Update Component Config
Import below line into the add-ons/add-ons.shared.component
Add the following components into the below object
After adding its looks like below
Step 3 : Module Detail
The modules pertaining to widgetlist and widgetproducts 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 WidgetList and WidgetProducts in Spurtcommerce pages.
In the WidgeAndProducts addon having two components.
1.WidgetProductsComponent
2.WidgetListComponent
WidgetProductComponent
In the above directive have one input field
WidgetListComponent
This is a one page component. You can configure the route for this component. This component only works with widgetId ,because after clicking viewall link in home page then only the user can view widgetlist The route for this component:
Update Default routing file(default.routing.ts) Inside the src/default/default.routing.ts
Import below line
Add the blog routes in below the routes array
Step 4 : Run the application
After you have integrated the WidgetList and WidgetProduct 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.
Last updated