As our websites get more complex, our need for pricing rules grew as well. Simply displaying the price wouldn't cut it, as some manufacturers enforce a MAP - minimum advertised price. For some products, we do not display any price, only to call to purchase. And some brands need to be excluded from sales.
And some of these settings change depending on other settings. For example, we don't want to display "Call for Pricing" when there is nobody manning the phones.
Rather than changing these settings on a product by product basis, I built a system that applies rules based on brand and department. The appropriate rule is selected when the product is displayed, and the price is calculated in real-time off of the product list price.
Sounds good, but there was a problem. When exporting our entire product line for the Froogle feed, the rule selection was causing the script to run for way too long. Rule selection involves knowing the brand and department tree (e.g. bath » faucets » single hole,) then selecting the most specific rule.
I needed a way to retrieve the appropriate rule in the original database query result, not looking up the rules product by product. So I do something I dislike doing, I save the key of the appropriate rule on the product record. Why do I dislike doing that? Saving that key on the product record makes it difficult to debug when something goes wrong. You have no when of knowing when that key was saved, or why. Selecting the appropriate rule in real-time makes it much easier to fix problems with prices, as you can know exactly which rule was selected, why the system selected it, and what effect it had.
Item of the Day: Minimal Floor Mount Tub Filler 0475 - Bath Tub Filler by Lacava Design
A better post --- how do you generate all that business? Seo efforts? Or word of mouth.. I'd rather read about that.
So, let our curious minds know.
Posted by: Interested | January 17, 2008 at 02:18 PM