How-To: A Price in Every Store

I received an interesting inquiry today. Someone wrote to me asking how to best handle the scenario where every store has its own price on a per item basis. And the number of stores is 400 and growing.

The first way I could think of to do this that would not be obnoxiously unmaintainable is as follows:

  • Setup a new table that is independently created (and maintained) – consider making it a profile definition if you want to maintain the data using the Customer and Order Manager
  • Store the unique identifier of the product, the store, and the per store price in that table
  • Query it using the SetJoin() API when querying the catalog
  • Some custom pipeline lookup logic will need to be written as well

The second approach would be to use Virtual Catalogs, where each store has its own virtual catalog. This is easily done provided that the number of base catalogs is small. When issues are encountered is when you are looking to have too many base catalogs in a virtual catalog. Of course, materialization will always help performance as well.

Hope this helps!

Advertisements

April Fools: Where’s spring?


Silly Snow in Ottawa #7
Originally uploaded by rdonovan

One of the challenges of living in the Northeast is contending with snow. This winter has been a challenge for Ottawa, with a massive snowfall in mid-March. As of April 1st, several meters remain on the ground. It does not feel like spring.

It has been an interesting experience. For the most part, commuting has been very low-drama. The city has done a great job of keeping the streets clear. It has hampered their night-time efforts (such as trash collection) and impacted street parking.

Driving before the snowplows have come, however, is an adventure. I got to test the Land Rover’s hill descent control and boulder climbing mode – while traversing my unplowed street and the gigantic mountain accumulated at the intersection from the main road having been cleared.

See my photos at http://www.flickr.com/photos/rdonovan/sets/72157605140819202/. And CBC’s coverage at http://www.cbc.ca/canada/ottawa/story/2008/03/10/record-snowfall.html.

Hopefully it will melt soon!