in DotA it seems that the recipe is a powerup (it disappears as soon as it's picked, such as tomes). Then if the recipe is already fulfilled, the result-item is given to the hero, or else the recipe-item is created.
you can use the order "smart" when the hero is issued an order targeting an object (it's like "pick up item" order). But there's no order when you buy an item.