I love shopping carts

I spent my whole work day on Wednesday banging my head against the wall. Which, unfortunately, is brick, so it really hurts.

Brick Wall

We have several customers who are using customized versions of AbleCommerce to run eCommerce on their web sites. It is, to quote from AbleCommerce's home page, "the industry standard for customizable and scalable shopping cart solutions." And really, this ASP.NET software is much better than anything I could write in a short time on my own – which is why we developers buy such things. But… argh. Trying to customize some of this code beyond the basics (i.e. "I Accept Mastercard") might push me the very short distance it would take to send me over the edge. If you know what I mean (and I think you do).

If you have ever customized a shopping cart system, you know that you can play with the layouts. In AbleCommerce, there's a simple interface for adding sidebars, removing footers, changing colors, etc. This is a great idea, and I love the fact that it makes design easy for even novices! But if you have the misfortune of editing the search page and removing the default sidebar (which simply offers an innocuous drill-down feature)… the search feature suddenly breaks without warning. And here's the real kicker: can we determine why the search doesn't work any longer? No. I tried googling. I searched AbleCommerce's help forums. I did text comparisons between the new code and the old code, and the admin files, and the templates… I came up short all day long.

Finally, I discovered that removing this drill-down sidebar from the search page's layout actually breaks the search feature everywhere on the site, leading me to ponder these questions…

  • Why would AbleCommerce allow me to remove this seemingly unimportant control from a page, if it breaks an important feature like the search throughout the entire site?
  • Why is the functionality of one feature dependant on the parameters within another un-related control (the drill-down), instead of built into the actual control that depends upon them (the search results)?
  • Why didn't AbleCommerce bother to mention this dependency anywhere in their documentation?

On the bright side, I discovered that if I put that drill-down sidebar back into my layouts, all is well again. And after almost 2 days of banging my head against the bricks, I fixed 4 web sites in less than 1 hour.

For any of you dealing with this same issue (you don't want to see the sidebar, but you do want the search to work), here's how to fix it:

  1. Make sure that this scriptlet appears somewhere on your search page (I just added it directly to the search content page): [[ConLib:CategorySearchSidebar]]
  2. Hide all .NET controls in the front-end control ConLib/CategorySearchSidebar.ascx (set visible='false' but *do not delete them* or the project will not be happy with you)
  3. Do a search in the back-end control ConLib/CategorySearchSidebar.ascx.cs for anything that sets a control to be visible, and comment the line out