E-com DevBlog Spider-ball-vacuum

21Jan/090

Insomnia, and other bits of madness (introducing the NT Wallpaper Pack)

Last night didn't quite go as planned. Planned was me sleeping and enjoying a full nights rest, last night however I was overtaken by a whim and couldn't sleep until I finished. That whim is what brings this post here today, now for a limited time I am releasing my first ever NT Wallpaper Pack! This is the combined works of the NT-pixel Logo (which is old work that other people on here may recognize), and the insomniatic NT4LIFE series. So come one, come all, and beautify your background with some NT goodness (wallpapers are at 1280x1024 resolution.. which is what I have at work...).

download is in 7Zip format, if you don't know what 7Zip is, go to sourceforge and find out.

NT Wallpaper Pack (Pixel and NT4LIFE series)

Print This Post Print This Post
25Feb/080

Changing payment prices when lower than $25

On some sites, namely NordicTrack and Weider it is quite simple to change a payment price to lower than the minimum ($25) if that product already has a payment price lower than $25.

All you need to do is find the product in accelerator and go to the descriptive attributes, under the ICON tab look for the attribute with the "H" under "type" and then you can change the price in the Details tab.

Now if you have to add this ability to a product in either of the aforementioned sites it's not as simple as adding a descriptive attribute. It has something to do with modifying tables and changing helpcard logic, a lot of pish-posh that I don't currently have access to. But I leave this post simply because I wasted roughly 30 min. looking for a place to change the price in a properties table when it was in accelerator, and as frequently as I do it I'll likely forget by Tomorrow.

Edit: Actually the above paragraph is not true cuz I just logged into one of the sites and added some "H" attributes to a few products and it worked like a dream. So that Pish Posh above is just a bunch of Hocus Pocus someone fed me.

Print This Post Print This Post
15Feb/080

Ninja-Script — When all else fails

When all else fails, what do you do? You call a ninja, and when he shows up he gives you a piece of code, or knowledge. Now this knowledge came in the form of a scriptlet which I know we frown upon, but here it is, because it runs back and finds the parent category, and if it is there then we use the logic to place a change in the sidenav of NordicTrack.


<%@ include file="CatalogUtilities.jspf" %>

<%
try {

Integer storeIdInt = Integer.valueOf((String)pageContext.getAttribute("storeId"));
Long catalogId = Long.valueOf((String)pageContext.getAttribute("catalogId"));
java.util.LinkedList list = null;
String categoryId = (String)pageContext.getAttribute("categoryId");
if(categoryId != null && !categoryId.equals("")){
list = (java.util.LinkedList)getCatGrpHierarchyByCatalogIdAndCatGrpId(request, response, storeIdInt, catalogId, categoryId);
} else {
Long catEntryId = Long.valueOf((String)pageContext.getAttribute("productId"));
list = (java.util.LinkedList)getCatGrpHierarchyByCatalogIdAndCatEntryId(request, response, storeIdInt, catalogId, catEntryId);
}
pageContext.setAttribute("rootCategory", list.getFirst());
} catch (Exception e) {
e.printStackTrace();
}
%>

What this all did for us was allow us to see the actual root parent of the catalog.  So by finding that out we can then be as deep into the catalog as we want and still be able to write code that modifies something on the page based on if you are even in that category.  What we ended up doing was checking the root parent to find out if the CachedSideBar.jsp needed to be modified when displayed to customers.  It's all checked into CVS, so pull it down and take a look if you'd like.

Print This Post Print This Post