BLOG

NEXT STEPS

Archive for the ‘OFBiz eCommerce’ Category

OFBiz Tutorial:Use Dependent Selects to Manage Country-State Select Boxes

Wednesday, July 14th, 2010

Javascript components for managing Dependent Selects is starting to find use in ecommerce applications we are developing. It all started with need for updating contents of State field, on change of Country in postal address forms.

More then a year ago we started using Ajax for updating State select box options on change of Country select box value. It was a step forward but I wasn’t satisfied. Recently I had time to build a Dependent Select javascript component that takes the process of managing dependent selects boxes to the next level. Please read my blog post, OFBiz Tutorial – Dependent Selects for Prototype, to know more about it. If you are wondering about a scenario from real world, Here you go.

Below is the piece of code from the Freemarker template for the Checkout page in OFBiz ecommerce application.  It renders Country and State select boxes with their options.

?View Code LANGUAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div>
      <label for="shipToCountryGeoId">Country</label>
<select id="shipToCountryGeoId" class="required select dependentSelectMaster" title="shipToCountry" name="shipToCountryGeoId">
        <option title="${country.geoId}" value="${country.geoId}">${country.get("geoName")?default(country.geoId)}</option>
        <!--#list-->
      </select></div>
<div id="shipToStates">
      <label for="shipToStateProvinceGeoId">State</label>
<select id="shipToStateProvinceGeoId" class="required shipToCountry" name="shipToStateProvinceGeoId">
        <option class="${country.geoId}" title="${stateAssoc.geoId}" value="${stateAssoc.geoId}">&lt;#if shippingAddress.stateProvinceGeoId?has_content &amp;&amp; shippingAddress.stateProvinceGeoId?default("") == stateAssoc.geoId&gt; SELECTED <!--#if-->&gt;${stateAssoc.geoName?default(stateAssoc.geoId)}</option>
            <!--#list-->
          <!--#if-->
        <!--#list-->
      </select></div>

Following Javascript code will unobtrusively manage the relationship between Country select box (master) and State select box (slave),

?View Code LANGUAGE
1
2
3
$('checkoutPanel').select('.dependentSelectMaster').reverse().each( function (elt) {
  new Dependent( $$( '.'+elt.title ).first() , elt );
})

Where ‘checkoutPanel’ is Id of wrapper div that encloses checkout html form. Apply ‘dependentSelectMaster’ class to select boxes that have dependent slave elements, making them the master. Slave select box is related to its master using title and class attribute of elements, A select box is slave if it has a class applied to it that is equal to title of master select box.

The javascript code snippet traverses DOM tree looking for master select boxes. Using title attribute of master select it finds all the slaves and creates Dependent select relationship between them. Its all clean and simple.

Needless to say, you’ll need to include Prototype.js and DependentSelect.js in your webpage. I hope you will find this short OFBiz tutorial useful.

- Anil

Anil Patel is Chief Development Officer at HotWax Media as well as an OFBiz project committer, PMC member, and active community contributor. He also studies karate! Anil will join other HotWax Media employees and advisors in periodically posting thoughts here related to OFBiz, eCommerce, ERP, and related topics.

Pricing Enterprise E-commerce Services

Tuesday, July 6th, 2010

Enterprise-e-Commerce

The enterprise e-commerce space is broadly varied, and the boundaries constantly shifting. Features and capabilities only available to huge players just 10 years ago are now more affordable and available to SMBs around the world.

Sometimes just using the term ‘enterprise e-commerce,’ however, can be difficult or misleading. Is enterprise e-commerce the right term to use for a company with 10,000 SKUs, doing a few million dollars a year in online sales? In the event that they manage their suppliers, inventory, warehouse, and fulfillment using an integrated system, for example, I would say yes — this counts as ‘enterprise e-commerce.’ Although clearly no Amazon or Zappos, these companies and their systems take it far beyond the simple eBay auction or basic storefront.

At HotWax Media, we provide enterprise e-commerce consulting services. Our core services are based around Apache OFBiz, but we regularly find ourselves integrating with 3rd party systems like NetSuite, Endicia, and many others. One day it could be SAP with multiple users, and the next day it could be QuickBooks piloted by the business owner herself. The very nature of an enterprise e-commerce system suggests that the consulting services can be quite different from one client to the next, and we have certainly found this to be true. We can find ourselves building systems that are similar in fundamental intent for companies whose revenues are separated by two orders of magnitude.

