it seems to me that this is not a duplicate. the first sentence says either "where will you buy it?" or "where do i buy it?". the second sentence doesn't seem to make any sense. but the verb is in the past tense so it would be rendered as "it's that where did i buy it?". but as a nonnative speaker maybe I'm missing something. nevertheless i think the question should be opened for someone to answer why these two sentences don't say the same thing and what if anything the second sentence says.
– A.EllettJul 24 '16 at 22:04
@A.Ellett The first is as you say "Where can it be bought?" / "Where can you buy it?" etc. The second makes perfect sense but is slightly more colloquial. As you guessed it means "Where did you buy it?". 買った+ ん is a slightly more colloquial way of saying 買った.
– The Wandering CoderJul 28 '16 at 02:05
@TheWanderingCoder Thank you. I wanted to translate the first with "can", but since it didn't say かえます, I wasn't sure. Sometimes I'm not sure whether "can" in English is just our sloppy way of speaking or not.
– A.EllettJul 28 '16 at 02:36