Coding Commerce: Extending the Price display widget for consumable products

Commerce systems are getting more and more advanced and specifically in the B2B space you are seeing more and more information about products on the product page or even in product listings. We see things like color swatches, likes, ratings, reviews, etc in the B2C world but in the B2B world its all about value. This little change to WebSphere Commerce (and I mean little, a few lines of JSP code) should spice up your site to show the value of your consumable products. Here is a picture of a somewhat normal looking product display search result. We will be enhancing this with the price per page based on the contract price of the customer:

Screen Shot 2014-12-11 at 5.12.26 PM

 

I present to you a pattern. A pattern you can use across all consumable products in your catalog. The pattern is generic and can be applied to any product simply by assigning an attribute. Let’s start with an example, a printer cartridge. Most printer cartridges, especially high-end business printers, come with a max number of page the cartridge should be good for, like 500, 1000, 10,000, or 20,000 pages. From a business perspective it would be good to know how much you are paying per page so a product listing like this might just do the trick:

Screen Shot 2014-12-11 at 2.18.15 PM

Continue reading

Searchandizing part 2 – Promoting a Category

In this demonstration I get some requirements from my marketing manager Mary to start a new sales category called “Sale” on the North American site. I create the category with a custom layout using Commerce Composer along with a promotion for 30% off all items in the new category. I then create a search rule to generally promote the items in that category for any search term.

 

Calling all Business Partners, Developers, Hackers, and Consultants alike!

So this week I got the opportunity to create my first widget for the new WebSphere Commerce Composer in feature pack 7. I have to give big kudos to the documentation team and the InfoCenter because I followed the five steps in this tutorial and after a couple of hours got it all up and running in my first attempt! I am not going to say what kind of widget I created to extend WebSphere Commerce but I will say its pretty cool and I am excited that I got past this first hurdle. The I could barely contain myself as I rebuilt the Management Center project and then launched the Commerce Composer to see if my widget was listed with all of the other widgets to be inserted into my page layout (and no, I am not showing my widget name in the screen shot, more on that on another day):

Widgets Panel

The instructions are very easy to follow if you have the development environment for FEP7 already up and running, however, the info center accounts for this if you don’t and shows you how to install things like JET.

Speaking of JET, while the emitter is not 100% with its output, it is pretty darn close, I would say about 99.9%!  Mainly because there is a file or two you have to merge into existing files. All of the source code for the widget was generated for me from this simple XML:

[codesyntax lang=”xml”]

<?xml version=”1.0″ encoding=”UTF-8″?>
<pageLayout vendor=”IBM” targetFolder=”src”>
<widget>
<widgetDef identifier=”BobsWidget” UIObjectName=”BobsWidgetObject” displayName=”Bobs Widget” description=”Bobs Widget” widgetDisplayGroups=”AnyPage,SearchPage”
widgetRestrictionGroups=”AnyPage,SearchPage” >
<property name=”channeldID” displayName=”Channel Id”/>
<property name=”maxNumberOfOffers” displayName=”Max Number of offers”/>
</widgetDef>
</widget>
</pageLayout>

[/codesyntax]

 

Once you run the XML through the JET emitter class specified in the instructions all of the code is generated for you. This also gives you an idea how the architecture of Management Center works and is a great primer just for that.

So in short, if you want an integration with the one of the largest ecommerce deployment packages in the world (ie. WebSphere Commerce) then get your widget created today!