So the question comes up, what is the right way to go about pricing these services? Constructive Cost Model? (http://en.wikipedia.org/wiki/COCOMO) Probably not. Simple menu of services with some attention to psychology? (http://bit.ly/NLo3V) That’s better because it is more easily understood by the client, but it is not always easy to do on our end.

In fact, when doing unique service projects, you might say that with a fixed price, someone always loses. (http://bit.ly/9E0bbP) Either the vendor pads the cost to cover any surprises, and he wins, or the vendor fails to anticipate (and build in money to cover) the surprises, and he loses. The only thing for certain is that those surprises will come up, and someone will have to pay for them.

The next option is straight hourly work. This should be great for the vendor, but can lead to problems of its own in terms of project and cost management. When vendors are working on a straight hourly arrangement, they have less incentive to plan. While the idea of paying the vendor for his time is fair and honest, hourly projects (that lack planning) can end up costing more than the customer originally planned, and the projects can look expensive in hindsight. When the project is complete, lacking adequate planning, the tendency is to look back and say “All they wanted was X and it cost them Y!?” The problem is that the curvy, flexible path made possible by the hourly arrangement is overlooked in that simple analysis. By the way, this happens all the time with contractors, attorneys, and everyone else who offers services for an hourly rate; it’s not just software developers.

So this brings me to my method of choice for pricing projects: fixed team project planning and pricing. This approach can allow for the best of both worlds. In practice this ends up looking a lot like phased pricing, except that the cost does not vary month to month (except by mutual agreement). Rather, the dedicated team comes at a predictable expense and works off of a well formed project plan. (The creation of the plan is paid work as well, and can be more or less detailed depending on the size of the project and the client’s preference.) Then, the flexibility that real life requires comes in the form of more or less work being completed in each month (or phase).

So we can say, “We have a list of 10 items. We can be very confident that we will complete 5 of them, somewhat confident that we will complete 7 of them, and only slightly confident that we will complete all 10 of them.” At the end of each month, we reassess our plan and make adjustments based team velocity and client priority, leveraging the things we have learned while working on the implementation.

In conclusion: we do a lot of deals each year, and our approach to pricing varies a bit job to job. But whenever possible, we like this fixed team approach. It gives the client and provider both a fair deal, and encourages all parties to plan responsibly. We encourage you to try it out; if you would like us to help you with your enterprise e-commerce project using our fixed team approach, give us a call today!

Mike Bates is CEO at HotWax Media and will join other HotWax Media employees and advisors in periodically posting thoughts here related to OFBiz, eCommerce, ERP, and related topics.
Mike Bates - OFBiz Expert

Enterprise E-Commerce and ERP: Common Questions Series Part 2

Thursday, April 8th, 2010

enterprise-ecommerce

For HotWax Media an Apache OFBiz development firm, 2010 is delivering a great batch of new open source e-commerce and ERP projects. Whether from existing clients looking to invest in system enhancements or new clients ready to invest after a cautious 2009, HotWax Media is seeing a good deal of activity in the form of active projects and a healthy sales pipeline.

Along with a boost in free cash flow, this activity continues to generate great input from clients, which fits in nicely with my ongoing series discussing common questions related to open source e-commerce and ERP projects.

Enterprise eCommerce and ERP projects can have a lot of moving pieces. As businesses grow, old systems can limit potential. It can be painful for businesses to identify these limitations and understand the impact they are having on current profitability and future growth. At HotWax Media, it is our mission help our clients understand these problems, and then to make the problems go away.

Let’s dive into the next round of common questions and talk about answers. The answers here are meant to be relatively short and sweet. If you are looking for additional detail or are more interested in learning how HotWax Media can help you optimize your e-commerce and ERP for your business, contact us without delay!

The first questions pertains to both existing and new businesses who want to take a measured approach:

1. Can we do this in phases?

Yes. HotWax Media implements e-commerce and ERP systems using Apache OFBiz. OFBiz consists of a complete set of individual ERP applications, including a robust e-commerce system. The data model in OFBiz, furthermore, allows HotWax Media to account for just about anything that is going on in a given legacy system, and integrate where needed in order to facilitate a phased approach.

For example, if your business is running on NetSuite, but you want a better e-commerce solution, phase 1 of your project can consist of an affordable, powerful B2C e-commerce site upgrade that is completely integrated with your NetSuite back end. In subsequent phases, you can replace NetSuite completely — at your own pace, in discrete, manageable steps.

The second question usually comes from clients who have been burned in the past by irresponsible promises from proprietary software vendors:

2. Can we customize the system (without blowing our budget)?

Yes. As I mentioned above, HotWax Media implements ERP systems using Apache OFBiz. OFBiz is meant to be customized. As part of a standard OFBiz ERP implementation, HotWax Media works with clients to understand the nuances of their business requirements and workflows, and then implements a system that accommodates those specific needs.

It amazes me to hear from clients, as I have repeatedly, that they paid for an expensive proprietary ERP system only to learn later that it could not do what they needed it to do. And by the way, they do not own the system, and they are on the hook to pay recurring licensing fees in order to keep using it. Never mind the principle of it all — strategically, that sucks.

The nature of open source software in general, and of Apache OFBiz specifically, is to be transparent and customizable. My general statement to clients is, “If we can define a consistent set of requirements together, we can absolutely make OFBiz meet those requirements.”

The final question applies to everyone:

3. How many different companies will we need to work with in order to implement our system?

One. HotWax Media. We offer a complete set of e-commerce and ERP implementation services, ranging from business analysis through graphic design and UI to development and testing. We provide the project management and collaboration tools to accommodate all aspects of the project, and we will even handle hardware, infrastructure and hosting in partnership with our colleagues at Contegix.

Keeping your project under one roof improves quality and saves money. It’s that simple.

Feel free to let us know if you have other common questions you would like to see addressed in this series, or contact us today to learn more about how HotWax Media can help you build and grow your e-commerce business.

View my previous post where I covered other commonly asked questioned about Enterprise E-Commerce and ERP deployment or expansion.

- Mike

Mike Bates is CEO at HotWax Media and will join other HotWax Media employees and advisors in periodically posting thoughts here related to OFBiz, eCommerce, ERP, and related topics.
OFBiz Expert

The HotWax Media Way: An Apache “OFBiz Service Provider” Partnering with Contegix for Beyond Managed Hosting and Infrastructure Support

Tuesday, March 30th, 2010

Today we’ll be digging in a bit more deeply on the topic of Contegix’s role in simplifying our business and making hosting and infrastructure first class. As I mentioned in my previous post, the relationship between HotWax and Contegix (www.contegix.com) was forged while we researched migrating our clients’ custom Java applications from a dedicated host (your own server – but you manage the system administration) to a managed hosting provider (this is what Contegix provides for us).

ofbiz service providersmanaged hosting contegix

As Apache OFBiz developers, the opportunity to offload some of the administration and monitoring of these applications seemed like a great option for a small company trying to service more and more customers – while maintaining an emphasis on quality of service. After all, at our core we are OFBiz Service Providers as opposed to infrastructure providers. So finding the best infrastructure experts and partnering with them gives us the best of both worlds — we focus on OFBiz applications, Contegix focuses on infrastructure, and our shared clients win!

The topics that differentiate Contegix from other providers are exactly what made this such an easy decision for us: passionate customer service, expert engineers, instantaneous response time, 24×7 support, 100% Network uptime SLA, attention to detail, etc. After the successful migration of our customers, we carefully looked at each of our applications to see where we could increase our ROI by utilizing more of Contegix’s resources instead of growing these system administration capabilities in house.

Over the past few years, HotWax Media has grown considerably and we have leaned heavily on our relationship with Contegix to help define how all of these disparate applications will work together. We have modeled our application choices based upon how they run their business – knowing that leveraging our partners proven workflows can only provide a greater synergy between our two companies and make us an even more efficient team. These days they manage everything from mail, chat and calendars (with the Zimbra groupware platform) to our global phone system, from single sign on (for all of our applications) to our business to business VPNs, from project management and collaboration software, to staging servers and a large number of production OFBiz installations. They scale with us and we look forward to finding new and creative ways to work together to provide the highest quality service possible.

The next post in this series will focus on the specifics of OFBiz deployment management with a continued emphasis on our partnership with Contegix.

- Tim

Tim Ruppert is Chief Operating Officer at HotWax Media as well as an OFBiz project committer and active community member. Tim will join other HotWax Media employees and advisors in periodically posting thoughts here related to OFBiz, eCommerce, ERP, and related topics.

OFBiz Tutorial – Using CMS for Front End Application Static Pages – Part-1‏

Wednesday, March 17th, 2010

In this post we will demonstrate OFBiz Content Management System usage for front end application static pages through simple content data setup and using it in a screen. This gives clients the flexibility to change the text to be shown on a static page when ever they want, without asking for any code change.

Take the example of an OFBiz e-commerce storefront web site.  Often times, clients will wish to include “static” pages like About Us, FAQ, and so on.  We want to empower the client to update this copy him/herself, without needing to request help from a programmer.  The following example gives us a simple look at how that is done.

All the details given here are supported by the out-of-the-box (OOTB) OFBiz CMS implementation.

In this exercise we will:

  • see the basic concept of DataResource and Content record.
  • setup content data to embed FTL markup.
  • setup a content driven screen and use it show the static content setup in data.

• Assumption: a component is already setup; here we using the name “cmsdemo” for component.

DataResource and Content records

Let’s suppose that we want to define content (that we will include in a screen) for the text “This is the text that will appear on screen.”.

Data Resource of type ELECTRONIC_TEXT

First of all we have to define a DataResource representing this text. This gives you greater flexibility because you can store long texts in the textData field. If you want to embed FTL markup (directives etc…) that needs to be processed before the rendering you can achieve this using the dataTemplateTypeId attribute, in this way all the Freemarker instructions in the text will be executed before rendering the screen. Following data needs to be setup in a data file:

?View Code LANGUAGE
1
2
3
4
5
6
7
8
</p>
<DataResource dataResourceId="DS_EXAMPLE" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
<ElectronicText dataResourceId="DS_EXAMPLE">
<textData><![CDATA[
<h1>CMS DEMO</h1>
<h2>This is the text that will appear on screen.</h2>
]]></textData>
</ElectronicText>
Content

Now we have to create a Content record that is associated to the DataResource. 
No matter what type of data resource you have choosen, the Content record is the same like:

?View Code LANGUAGE
1
<Content contentId="CN_EXAMPLE" contentTypeId="DOCUMENT" contentName="Content 01" dataResourceId="DS_EXAMPLE"/>

Using the element in a screen definition.

Now we can easily include the content directly inside the section of the screen definition with the following directive:

?View Code LANGUAGE
1
2
3
4
5
6
7
8
9
<screen name="main">
<section>
<actions>
</actions>
<widgets>
<content content-id="CN_EXAMPLE"/>
</widgets>
</section>
</screen>

Running the content driven screen

Load data created for static content

Make sure to have an entry in ofbiz-component file for the data file created for CMS date that we created earlier in the step.

?View Code LANGUAGE
1
<entity-resource type="data" reader-name="demo" loader="main" location="data/CmsDemoDemoData.xml"/>

or you can also load it through webtools \–> XML Data Import.

Now make sure you have main request and view defined in your controller file:

?View Code LANGUAGE
1
2
<request-map uri="main"><security https="false" auth="false"/><response name="success" type="view" value="main"/></request-map>
<view-map name="main" type="screen" page="component://cmsdemo/widget/CmsDemoScreens.xml#main"/>

When the request [https://localhost:8443/cmsdemo/control/main] is served you will see the following page that will show up the contents that you have setup in data:

ofbiz cms content management

This was a very basic example of OFBiz CMS capability.  We will expand on the details and demonstrate more OFBiz CMS functionality in upcoming posts.  If you need help with OFBiz CMS in the mean time, contact HotWax Media today!

- Pranay

Pranay Pandey is Manager, Enterprise Software Development at HotWax Media (OFBiz Service Provider) and has been involved with the OFBiz project since 2007. He contributes actively to OFBiz, and also trains HotWax Media developers in OFBiz techniques and best practices.