The provisions of this chapter shall not be applicable to any sale of goods, wares, or merchandise pursuant to any court order or direction nor to the sale of any goods, wares, or merchandise by any sheriff or other public official in the course of his or her official duties.