Just run a standard traveling salesman algorithm, setting the distances between stores to infinity (meaning: to such a large number that no self-respecting traveling salesman algorithm would ever include an edge joining two stores) and likewise the distances between warehouses.