A cooler and freezer access control system locks a cooler or freezer when occurrence of an event is detected that requires limiting access to the inside of the cooler or freezer. Examples of such events include the loss of power to the cooler or freezer for a predetermined period of time, the opening of the cooler or freezer door for longer than an allowed time, the loss of functionality of a temperature probe and others. In an embodiment, a service mode is supported wherein the door is left unlocked despite the occurrence of such an event, to allow a stocker or other personnel to leave the cooler or freezer door open while stocking the cooler or freezer with product.