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

Oh, sure. Sorry didn't noticed it.