Links

Blogs

Installation of Spurtcommerce blogs 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 Blogs will enable the feature of creation of blog articles to the admin. The admin can add various blog articles. When the plugin is installed, the Multi-Vendor eCommerce site becomes ready for the admin to post blog articles and get them displayed for the visitors to read.
Features:
  • Create categories to map the blog article to make it specific to a particular area or field.
  • Easily create blog articles.
  • Provide title and body content for the blog article.
  • Add a relevant attractive image to the blog article. Then, add meta tags to blog articles to make it SEO friendly and searchable in the search engines.
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 "blogs-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.
$ npm start serve
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
$ npm run build
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 "blogs-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
Import below line into the add-ons/add-ons-reducer.ts
import * as fromBlog from './cms/blogs/core/blogs-reducer/blog.reducer';
import * as fromBlogCategory from
'./cms/blog-category/core/blog-category-reducer/blog-category.reducer';
Add the reducer into the below object
blog: fromBlog.reducer,
blogCategory: fromBlogCategory.reducer
After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
blog: fromBlog.reducer,
blogCategory: fromBlogCategory.reducer
};
Update State Config
Import below line into the add-ons/add-ons-state.ts
import { BlogState } from './cms/blogs/core/blogs-store/blog.state';
import { BlogCategoryState } from './cms/blog-category/core/blog-category-store/blog.state';
Add the state into the below object
blog: BlogState;
blogCategory: BlogCategoryState,
After adding its looks like below
export interface AddOnAppState {
blog: BlogState,
blogCategory: BlogCategoryState,
}
Step 3 : Change the routing file(manage-blogs.routing.ts)
Inside the src/theme/default/admin/cms/components/manage-blogs/manage-blogs.routing.ts
Import below line
import * as CmsRouting from '../../../../../../../add-ons/cms/cms.routing';
  1. 1.
    Add these routes below the cmsRoutes array
manageBlogRoutes.push(CmsRouting.CmsBlogRoutes[0]);
manageBlogRoutes.push(CmsRouting.CmsBlogCategoryRoutes[0]);
src/theme/default/admin/cms/components/header/header.component.hmtl
Below line no 88
<a href="javascript:void(0)" [routerLink]="['/cms/manage-seo/category_seo']" [routerLinkActive]="'active'">
Category
</a>
<li [appHideIfUnauthorized]="'cms-blogs'" >
<a href="javascript:void(0)" [routerLink]="['/cms/manage-seo/blog_seo']" [routerLinkActive]="'active'">
Blog
</a>
</li>
Step 4 : Run the application
After you have integrated the Blogs Module into Spurtcommerce, you can use the following command to run the application.
npm run large-serve
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
npm run large-build
Then the latest built files can be deployed into the server.
Angular
Flutter
React
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 "blogs-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
import * as fromBlogs from './Blogs/core/reducer/blogs.reducer';
Add the reducer into the below object
blogs: fromBlogs.reducer,
After adding its looks like below
export const AddOnReducers: ActionReducerMap<State> = {
blogs: fromBlogs.reducer
}
Update State Config
Import below line into the add-ons/add-ons-state.ts
import { BlogsState } from './Blogs/core/reducer/blogs.state';
Add the state into the below object
blogs: BlogsState;
After adding its looks like below
export interface AddOnAppState {
blogs: BlogsState;
}
Step 3 : Update Default routing file(default.routing.ts)
Inside the src/default/default.routing.ts
Import below line
import * as blogRouting from '../../add-ons/Blogs/blogs.routing';
Add the blog routes in below the routes array
routes.forEach(data => {
if (data && data.children) {
console.log('data is',data.children);
data.children.push(blogRouting.BlogsRoutes[0]);
}
});
Step 4 : Run the application
After you have integrated the Blogs Module into Spurtcommerce, you can use the following command to run the application.
ng serve
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
ng build –prod
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 → Blogs folder) and copy the Blogs 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->Blogs
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
{"Blog": SpurtBlog(), "data":""},
After placing the above files it will look like this
List addonsShared = [
{"Blog": SpurtBlog(), "data":""},
];
Then give the following imports
import 'package:spurtcommerce/add-ons/Blogs/blog.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 rating and review to the user.
Blog
In the projectFolder->lib->core->shared->drawer.dart file update this line
For updating the tab header
findMyClass("Blog", “”),
Add this line to your side menu to get blogs section
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.
$ flutter run
Or In Run menu select run without debugging
In case if throws any exception
$ flutter run –no-sound-null-safety
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.
$flutter build
If you want to split the abi then
$flutter build –split-per-abi
For bundle build
$flutter build appbundle
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 "blogs-addOns.zip". Extract the zip file and copy the content of store-react/addOns into the specified path as given below
Path - addOns/Blogs
Add on location:
projectFolder->addOns
After placing it it will look like this
projectFolder->addOns->Blogs
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
import SpurtBlogGridplugin from './Blogs/BlogGridPlugin'
import SpurtBlogDetail from './Blogs/BlogDetail'
  • Add the BlogGridplugin into the below object
export const AddonsComponent={
SpurtBlogGridplugin
SpurtBlogDetail
}
Step 3 : Module Detail
The modules pertaining to Blogs are listed below. You may use these modules, in any page of Spurtcommerce.
Blog Component:
{ConnectPlugin.SpurtBlogGridplugin && <ConnectPlugin.SpurtBlogGridplugin />}
SpurtBlogDetail Component:
{ConnectPlugin.SpurtBlogDetail && <ConnectPlugin.SpurtBlogDetail bid={router.query.bid}/>}
Step 4 : Run the application
After you have integrated the Blog Module into Spurtcommerce, you can use the following command to run the application.
$ npm run dev
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
$ npm run build or yarn nun build
Then the latest built files can be deployed into the server.