In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to use Java framework Scipio ERP to create an online store", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's learn how to create an online store with Scipio ERP, a Java framework.
initial installation
Before you get started, make sure you have installed Java 1.8 (or later) SDK and a Git client. Done? That's great! Next, switch to the main branch on Github:
git clone https://github.com/ilscipio/scipio-erp.gitcd scipio-erpgit checkout master
To install the system, just run./ install.sh and select any option from the command line. During development, it is best to always use "installation for development"(option 1), which will also install a series of demo data. For professional installations, you can modify the initial configuration data ("seed data") to automatically set up company and catalog data for you. By default, the system will run using an internal database, but it can also be configured to use various relational databases such as PostgreSQL and MariaDB.
Follow the installation wizard to complete the initial configuration
By order.../ start.sh Start the system and open the link https://localhost:8443/setup/to complete configuration. If you have demo data installed, you can log in using the username admin and password scipio. In the installation wizard, you can set up company profiles, accounting, warehouses, product catalogs, online stores, and additional user profile information. Temporarily skip the configuration of the website entity on the product store configuration screen. The system allows you to run multiple online stores with different underlying code; unless you want to do so, always choosing the default is the easiest.
Congratulations, you just installed Scipio ERP! Operate the interface for a minute or two and feel its function.
shortcut
Before you get into customization, here are some handy commands to help you:
Create a shop-override:./ ant create-component-shop-override
Create a new component: ./ ant create-component
Create a new theme component: ./ ant create-theme
Create Administrator User: ./ ant create-admin-user-login
Various other useful functions: ./ ant -p
Utilities for installing and updating plugins: ./ git-addons help
Also, note the following locations:
Script to run Scipio as a service: /tools/scripts/
Log output directory: /runtime/logs
Manage applications:
E-commerce applications:
Finally, Scipio ERP builds all code in five main directories:
framework: framework-related sources, application servers, common interfaces, and configurations
applications: core applications
addons: third-party extensions
themes: modify interface appearance
hot-deploy: your own component
Except for some configuration, you'll develop in the hot-deploy and themes directories.
Online store customization
To truly make your system your own, start thinking about using components. A component is a modular approach that can be overlaid, extended, and added to a system. You can think of components as independent Web modules that capture information about databases (entities), features (services), interfaces (views), events and actions, Web applications, and more. Thanks to component functionality, you can add your own code while remaining compatible with the original source.
Run command./ ant create-component-shop-override and follow the steps to create your online store component. This will create a new directory within the hot-deploy directory that will extend and overwrite the original e-commerce application.
A typical component directory structure.
Your component will have the following directory structure:
config: configuration
data: seed data
entitydef: database table definition
script: Groovy script location
servicedef: service definition
src: Java class
webapp: your web app
widget: interface definition
Additionally, the ivy.xml file allows you to add Maven libraries to the build process, and the ofbiz-component.xml file defines the entire component and Web application structure. In addition to what you can see in the current directory, you can also find the controller.xml file in the Web application's WEB-INF directory. This allows you to define request entities and connect them to events and interfaces. For the interface alone, you can also use built-in CMS functionality, but stick to the core mechanism first. Familiarize yourself with/applications/shop/before introducing changes.
Add custom interface
Remember the template kit? You'll find it used in every interface. You can think of it as a set of easy-to-learn macros that are used to build everything. Here is an example:
Slider Just some content… Second column
It's not that hard, is it? Themes also contain HTML definitions and styles. This gives power to your front-end developers, who can define the output of each macro and stick to their own build tools for development.
Let's try it quick. First, define a request on your own online store. You will modify this code. A built-in CMS system is also accessible at https://localhost:8443/cms/, which allows you to create new templates and interfaces in a more efficient way. It is fully compatible with the template toolkit and comes with sample templates that you can adopt to your liking. But since we are trying to understand the system here, let us first take a more complex approach.
Open the controller.xml file in your store webapp directory. The controller tracks request events and acts accordingly. The following actions will create a new request under/shop/test:
You can define multiple responses and, if desired, use events or service invocations in the request to determine which response you might want to use. I selected the View type response. Views are rendered responses; other types are request redirection, forwarding, and so on. The system comes with various renderers that let you determine the output later; to do this, add the following:
Replace my-component with your own component name. You can then define your first interface by adding the following to the widget/CommonScreens.xml file tag:
The store interface is actually very modular, consisting of multiple elements (widgets, actions, and decorators). For simplicity, leave it as it is and complete the new page by adding the first template toolkit file. To do this, create a new webapp/mycomponent/test/test.ftl file and add the following:
Success!
A custom interface.
Open https://localhost:8443/shop/control/test/and marvel at your own accomplishments.
custom theme
Modify the look and feel of your store's interface by creating your own theme. All themes can be found as components in the themes folder. Run command./ ant create-theme to create your own theme.
A typical theme component layout.
Here is a list of the most important directories and files:
Subject Configuration: data/* ThemeData.xml
HTML wrapped in a specific theme: includes/*.ftl
Template Toolkit HTML Definition: includes/themeTemplate.ftl
CSS class definition: includes/themeStyles.ftl
CSS Framework: webapp/theme-title/
Take a quick look at the Metro theme in the toolkit; it uses the Foundation CSS framework and takes full advantage of it. Then, set up your own theme in the newly built webapp/theme-title directory and start development. Foundation-shop themes are a very simple store-specific theme implementation that you can use as a basis for your own work.
Look! You've set up your own online store, so get ready to personalize!
A complete Scipio ERP based online store.
At this point, I believe that everyone has a deeper understanding of "how to create an online store with Java framework Scipio ERP," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.