For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Setup an API (Step By Step)

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.

Admin Setup

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.

  1. 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.

store 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.

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.

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.

Extract the store-flutter folder inside the folder go to (store-fluter → add-ons → WidgetsAndProducts folder) and copy the WidgetsAndProducts folder and place the copied folder inside the project folder

Add on location:

projectFolder->lib->add-ons

After placing it it will look like this

projectFolder->lib->add-ons->WidgetsAndProducts

Once you finish these steps continue to the next step

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->add-ons->addonsshared.dart

Then inside addonsShared array paste the following content

After placing the above files it will look like this

Then give the following imports import 'package:spurtcommerce/addons/WidgetsAndProducts/widgetlists.dart';

Or

There will be a popup for quick fix

Step 3 : Module detail

After executing the above mentioned steps, we have to place these below lines in the core folder to show the question and answer to the user.

WidgetLists Once you finished updating the configuration then in the projectFolder->lib->main.dart file update this line where you seem comfortable with

Step 4 : Run the application

After integrating the Rating and Review Module into Spurt Commerce, you can use the following commands to run the application in terminal.

Or In Run menu select run without debugging In case if throws any exception

Once 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.

If you want to split the abi then

For bundle build

These are the steps that need to be followed to do the front end store setup.

  • Installing an extension

  • Update the configuration

  • 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-addOns.zip". Extract the zip file and copy the content of store-react/addOns into the specified path as given below

Path - addOns/WidgetsAndProducts Add on location:

projectFolder-> addOns

After placing it it will look like this

projectFolder->addOns-> WidgetsAndProducts

Step 2 : Update the configuration

After the installation of the extension, you will have to update certain configurations into the default Spurtcommerce addonsconfig.js files. For this, you need to follow the steps below.

Once you finish the first Step now declare the necessary plugins in the addonconfig.js file

  • Import below line into the addonconfig.js

  • Add the SpurtWidgetsAndProducts plugin into the below object

Step 3 : Module Detail

The modules pertaining to widgets are listed below. You may use these modules, in any page of Spurtcommerce.

SpurtWidgetsAndProducts Component:

{ConnectPlugin.SpurtWidgetsAndProducts && <ConnectPlugin.SpurtWidgetsAndProducts />}

SpurtWidgetViewAll Component:

{ConnectPlugin.SpurtWidgetViewAll && <ConnectPlugin.SpurtWidgetViewAll widgetId={widget} /> }

Step 4 : Run the application

After you have integrated the SpurtWidgetsAndProducts 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