Aurora: Product Price Display uncovered

I recently enhanced the new Aurora starter store in WebSphere Commerce to show the percent savings the customer gets between the list price and the offer price. The price may be configured to give a discount to the customer directly based on segmentation or contract, or the price may just be different across the entire site. Either way, this modification works in both cases. Today I am going to walk you through how I made those changes and show how easy it is to enhance the store. Here is the original screen shot of a product page in Aurora:

When I change the price display files the new user interface will now show the percent savings. Here is a snapshot of the new product page:

The price is also reflected in other places like the product compare:

Aurora was pretty much rebuilt to be very flexible. The store code is modular and the data, business logic and user interface is separated out into several JSP’s. The price display function is built in this manner. If you are working in the developer version of the store the files should be under a directory similar to the following path:

StoresWebContentAuroraWidgetsPriceDisplay

The three files in question are:

  • PriceDisplay.jsp
  • PriceDisplay_Data.jsp
  • PriceDisplay_UI.jsp

I actually only had to modify PriceDisplay_UI and PriceDislay_Data to accomplish this enhancement. The first thing I did was work in the Data file and added the following variable:

<c:set var="percentString" value=""/>

Then down below after we calculate the displayPrice and offerPrice I added this block of code to test if the two prices were set, if one of them weren’t set then we should not show a discount:

<c:if test="${!empty offerPrice}">
 <c:if test="${!empty displayPrice}">
   <c:set var="percentString">
      <fmt:formatNumber value="${1-(offerPrice/displayPrice)}" type="percent" maxFractionDigits="0"/>
    </c:set>

   <c:set var="percentString" value="${percentString} Savings!"/>
 </c:if>
</c:if>

Then in PriceDisplay_UI.jsp I add this to the bottom:

<span id="percentPrice_${catalogEntryID}" class="price" itemprop="price">
    <c:out value="${percentString}" escapeXml="false"/>
</span>

You can change the look and feel or even the position of the savings all you want. That would require some CSS changes or the place in the UI file where the price is shown. I used the same “price” class as the offer price for consistency, but I can see for instance the savings being in italics.

 

 

Advertisements

Planet Lotus click counts versus WordPress stats and YouTube views?

For the most part the hit counts on PlanetLotus mirror what my statistics say for my posts. There are however three that seem to be a little off. Check out the stats from my WordPress statistics and the click counts from PlanetLotus on these three posts:

My stats:

Content Management Part 2 – scheduling advertisements 29
WebSphere Commerce developer tutorials on InfoCenter 255
Searchandizing with WebSphere Commerce 103

PlanetLotus stats:

Another interesting point is the Searchandizing with WebSphere Commerce post is also a YouTube video and that has 372 views, almost three times the number of hits as my blog but nowhere close to the PlanetLotus click count.

WebSphere Commerce Feature Pack 5 is available!

This isn’t “fresh” news, the feature pack has been available for a week or two, I have just been swamped with vacation and work to write about it. There are a lot of great enhancements to WebSphere Commerce in this feature pack, most of which came directly from customer demand so kudos to the lab for executing on these! I highlight some of my favorite ones here.

Aurora Starter Store

Completely redesigned starter store to be more up to date with today’s look and feel. The new store is very fresh looking and will be a great demonstration and starter asset going forward. Aurora has a very nice look and feel and demonstrates the many new features in this feature pack.

 

Page Layout Tool

One of my favorite new features is the Page Layout Tool. As a Marketing Manager, Product Manager, Category Manager, or Sales Manager you can use the Page Layout tool in Management Center to manage layouts for your store pages. — link here.

 

Promotion Enhancements

A really great feature for retail store fronts is the new price promotions around fixed pricing. This in my opinion has been a gap in the out of the box promotions – many times customers just extend the product to do this, now it comes for free!

Fixed price on the subtotal of catalog entries
Fixed price on individual catalog entries
Fixed price on the subtotal of catalog entries from a category
Fixed price on individual catalog entries from a category
Buy A (and B and C), get a percentage off Y
Buy A (and B and C), get an amount off Y 

Bazaarvoice integration

Even though we have supported this integration in the past, this new feature pack has a much tighter integration with in Aurora – meaning much less partner and services in order to get social onto your site. More information can be found here:

  • Ratings summaries at the top of product pages and item pages.
  • Listings of ratings and reviews in a “Customer Reviews” tab at the bottom of product pages and item pages.
  • Review and comment creation through the Bazaarvoice review submission container with support for multiple authentication methods.
  • Data feed upload to Bazaarvoice.
  • Basic SEO support for ratings and reviews.