Wash rice thoroughly in several changes of water and soak for at least 30 minutes.
Meanwhile, heat butter over medium heat in a large skillet. Add shallots and onions and sauté for 3-4 minutes or until they turn translucent and start to soften. Add the garlic, ground turmeric, sumac powder, cranberries and salt and mix well. Allow the cranberries to cook for a minute or two, then add the sugar and 3-4 tablespoons of water. Mix. Continue to cook the cranberries over medium heat until they have soaked up all the liquid, approximately 2-3 minutes. Turn off heat and set aside.
Fill a large pot with water and bring to a boil. Add the rice and cook over medium heat for approximately 6 minutes, or until rice is soft, but firm (you can test it by squishing a grain between your fingers). Drain the rice and rinse under cold water to stop cooking. Drain again.
Pour a tablespoon of olive oil into the base of the pot and add the rice. Pour the saffron water evenly over the rice. Top with the onion/cranberry mixture and wrap the lid of the pot with a thin kitchen towel and cover the pot.Turn the heat on high and cook for approximately 3-4 minutes, then turn the heat as low as it will go and continue to cook for an additional 10 minutes.
Remove from heat, mix and stir in the pistachios. Add additional salt to taste. Serve warm.