Replace hardcoded store ID = 1 with either input argument or detected default store ID.

Shall I update my pull request?