ofbiz初级--安装与配置
- 格式:doc
- 大小:24.50 KB
- 文档页数:1
技术文档第一部分、ofbiz表现一、理解MVC模式当涉及大量商业逻辑项目的时候,我们需要考虑什么?如何分离用户界面和后台操作?如何避免将商业逻辑混淆于一般的流程控制中?作为企业信息系统,就需要考虑很多类似的问题。
源源不断的客户新需求, 要进行功能修改和扩充, 但是因为程序的高耦合,改动将变得非常困难,导致项目成本何风险增加。
而且,往往维护人员与开发人员不是同一个人,即使有详尽的文档,也很难理清程序里纵横交错的联系。
所以贯彻Model-View-Controller(MVC)模式的设计,在设计阶段首先杜绝此类问题, 是一个非常好的方法。
1、MVC理论描述所谓MVC模式,指的是一种划分系统功能的方法,它将一个系统划分为三个部分:●模型(Model):封装的是数据源和所有基于对这些数据的操作。
在一个组件中,Model往往表示组件的状态和操作状态的方法。
●视图(View):封装的是对数据源Model的一种显示。
一个模型可以由多个视图,而一个视图理论上也可以同不同的模型关联起来。
●控制器(Control):封装的是外界作用于模型的操作。
通常,这些操作会转发到模型上,并调用模型中相应的一个或者多个方法。
一般Controller在Model和View之间起到了沟通的作用,处理用户在View上的输入,并转发给Model。
这样Model和View两者之间可以做到松散耦合,甚至可以彼此不知道对方,而由Controller连接起这两个部分。
模型,即相关的数据,它是对象的内在属性;视图是模型的外在表现形式,一个模型可以对应一个或者多个视图,视图还具有与外界交互的功能;控制器是模型与视图的联系纽带,控制器提取通过视图传输进来的外部信息转化成相应事件,然后由对应的控制器对模型进行更新;相应的,模型的更新与修改将通过控制器通知视图,保持视图与模型的一致性。
下图(图1.1)描述了这三者之间的关系:2、系统设计系统属于浏览器/服务器模型(Browser/Server)。
ofbiz四种情景安装指南(hsql/mysql/oracle+tomcat/apache)一、ofbiz 用自身数据库安装1. 由 binary 安装:由 binary 安装非常简单, 以下是安装方法:下载ofbiz-2.0-beta1-complete.tar.gz, 注意不是ofbiz-2.0-beta1.tar.gz. tar xvzf ofbiz-2.0.beta1-complete.tar.gzcd tomcat/bin./ofbiz.sh startgaleon http://localhost:8080/webtools2. 由 CVS 安装:由 CVS 安装要稍微复杂一些. 由于 ofbiz 的更新非常快, 所以由 CVS 安装将获得最新功能. 以下是安装方法:mkdir ofbizln -s /PATH-TO-TOMCAT tomcatcd ofbizexport CVSROOT=:pserver:anonymous at cvs dot:/cvsroot/ofbizcvs logincvs co catalogcvs co commonappcvs co corecvs co ecommercecvs co libcvs co ordermgrcvs co partymgrcvs co setupcvs co websitecvs co webtoolscvs co workeffortcp setup/ofbiz/build.xml .cp setup/ofboz/updateall.sh .export CATALINA_HOME=PATH-TO-TOMCATexport OFBIZ_HOME=`pwd`antant install创建 postgreSQL 用户 ofbiz, 口令 ofbizcreatedb -E EUC_CN ofbizcd ../tomcat/bin./ofbiz.sh startgaleon http://localhost:8080/webtools二、安装ofbiz+tomcat+oracle这个文章描述的是安装ofbiz在oracle+tomcat环境ofbiz2.11提供的缺省的web server是jetty,由于我比较习惯tomcat,因此打算把他转移到tomcat上来。
OFBiz Tutorial - A Beginners Development GuideOFBiz教程 – 初学者的开发指南/display/OFBIZ/OFBiz+Tutorial+‐+A+Beginners+Development+GuideTranslated by hongs,contact:billhongs@Creating Practice Application (Hello World...)Written by: Pranay Pandey with feedback and contributions from Chirag Manocha, Ravindra Mandre, Rob SchapperSpecial thanks to Anil Patel and Mridul Pathak for inspiring me to write this tutorial.这教程面向OFBiz初学者。
帮助学习OFBiz应用开发流程基础。
创建这个教程背后的目的是让开发者通过最佳实践熟悉代码习惯、控制流或更多。
这个练习充当OFBiz的”Helloworld”,和由Kernighan and Richie引入的c 语言编程的第一个Helloworld一样。
重要!这教程打算使用最新的SVN版本。
不再适用于4版本。
与这个应用开发的同时,你可以看OFBiz的视频,它们在/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams,Part - 1注1: 有更多的疑问,你可以参考Example组件。
你准能在OFBiz的最新代码的example组件中找到你想要的代码。
任意时候想参考例子代码,作为这个应用的开发,这些将给你未来的开发中带来帮助。
每一个新功能会第一时间加入到example组件中作为参考。
注2:在开始开发这应用前,你一定要阅读下面内容:OFBiz Contributors Best Practices(/display/OFBADMIN/OFBiz+Contributors+Best+Practices), Coding Conventions (/display/OFBADMIN/Coding+Conventions)and Best Practices Guide(/display/OFBADMIN/Best+Practices+Guide)。
ofbiz入门及安装1.Ofbiz 介绍: Ofbiz() 是 apache 的电子商务平台,充分利用了apache下的Open Source 项目,像 Tomcat, Ant, BeanShell, Jboss 等,构建了一个强大的系统平台,Ofbiz 已经完成了电子商务平台都需要的功能,像用户认证、工作流、交易规则处理等,Ofbiz 的核心技术在于 Entity Engine,其他的组件基本都是基于它的。
简单来说 Entity Engine 的主要功能是将数据库表创建、对象与数据表的映射、对象的查询等做了强大封装,你可以在一个简单的 XML 文件中定义数据库表结构,Ofbiz 会自动帮你在数据库建表,并动态生成映射对象,你在程序中可以只考虑对 Object 的处理,Ofbiz 会自动通过事务逻辑更新到数据库中。
Ofbiz 宣称的优点之一是用很少的 Code 完成复杂的处理。
2.Ofbiz 下载与安装首先要安装 J2SDK1.6,到 上下载,安装后设定 JAVA_HOME 环境变量为 J2SDK 的安装目录。
访问网站,上面有下载的连接,请选择对应最新的稳定版本,下载下来解开后就可以运行了。
3.ofbiz 配置mysql数据库首先在 MySQL 创建数据库 ofbiz。
更新JDBC驱动,将mysql的jdbc驱动copy到${ofbiz-install-dir}/framework/entity/lib/jdbc 目录下。
设置实体引擎( Entity Engine)的缺省数据库为mysql.在修改 ${ofbizinstall dir}/framework/entity/config/entityengine.xml文件中修改配置:修改数据库连接参数:<datasourcename="localmysql"helper-class="org.ofbiz.entity.datasource. GenericHelperDAO"field-type-name="mysql"check-on-start="true"add-missing-on-start="true"check-pks-on-start="false"use-foreign-keys="true"join-style="ansi-no-parenthesis"alias-view-columns="false"drop-fk-use-foreign-key-keyword="true"table-type="InnoDB"character-set="utf8" --字符集collate="utf8_general_ci"> --排序方式<read-data reader-name="seed"/><read-data reader-name="seed-initial"/><read-data reader-name="demo"/><read-data reader-name="ext"/><inline-jdbcjdbc-driver="com.mysql.jdbc.Driver"jdbc-uri="jdbc:mysql://localhost:3306/ ofbiz?autoReconnect=true" --数据库名jdbc-username="root" --用户名jdbc-password="" --密码isolation-level="ReadCommitted"pool-minsize="2"pool-maxsize="250"time-between-eviction-runs-millis="600 000"/><!-- ####--><!-- <jndi-jdbcjndi-server-name="localjndi"jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/>--></datasource>修改实体引擎的数据库缺省配置如下:将datasource-name的值设置为local mysql:<!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources --><connection-factoryclass="org.ofbiz.entity.connection.DBCPConnectionFactory"/><delegator name="default"entity-model-reader="main"entity-group-reader="main"entity-eca-reader="main"distributed-cache-clear-enabled="false"><group-map group-name="org.ofbiz"datasource-name="localmysql"/> <group-map group-name="org.ofbiz.olap"datasource-name="localmysql"/> </delegator><delegator name="default-no-eca"entity-model-reader="main"entity-group-reader="main"entity-eca-reader="main"entity-eca-enabled="false"distributed-cache-clear-enabled="false"><group-map group-name="org.ofbiz"datasource-name="localmysql"/><group-map group-name="org.ofbiz.olap"datasource-name="localmysql"/> </delegator><!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant run-install" before running "ant run-tests" --><delegator name="test"entity-model-reader="main"entity-group-reader="main"entity-eca-reader="main"><group-map group-name="org.ofbiz"datasource-name="localmysql"/><group-map group-name="org.ofbiz.olap"datasource-name="localmysql"/> </delegator><delegator name="other"entity-model-reader="main"entity-group-reader="main"entity-eca-reader="main"><group-map group-name="org.ofbiz"datasource-name="local mysql"/> </delegator>4.ofbiz编译和运行打开dos并在ofbiz9 目录下执行命令:ant run-install (该命令用来预置默认数据库,编译java code) startofbiz.bat启动成功,可以打开以下界面:http://localhost:8080/ecommerce;https://localhost:8443/webtools;。
技术文档第一部分、ofbiz表现一、理解MVC模式当涉及大量商业逻辑项目的时候,我们需要考虑什么?如何分离用户界面和后台操作?如何避免将商业逻辑混淆于一般的流程控制中?作为企业信息系统,就需要考虑很多类似的问题。
源源不断的客户新需求, 要进行功能修改和扩充, 但是因为程序的高耦合,改动将变得非常困难,导致项目成本何风险增加。
而且,往往维护人员与开发人员不是同一个人,即使有详尽的文档,也很难理清程序里纵横交错的联系。
所以贯彻Model-View-Controller(MVC)模式的设计,在设计阶段首先杜绝此类问题, 是一个非常好的方法。
1、MVC理论描述所谓MVC模式,指的是一种划分系统功能的方法,它将一个系统划分为三个部分:l 模型(Model):封装的是数据源和所有基于对这些数据的操作。
在一个组件中,Model往往表示组件的状态和操作状态的方法。
l 视图(View):封装的是对数据源Model的一种显示。
一个模型可以由多个视图,而一个视图理论上也可以同不同的模型关联起来。
l 控制器(Control):封装的是外界作用于模型的操作。
通常,这些操作会转发到模型上,并调用模型中相应的一个或者多个方法。
一般Controller在Model和View之间起到了沟通的作用,处理用户在View上的输入,并转发给Model。
这样Model和View两者之间可以做到松散耦合,甚至可以彼此不知道对方,而由Controller连接起这两个部分。
模型,即相关的数据,它是对象的内在属性;视图是模型的外在表现形式,一个模型可以对应一个或者多个视图,视图还具有与外界交互的功能;控制器是模型与视图的联系纽带,控制器提取通过视图传输进来的外部信息转化成相应事件,然后由对应的控制器对模型进行更新;相应的,模型的更新与修改将通过控制器通知视图,保持视图与模型的一致性。
下图(图1.1)描述了这三者之间的关系:2、系统设计系统属于浏览器/服务器模型(Browser/Server)。
概论指南入门本指南帮助BI.Office使用人员了解系统的结构,逐步熟悉BI.Office产品的安装及部署。
使用下表快速访问BI.Office安装配置指南:文档规范下列规范用于在BI.Office安装配置指南中区分文本元素。
采用醒目标志来表示在操作过程中应该特别注意的地方,这些标志的意义如下:注意:提醒操作中应该注意的事项说明:对操作内容的描述进行必要的补充和说明对读者的要求本指南的读者对象为BI.Office的高级使用者。
他必须具备以下条件:(1)有大型数据库系统维护的经验。
(2)熟悉数据库的安装和配置。
(3)熟悉一些应用服务器的安装和部署。
安装摘要安装摘要BI.Office安装有两种办法:●默认安装:默认安装包仅供在Windows操作系统上使用,用户点击BI.Office.exe进行安装,根据向导一步步操作即可完成安装部署。
默认安装使用Tomcat作为应用服务器、使用MySQL作为知识库(带示例数据),安装完毕通过配置工具指定License后即可登录使用。
该方法适用于初次试用BI.Office产品或者是无特殊应用服务器和知识库要求的用户。
●手动安装:手工安装包可在Windows或Unix / Linux等操作系统上使用。
根据实际项目需要选择应用服务器(Tomcat / JBoss / Weblogic / WebSphere)和知识库(MySQL / HSQL / Oracle / DB2),由用户手工将bioffice.war应用包部署到应用服务器上,再通过配置工具手动配置知识库和指定License后登录使用。
该方法适用于有其他应用服务器或知识库要求的用户。
要成功的使用BI.Office,请关注如下步骤:●创建知识库:选择BI.Office默认安装使用MySQL作为知识库,也可以选择手工配置其他知识库(如HSQL或Oracle)。
●增加JDBC驱动:BI.Office的war包中没有包含所有支持的数据库JDBC驱动程序,所以需要根据实际情况手工增加相应版本的数据库驱动程序,并清除多余的相关驱动文件。
OFBiz快速入门原文URL:https:///OFBIZ/ofbiz-tutorial-a-beginners-development-guide.html一个大厦能够建多高,是由其基础决定的;一个软件能够’容纳‘多少功能,是由其架构决定的。
一个优秀的架构能够容许很多工程师协同合作,长期不断累积功能;反之,一个脆弱的架构则捆绑住工程师的手脚,每添加一个功能都是困难重重,涉及到很多人的交互,效率非常低下,长期维护也是非常麻烦,代价很高,到一定程度就遇到天花板,无法再加入功能了。
OFBiz(Open For Business)现在关于OFBiz的所有相关的信息,大部分都是英文的,可能,在当下的IT 江湖里,OFBiz还没有引起ITer或IT公司的广泛关注,也只是部分群体在学习与研究。
当然,OFBiz的发展也是想当得快的,毕竟每天都有人commit代码,但是,版本的频繁发布,如果不能前后维持一个统一的技术架构和一个一致的编程开发模式,就会导致基于某些版本的OFBiz的系统应用不能很好的升级,留下了维护与移植的痛苦,其次就是现在的OFBiz框架本身就灰常的膨大,如果是一般的小型应用,真的有点杀鸡用牛刀的感觉了,不过由于OFBiz提供了一种可插拔的机制,也可以剔除一些不相关的应用。
可能也是当前没有什么人愿意花时间成本去研究的原因!(当然,原因肯定是多方面的!也不用去细究了!一切还是得源自自我爱好!要不然,都是胡扯!)下面的文字,都是自己用烂掉牙的英语翻译能力翻译的,定会存在不少纰漏与错误!请大伙们多多指点了!有些地方,如果自己找不到很好的中文表述,我会加上英语原文的!这个教程被分为6个部分,也是一个由浅入深的过程。
第一部分NOTE1:这里的代码很多都会来自Example组件。
你会经常找到有关最新的OFBiz代码在Example组件中。
无论在什么时候你为这个应用去看一些简单代码,都应该应用Example组件,这个能帮助你在OFBiz上开发的更好!每当有新特性出现,都会被优先加到Example组件中作为参考范例。
OFBIZ学习一、ofbiz之Hello World⏹下载OFBIZ并配置到当地⏹下载地址:解压(安装)OFBIZ:配置到当地:运行命令行: (cmd)进入到安装目录(即解压旳目录):在安装目录下运行命令: ant load-demo注: 版本较低旳命令也许是 ant run-install⏹安装成功后运行命令: java -jar ofbiz.jar导入到IDE(Eclipse)中:直接import安装目录, 将整个ofbiz导入到eclipse中1.新建练习项目:2.在hot-deploy目录下新建practice目录(apache-ofbiz-12.04.02\hot-deploy\practice)在practice目录下新建webapp、widget目录, 然后新建ofbiz-component.xml文献(apache-ofbiz-12.04.02\hot-deploy\practice\webapp)(apache-ofbiz-12.04.02\hot-deploy\practice\wid)(apache-ofbiz-12.04.02\hot-deploy\practice\ofbiz-component.xml)注: ofbiz-component.xml可直接从(apache-ofbiz-12.04.02\specialpurpose\example)下拷贝后来所有需要新建旳文献都直接从示例中拷贝, 然后进行修改。
代码如下:3.在webapp下新建practice目录(hot-deploy/practice/webapp/practice)4.在第二个practice下新建WEB-INF目录(hot-deploy/practice/webapp/practice/WEB-INF)注: 第一种practice是我们旳组件名, 第二个practice是我们旳应用名5.在下面我们不再使用第一种第二个这种说法, 会直接说组件(component)或应用(webapp)6.在WEB-INF下新建web.xml与controller.xml文献(去拷贝过来)先修改web.xml文献, 在ofbiz 中web.xml配置文献遵守j2ee旳规范, 与j2ee旳配置文献类似。
ofbiz各配置文件作用以及工作流程1.当客户端发出请求时,调用第一个配置文件WEB-INF/controller.xml,根据请求的地址处理方法1:直接调用java类的方法<request-map uri="login"><security https="true" auth="false"/><event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/><response name="success" type="view" value="main"/><response name="error" type="view" value="login"/></request-map>如果为login,会查找path="org.ofbiz.webapp.control.LoginWorker"这个类的invoke="login"这个方法进行处理处理方式2:通过service配置文件取查找对应的service(常用)<request-map uri="createForum"><security https="true" auth="true"/><event type="service" path="" invoke="createForum"/><response name="success" type="view" value="FindForum"/><response name="error" type="view" value="FindForum"/></request-map>表示调用的类型为type="service"调用的方法为invoke="createForum"2.进入servicedef/services.xml,这是service的配置文件从里面找到上面对应的配置信息<service name="createForum" default-entity-name="GroupForum" engine="simple"location="org/ofbiz/group/GroupServices.xml" invoke="createForum" auth="true"> <description>Create a GroupForum</description><permission-service service-name="exampleGenericPermission" main-action="CREATE"/><auto-attributes include="pk" mode="OUT" optional="false"/><auto-attributes include="nonpk" mode="IN" optional="true"/><override name="forumName" optional="false"/></service>文件配置的createForum这个文件实现的相关信息location="org/ofbiz/group/GroupServices.xml"表示实现是通过minilanguage配置文件3.进入script下面的org/ofbiz/group/GroupServices.xml文件通过minilanguage配置文件<simple-method method-name="createForum" short-description="create a GroupForum"> <make-value entity-name="GroupForum" value-name="newEntity"/><sequenced-id-to-env sequence-name="GroupForum" env-name="newEntity.forumId"/> <!-- get the next sequenced ID --><field-to-result field-name="newEntity.forumId" result-name="forumId"/><set-nonpk-fields map-name="parameters" value-name="newEntity"/><create-value value-name="newEntity"/></simple-method>配置了对entity-name="GroupForum"实体的创建的相关信息和操作,该步骤可以用java代码实现.4.进入实体配置文件部分entitymodel.xml<entity entity-name="GroupForum" package-name="org.ofbiz.group" title="GroupForum Entity"> <field name="forumId" type="id-ne"><!-- primary sequenced ID --></field><field name="forumName" type="name"></field><field name="description" type="description"></field><field name="authorID" type="id"></field><field name="created" type="date-time"></field><prim-key field="forumId"/></entity>配置了entity-name="GroupForum" 的实体与数据库映射文件entitygroup.xml<entitygroup xmlns:xsi="/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="/dtds/entitygroup.xsd"> <entity-group group="org.ofbiz" entity="GroupForum"/><entity-group group="org.ofbiz" entity="GroupCategory"/><entity-group group="org.ofbiz" entity="GroupThread"/><entity-group group="org.ofbiz" entity="GroupPost"/></entitygroup>配置了实体名称的组5.service执行成功后会返回到展现逻辑配置部分,也就是WEB-INF/controller.xml中<request-map uri="login"><security https="true" auth="false"/><event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/><response name="success" type="view" value="main"/><response name="error" type="view" value="login"/></request-map>现在会请求到main中,<view-map name="main" type="screen"page="component://group/widget/group/CommonScreens.xml#main"/>在WEB-INF/controller.xml中找到main的配置信息该显示用screen配置显示component://group/widget/group/CommonScreens.xml#main6.现在根据地址找到配置文件component://group/widget/group/CommonScreens.xml#main表示该文件中name为main的screen<screen name="main"><section><actions><set field="titleProperty" value="OrderOrderTaskList"/><set field="headerItem" value="tasklist"/><scriptlocation="component://order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh"/> </actions><widgets><decorator-screen name="main-decorator"><decorator-section name="body"><container style="screenlet"><container style="screenlet-header"><label style="boxhead" text="Main Page"/></container><container style="screenlet-body"><section><condition><if-empty field-name="userLogin"/></condition><widgets><container><label text="${uiLabelMap.ExampleMessage}"/></container></widgets></section><container><label text="${uiLabelMap.Welcome}"/></container></container></container></decorator-section></decorator-screen></widgets></section></screen><screen name="login"><section><widgets><decorator-screen name="main-decorator"><decorator-section name="body"><platform-specific><html><html-template location="component://common/webcommon/login.ftl"/></html> </platform-specific></decorator-section></decorator-screen></widgets></section></screen></screens>该配置文件配置了显示的数据以及显示的格式其中数据是通过.bsh文件和service提供的,而显示的格式为ftl文件提供的7.进入group\webapp\group\WEB-INF\actions\forum在bsh为beansheel配置文件,语法与java类似,在这儿是为了提供显示数据import java.util.*;import java.io.*;import org.ofbiz.entity.*;import org.ofbiz.base.util.*;security = request.getAttribute("security");delegator = request.getAttribute("delegator");userLogin = session.getAttribute("userLogin");person = null;if (userLogin != null ) {person = userLogin.getRelatedOne("Person");}forumId = request.getParameter("forumId");categoryId = request.getParameter("categoryId");if ( categroyId == null ||UtilValidate.isEmpty(categoryId) ){categoryId = delegator.getNextSeqId("GroupCategory");}groupCategory = delegator.findByPrimaryKey("GroupCategory", UtilMisc.toMap("categoryId", categoryId));context.put("forumId", forumId);context.put("categoryId", categoryId);context.put("groupCategory", groupCategory);context.put("person", person);该文件把需要的数据放到返回的上下文中8.进入到group\webapp\group\forum\listForum.ftl该文件为Freemarker的文件,作用是代替jsp作显示层<#if forums?has_content>Some of the famous celebrities who have visited our site:<table><ul><#list forums as forum><tr><li><td><a href="EditForum?forumId=${forum.forumId?if_exists}">${forum.forumId?if_exists}</a></td> <td>12 ${forum.forumName?if_exists}</td><td> ${forum.description?if_exists}</td><li><td><a href="deleteForum?forumId=${forum.forumId?if_exists}">${forum.forumId?if_exists}</a></td> </tr><tr><li><td><a href="FindCategory?forumId=${forum.forumId?if_exists}">${forum.forumId?if_exists}</a></td> <td><a href="EditCategory?forumId=${forum.forumId?if_exists}">${forum.forumId?if_exists}</a></td> <td> </td><li><td></td></tr></#list></ul></table></#if>通过一些表达式和判断把数据显示出来,这样整个请求完毕其他配置文件的作用:data目录下的配置文件:<entity-engine-xml><UserLogin userLoginId="DemoBuyer"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="DemoRepAll"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="DemoRepStore"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="DemoCustCompany"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="DemoCustAgent"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="DemoCustomer"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLogin userLoginId="supplier" partyId="externaluser"currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" passwordHint=""/> <UserLoginSecurityGroup groupId="ORDERSUPPLIER_LTD" userLoginId="supplier" fromDate="2001-01-01 12:00:00.0"/></entity-engine-xml>配置了系统启动时后需要添加的一些数据config目录下的配置文件:为国际化配置信息<property key="OrderCaughtExceptionOnCartUpdate"><value xml:lang="en">Caught exception on cart update. </value><value xml:lang="es">Excepción capturada en la actualización del carro.</value><value xml:lang="fr">%Exception attrapée dans la mise à jour du chariot. %</value><value xml:lang="it">Eccezione sull'aggiornamento carrello. </value><value xml:lang="ro">Exceptie la actualizarea cosului. </value><value xml:lang="zh">更新购物车时发生意外情况</value></property>widget里面的form配置文件:<form name="OrderPurchaseProductOptions" type="single"target="OrderPurchaseReportProduct.pdf" title="" extends="OrderPurchaseReportOptions"> <field name="fromOrderDate" title="${uiLabelMap.OrderReportFromDate}"><date-timetype="timestamp"/></field><field name="thruOrderDate" title="${uiLabelMap.OrderReportThruDate}"><date-timetype="timestamp"/></field><field name="submitButton" title="${monRun}"widget-style="smallSubmit"><submit button-type="button"/></field></form>配置了一些表单信息,和screen一样,但是他可以直接显示数据不需要使用Freemaerker的文ftl文件作页面布局,根据配置信息可以直接生成ofbiz-componet.xml文件配置了项目要加载的配置文件的信息,它可以告诉OFBIZ应用程序组件的相关信息:数据模型,商业逻辑,用户接口,种子数据,以及其他程序需要的资源。
Ofbiz(Open for business), 开源的电子商务系统,基于JAVA开发,功能强大,可扩展性强。
1.为什么使用Ofbiz呢?首先Ofbiz 是开源的,集成了很多优秀的开源技术:Ant , Freemarker , Jboss 等等。
其次功能强大,拥有已经开发好的,并且稳定的工作流引擎,用户权限系统,前台电子商务系统,后台订单处理,库存管理系统,客户管理等等。
最后Ofbiz提供了一套基于JAVA的功能扩展方案,可以在目前最基本的功能上添加新的功能。
并且基于Component组件开发,对于不需要的功能可以将相应Component去除掉。
2.为什么不用Ofbiz呢?虽然说Ofbiz提供了一整套功能扩展方案,但是其过程十分繁琐。
实现一个最简单的功能(比如读取一张用户表的信息),需要进行配置的文件就有十几个。
对于数据库的操作进行了非常强大的封装,拥有Ofbiz引以为傲的Entity Engine(有点像Hibernate,不过比Hibernate还要猛,一句SQL语句都不用)。
只需要在相应Component的entityengine.xml对要操作的实体(对应表)进行定义,并且定义在特定服务中的增删改查方法即可。
这样说好像很好用的样子,但是实际上,需要付出非常多的时间和精力去学习这套东西,并且学习曲线会很大。
Ofbiz本身自带的功能如果不符合我们自己的需求,基本上很难进行修改,而是应该重新开发对应的功能。
比如它的Order Processing跟目前我们公司的订单管理存在很大的差距。
所以我们必须重构。
而这都需要付出很大的代价。
我们考虑使用Ofbiz的原因主要是想要在其强大功能的基础进行快速的扩展,但是如果很多功能都需要重构的话,那么就得不偿失了。
ofbiz使用注意项:在配置ofbiz路径时不要有空格。
3.如何在ofbiz上扩展一个功能呢?我们以读取显示一个简单的User List来做说明:修改ofbiz使用的数据库:(采用热部署:应用程序目录对应hot-deploy之下)第一步,建立一张User表,将Oracle的JDBC数据驱动Jar包放到这个目录:ofbiz\framework\entity\lib\jdbc第二步,修改相应的数据源配置:将jdbc部分改成对应的参数。
A p a c h e O FB i z学习手册work Information Technology Company.2020YEARApache OFBiz Getting StartedApache OFBiz 之旅1. Apache OFBiz介绍 (3)1.1 The What, Why and How of Apache OFBiz (3)1.2. How Do I Decide What to Use? (3)2. Second Part Mailing Lists (4)3. Demo and Test Setup Guide示例和安装指南 (6)3.1. Introduction (6)3.2. Quick & Easy Setup (6)3.3. Building From SVN (7)3.4. Database Setup (8)3.5. J2EE Containers (9)4. The Open For Business Project: Entity Engine Configuration Guide (9)1.Apache OFBiz介绍这个档和相关文档信息内容来开始我们的OFBiz之旅。
This document and it's related documents contain information about getting started with OFBiz.阅读这编文档后你也许可以得到一些帮助同时也开始了Apache OFBiz精彩世界之旅。
After reading this document you might find these helpful as well as you get started on your journey into the wonderful world of Apache OFBiz:•Mailing Lists(邮件发送清单)•Demo and Test Setup Guide(示例测试指南)•Technical Production Setup Guide(技术产品指南)•Business Setup Guide(业务指南)•OFBiz Source Repository and Access(OFBiz源码库和通道)•Framework Introduction Videos and Diagrams(框架介绍的视频和图表)•OFBiz Beginners Development Guide Using Practice Application•OFBiz Contributors Best Practices1.1T he What, Why and How of Apache OFBizThe basic structure and driving force behind OFBiz has a lot to do with the goals and actualization of the release process.OFBiz is and always has been a community-driven open source project. There is no central commercial organization that drives the development of OFBiz or derives a project from the intellectual property of the software or other project assets. This is formalized now that OFBiz is a project in the Apache Software Foundation.Because of this OFBiz always has been and always will be just what users who contribute to the project want it to be. There are many different individuals and groups involved with many different needs and our goal is to define and follow development and release policies that serve the needs of these parties.So, let's start with that...1.2.How Do I Decide What to Use?From a project user perspective there is one main question that can help determine which way they will want to get OFBiz: Do I want to contribute to the open source project?For this question there are 3 main answers:1Yes, definitely: I want to contribute to design, coding, and testing efforts and thereby collaborate with others to more effectively and efficiently satisfy the long-term requirements from me, my clients, or my employer2Kind of: I want to stay on the cutting edge and participate with testing and feedback, but I'm not in a position to participate in development and/or in the near future I will needsomething more reliable and supported and that won't change very much3Not really: I'm happy to offer feedback, but I really need something that will work well now and well into the future so we can get things going in our organizationFor each answer there is a recommended way to get OFBiz:4Get the code straight from the code repository (SVN) trunk and update frequentlythrough development, stopping before your integration or final pre-deployment testing, and periodically even after production deployment according to your ongoing develop/deploy plan;note that when you are not updating from SVN you should continue to watch the commits for bug fixes to patch into your code base5Get the code from the code repository (SVN) release branch and keep updated orpatched regularly as fixes are committed and the branch stabilizes over time; when getting started choose the most recent branch, even if it is very new; when new release branches are created update to them soon after the branch is done6Get a built release package or the code from a release branch tag, and update as new pre-built release packages and tags are created; these will only represent fixes and unless a major issue arises they will be backward compatible and generally safe to update or patch to; when getting started choose a release branch that has been around for at least 2-3 months and that has no major outstanding issues in the issue tracker to assure that it has stabilized; when new release branches are created wait until you are ready to do a major upgrade and possibly need to modify your code and configuration, and wait at least until the prospective branch hasstabilized before moving to it2.Second Part Mailing ListsTo subscribe to a mailing list use the links below. In your first email you will get some information about working with the list manager EZMLM.To unsubscribe from any of the following lists, you need to send an empty, subjectless email to unsubscribe address listed below. In other words, click the appropriate unsubscribe link below and press send.Support of Users and Developers List: user@The user list is intended for installation, deployment, custom development and usage related topics.High Traffic Subscribe Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMailWhen you ask a complex questions on this list, it's better to give details. Most of the time URLs are enough and welcome.Else please follow this scenario (at leat relevant parts)Why•What you were looking for•How did you try to achieve it•What did you expect as results•And what you really gotHow1What you did (including detailed steps to reproduce)2What you expected to happen3What actually happened (including exact quotes of error messages, etc)4If possible provide an URLDesign and development List: dev@The developer list is strictly for topics related to the design and development of the OFBiz Project itself.Please don't ask questions relevant to User Mailing List in this Mailing List. If you are not sure to which list to post, do it into User Mailing List. By the way, you should get much more attention from this list for users questions type.High Traffic Subscribe  Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMailCommits List: commits@The commits list is used to notify subscribers of commits to the OFBiz SVN repository and is not used for discussions.ÂHigh Traffic Subscribe  Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMail2.1.Global Searchable ArchivesTo search in all Nabble forums, in all OFBiz MLs with MarkMailPlugin search tools for Firefox using Nabble or Mark Mail2.2.HistoryFor history you may look at•dev•user•svn•JiraThere is no embedded search tool but you may use google site search option2.3.Searching in the wikiAs Confluence wiki is shared among projects at the ASF, if you want to search only for OFBiz information you can use the OFBiz Advanced Search page.Or you can follow these steps:5Add the 5 OFBiz spaces (or whatever you want) into your favorite spaces. For that,browse /confluence/dashboard.action and click on the 'Star' besides any spaces to add, or if you see any stars there, whilst in a space click on Tools > Favorite. The star should go yellow.6Click in the search box and press enter to get the advanced search (Which should bring you to /confluence/dosearchsite.action?queryString=)7Type in your search term then choose 'Favorite Spaces' from the 'Where' drop down box.8Click on filter.Results from only the spaces you have added to favorites will be shown.Personnaly I have also added the 5 spaces as watches to receive everyday a summary of changes in these space. This also build you a correct dashboard (My Dashboard).3.Demo and Test Setup Guide示例和安装指南3.1.Introduction这编文档描述了OFBiz的安装和业务项目的基本配置选项。
一、安装OFBIZ1.配置数据库比如我的ofbiz的根目录为H:\workspace\csofbizworkspace\weidaPlatform设置为OFBIZHOME 则打开OFBIZHOME/framework\entity\config\entityengine.XML文件修改数据源名称:然后往下查找,你定义的datasource-name的数据库,比如我这里是localmssql修改jdbc-uri 和账号和密码2.创建数据库在数据库中手动创建你指定的数据库,我这里是weidaTest3.打开命令提示符窗口使用cd命令进入到ofbiz根目录比如我的ofbiz根目录为H:\workspace\csofbizworkspace\weidaPlatform然后输入ant load-demo执行4.执行完毕后,进入创建的数据库看下,是不是增加了表,然后再打开user_login表看了,里面是否有数据,如果有,则表示安装完成二、新建应用修改配置文件1.把ofbiz导入到eclipse中2.在OFBIZHOME/hot-deploy文件夹下,重新复制一份weidaTest并重命名为weidaTest23.打开weidaTest2根目录下的build.xml文件,把weidaTest全部替换为weidaTest24.打开weidaTest2根目录下的ofbiz-component.xml文件,把weidaTest全部替换为weidaTest2,并清掉所有的服务和实体和初始数据的配置5.把weidaTest2/webapp下的weidaTest更改为weidaTest26.打开文件wedaTest2/wepapp/weidaTest2/WEB-INF/web.xml把weidaTest替换为weidaTest27.打开weidaTest2/widget/CommonScreens.xml把所有的weidaTest替换为weidaTest28.打开weidaTest2/widget/ProductMenus.xml把所有的weidaTest替换为weidaTest29.把entitydef和servicedef,data,src清空10.在src右键build path->use assource folder到目前为止基本配置文件已经修改完毕现在开始ofbiz的流程学习1.打开weidaTest2/webapp/weidaTest2/WEB-INF/controller.xml使其内容如下图:Request-map 表示一个rul配置,其中属性说明如下:rui:该rul的具体值比如我写的是main,则其完整的url值为http://localhost:8180/weidaTest2/mainSecurity 安全配置属性,https是否使用https连接,auth是否必须登陆Response默认的name值有success,和error其作用跟struts2中的相试,就是根据事件返回的值不同,跳转到不同的视图去,这里没有配置事件,则默认都是跳转到success那里设置为request-map后,设置view-mapname值对应response里的value值Page指示视图的配置文件路径和其name值,#后面的就是name值这里指定视图的配置文件路径为weidaTest2/widget/weidaScreens.xml。
必备软件Jdk7文件名:java_ee_sdk-6u4-jdk7-windows.exeeclipseMySQL Installer 5.6 for WindowsMySql Connectors文件名:mysql-connector-java-gpl-5.1.35.msi.Net Framework 4.0文件名:dotNetFx40_Full_x86.exeOfBiz13.07.01apache-ofbiz-13.07.01.zip安装安装和设置JAVA环境新建系统变量JAVA_HOME:C:\Program Files (x86)\Java\jdk7系统变量Path的值加入内容:%JAVA_HOME%\bin;安装MySql数据库依赖于:Microsoft .NET Framework 4 Client ProfiledotNetFx40_Client_setup.exeMicrosoft Visual C++ 2013 Redistributable Package (x86 or x64)vcredist_x86.exe安装MySql建立一个数据库ofbiz。
新建一个用户ofbiz和密码ofbiz,并且赋予ofbiz全部权限。
集成开发工具eclipse(java环境要加进来)解压apache-ofbiz-13.07.01.zip到eclipse工作目录下,打开eclipse载入apache-ofbiz-13.07.01数据库安装和配置将MySql的jdbc驱动拷贝到${Ofbiz_Home}/framework/entity/lib/jdbc 目录下。
不安装,会报如下错误:[java] Exception: ng.ClassNotFoundException[java] Message: Cached loader got a known bad class name:com.mysql.jdbc.Driver[java] ---- stack trace ------设置实体引擎(Entity Engine)的默认数据库配置文件:${Ofbiz_Home}/framework/entity/config/entityengine.xml●默认的数据库为derby,把localderby改成MySql<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false"><group-map group-name="org.ofbiz" datasource-name="localmysql"/><group-map group-name="org.ofbiz.olap" datasource-name="localmysql"/><group-map group-name="org.ofbiz.tenant" datasource-name="localmysql"/> </delegator><delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false"> <group-map group-name="org.ofbiz" datasource-name="localmysql"/><group-map group-name="org.ofbiz.olap" datasource-name="localmysql"/><group-map group-name="org.ofbiz.tenant" datasource-name="localmysql"/> </delegator><!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant run-install" before running "ant run-tests" --><delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main"><group-map group-name="org.ofbiz" datasource-name=" localmysql "/><group-map group-name="org.ofbiz.olap" datasource-name=" localmysql "/><group-map group-name="org.ofbiz.tenant" datasource-name=" localmysql "/></delegator>●修改实体引擎的默认数据库的配置信息<datasource name="localmysql"helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"field-type-name="mysql"check-on-start="true"add-missing-on-start="true"check-pks-on-start="false"use-foreign-keys="true"join-style="ansi-no-parenthesis"alias-view-columns="false"drop-fk-use-foreign-key-keyword="true"engine="InnoDB" <!-- 现在mysql一般的引擎都是InnoDB,早在4.0时代就不推荐使用type,现在改成engine ,-->character-set="utf8" <!--字符集>collate="utf8_general_ci"><!--排序方式><read-data reader-name="seed"/><read-data reader-name="seed-initial"/><read-data reader-name="demo"/><read-data reader-name="ext"/><inline-jdbcjdbc-driver="com.mysql.jdbc.Driver"jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"jdbc-username="ofbiz"<!-- 这里都是数据库的基本配置信息,改成自己对应的-->jdbc-password="ofbiz"isolation-level="ReadCommitted"pool-minsize="2"pool-maxsize="250" 连接池没必要搞这么多,50够了time-between-eviction-runs-millis="600000"/></datasource>运行OfBiz (CTRL+R)输入cmd进入命令模式,cd到你eclipse的工作目录workspace下项目ofbiz12.0.4的根目录(如:D:\workspace\ofbiz),安装OFBIZ演示数据:$ ant load-demo$ ant start安装过程出现的错误解决方案:1.错误:Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptionMessage: Table 'ofbiz.status_type' doesn't exist在5.1以及之前版本的MySQL中新建一个Table,可以这样执行:CREATE TABLE t (i INT) TYPE = MYISAM;或者CREATE TABLE t (i INT) ENGINE = MYISAM;在MySQL5.5版本中,用TYPE来指定存储引擎已经行不通,标准用法是ENGINE。
演示和测试安装指南演示和测试安装指南简介本文档描述了一个初始安装过程和商业项目的基本配置选项打开了。
如需详细资料请参阅有关文件,如为框架OFBiz 的配置指南,在实体引擎(数据库)配置指南,在服务引擎配置指南,以及其他相关文件,您可以在发现OFBiz 的文档索引如果你遇到麻烦有帮助的各种资源。
第一个步骤将是寻找在新网站OFBiz 的文件和旧OFBiz 的维基(现存档),以及当时的OFBiz 的邮件列表。
如果你找不到你答案,然后订阅到Apache OFBiz 的用户邮件列表,发送的邮件有问题,你用尽可能多的细节尽可能有关。
快速和简易安装你可以通过下载并运行了完整的发行和OFBiz 的以下一些简单的指令迅速。
对于更多的选择和解释,请参见本文档的其余部分。
1. 下载并安装Sun 的Java(J2SE)的网站1.5 版的Java 2 系列JDK/J2SDK(不是JRE,您需要完整的SDK)如果你打算使用一个发布之前R10.04 否则使用或树干1.6,确保你的JAVA_HOME 环境变量设置为这个JDK 的安装后(注意,Mac OS X 的JVM的设置是没有必要的,只要确定了与Java 是在OS X 软件更新功能日期)。
还要注意的是OpenJDK 的仍然是不推荐,还有与它(今日:2010-05-27)一些汇编problmems 2. OFBiz 的新闻档案下载并解压缩它,在你选择的目录(见评论的下面,所以现在检查出库的svn是首选,见下文...). 这应该建立一个子目录:ofbiz 登录。
这将是OFBIZ_HOME 位置。
3. 启动OFBiz 的内嵌的Tomcat 可以走进OFBiz 的目录,然后运行"startofbiz.bat" (or "%JAVA_HOME%\bin\java -jar ofbiz.jar") 适用于Windows(or "./startofbiz.sh"(or "$JAVA_HOME/bin/java -jar ofbiz.jar")用于Linux / UNIX。
新朗华ERP系统简明用户手册北京朗华世纪科技发展有限公司2006年11月北京朗华世纪科技发展有限公司新朗华ERP系统简明用户手册版权声明:新朗华ERP系统是北京朗华世纪科技发展有限公司在中国推广Apache OFBiz(简称OFBiz)项目所用的中文名称。
本文档内容主要译自OFBiz网站的OFBiz Basic Production Setup Guide。
本文档采用LGPL版权协议,北京朗华世纪保留本翻译的版权。
目录1.编写本文档的目标2.安装OFBiz时需要收集的信息3.常用术语和信息OFBiz管理程序OFBiz的其它术语4.安装步骤环境搭建安装OFBiz安装数据库加载种子数据配置OFBiz■缓存设置■调试工具设置■安全设置■URL和端口设置■端口、缺省值■SSL证书设置■货币、本地语言设置■电子邮件服务器设置■安装一个根Web应用运行OFBiz性能监控和优化5.业务安装过程公司公用信息设置■公司联系方式场所(仓库/仓储)设置站点设置店铺设置■店铺设置■店铺角色设置■促销设置■产品目录设置■站点设置■营业税设置■店铺货运设置∙UPS在线费率估算∙UPS XPCI整合∙USPS在线费率估算■店铺支付设置∙支付处理详单∙PayPal支付设置∙CyberSource支付设置■电子邮件设置■网上调查设置■通用设置替代目录、种类和产品设置■目录设置■种类设置■产品设置∙添加新产品内容∙添加产品价格6.POS机设置步骤编写本文档的目标在成为企业信息自动化的优秀开发框架和平台的同时,OFBiz还提供了许多不需要大量定制即可使用的杰出应用。
然而,毕竟这是一个企业级软件,所以它包含了非常多的配置选项、设置和数据结构,需要你在一定程度上掌握。
本文档的目的是帮助你在实际的电子商务应用中安装OFBiz。
这里不会涉及讨论、决策或配置选项,而仅仅是OFBiz实际应用中所必需的那些基本设置的概述。
有关安装的更详细的信息参见Undersun咨询公司提供的OFBiz―配置、部署和维护‖文档。
超算OFBIZ入门教程一、安装OFBIZ1.配置数据库比如我的ofbiz的根目录为H:\workspace\csofbizworkspace\weidaPlatform设置为OFBIZHOME则打开OFBIZHOME/framework\entity\config\entityengine.XML文件修改数据源名称:然后往下查找,你定义的datasource-name的数据库,比如我这里是localmssql修改jdbc-uri 和账号和密码2.创建数据库在数据库中手动创建你指定的数据库,我这里是weidaTest3.打开命令提示符窗口比如我的ofbiz根目录为H:\workspace\csofbizworkspace\weidaPlatform然后输入ant load-demo执行4.执行完毕后,进入创建的数据库看下,是不是增加了表,然后再打开user_login表看了,里面是否有数据,如果有,则表示安装完成二、新建应用修改配置文件1.把ofbiz导入到eclipse中2.在OFBIZHOME/hot-deploy文件夹下,重新复制一份weidaTest并重命名为weidaTest23.打开weidaTest2根目录下的build.xml文件,把weidaTest全部替换为weidaTest24.打开weidaTest2根目录下的ofbiz-component.xml文件,把weidaTest全部替换为weidaTest2,并清掉所有的服务和实体和初始数据的配置5.把weidaTest2/webapp下的weidaTest更改为weidaTest26.打开文件wedaTest2/wepapp/weidaTest2/WEB-INF/web.xml把weidaTest替换为weidaTest27.打开weidaTest2/widget/CommonScreens.xml把所有的weidaTest替换为weidaTest28.打开weidaTest2/widget/ProductMenus.xml把所有的weidaTest替换为weidaTest29.把entitydef和servicedef,data,src清空10.在src右键build path->use as source folder到目前为止基本配置文件已经修改完毕现在开始ofbiz的流程学习1.打开weidaTest2/webapp/weidaTest2/WEB-INF/controller.xml使其内容如下图:Request-map 表示一个rul配置,其中属性说明如下:rui:该rul的具体值比如我写的是main,则其完整的url值为http://localhost:8180/weidaTest2/mainSecurity 安全配置属性,https是否使用https连接,auth是否必须登陆Response默认的name值有success,和error其作用跟struts2中的相试,就是根据事件返回的值不同,跳转到不同的视图去,这里没有配置事件,则默认都是跳转到success那里设置为request-map后,设置view-mapname值对应response里的value值Page指示视图的配置文件路径和其name值,#后面的就是name值这里指定视图的配置文件路径为weidaTest2/widget/weidaScreens.xml。
一、目录管理一.基本概念(一)产品产品是可用于销售的货品。
他们具有名字、描述、图片、价格的属性。
产品有3种重要类型:1.实物货品,比如书或白色中号衬衫,他们是需要仓储的;2.虚拟货品,比如“衬衫”,它并不实际存在,只是一个概念,因而不像实物货品那样可以说某个人买了一件白色中号衬衫。
虚拟货品比如衬衫是指那些可以被买卖的实物货品的所有类型的统称,这样可以更容易的组织产品销售。
举个例子,客户在购买衬衫的时候,首先她选择衬衫这一虚拟货品,然后你可以问她想要的尺码颜色等,完成之后就可以将这个特定的衬衫下订单了。
这样就避免了给客户一个长长的包含所有颜色和尺码的衬衫列表了。
虚拟货品不需要仓储。
3.数字货品,比如可下载的音乐或是赠品卡,这一类货品也不需要仓储。
重要!不要混淆虚拟货品和数字货品。
虚拟货品是对那些具有相同特征(比如尺寸颜色)的货品的统称。
虚拟货品的一个具体实例可以是实物货品(比如衬衫),也可以是数字货品(比如可下载的音乐)。
而数字货品是一类特殊的电子化的货品,不需要仓储。
(二)特征特征描述了产品所具有的特性、属性等,比如颜色,尺码。
在产品目录管理中,允许给你的产品定义你所想要的任何特征组。
特征是与产品关联并应用于产品的。
当前系统使用了下列主要的产品特征关系类型:1.可选特征允许客户在多个可选项中选择一个。
比如衬衫可以有白色、蓝色、绿色、黄色等供选择。
这些颜色就是变体产品“衬衫”的可选特征,客户购买时将被提示选择某一颜色。
2.每一特定颜色都是一个实物产品的标准特征。
这意味着白色是一个虚拟产品的可选特征但却是“白衬衫”这一实物产品的标准特征。
(三)分类分类是为了方便客户而将一类产品组合在一起。
一个分类可以是产品的组合,也是产品于子分类或是子分类之间的组合。
这些产品或是子分类都可以有自己的描述或图片。
(四)目录目录是对于组合分类非常有用的一个组合层次。
目录仅是由分类构成。
(五)产品商店产品商店是一个实体商店或是一系列产品集的一个镜像。
1.ofbiz的源码下载
/repos/asf/ofbiz/branches/release10.04(将此地址直接拷到SVN服务器即可)
注:不要在eclipse或myeclipse中用svn插件下载源码(除非电脑配置相当的高)避免卡屏甚至死机
2.将源码导入到eclipse中,步骤:
file-->import-->General-->Existing Projects into Workspace
3.第一次将项目导入到eclipse中时,可能会出项红叉。
那是因为缺少文件,第一个是framework/base目录下的build文件及
framework/sql目录下的build文件。
如有人需要可以联系我。
请发邮件。
我在公司只能用邮件。
不能聊天,ORZ。
(邮件地址:tt986101@)
最好将视图调成navigator,eclipse与myeclipse操作一样。
window-->show view-->other-->navigator
(这主要是为了方便查看哪地方缺少文件)
4.将eclipse中的ant窗口调出,再将ofbiz目录下的build.xml(注意是根目录的buile.xml)拖到ant窗口。
5.点击build【default】编译项目
6.点击run-install 安装项目
7.点击run 启动项目
启动正常访问http://localhost:8080/ecommerce/ 即可看到demo首页
http://localhost:8080/webtools/ 可访问到后台页面(登陆名为admin 密码为ofbiz。