The original 1971 film Willy Wonka and the Chocolate Factory was devised as a promotional tool for a new candy bar from Quaker Oats. Unfortunately the candy bar had to be recalled soon after it’s release because of formulation problems that caused the chocolate bar to melt. In fact, the title of the film was changed from Charlie, to Wonka to include the name of the candy bar.
source: DVD special features – Pure Imagination documentary