A dog that's been kept in a pet store cage for 8 months is going to be very hard to potty train. Consistency is the best thing, lots of praise when he does what you want, no punishment when he doesn't.
When you're outside with him give him lots of time to sniff and go potty. Repeat your command word, I use "potty" and when he does go (and he will eventually) lots of praise. Act like he just wrote a sonnet, lots of "good boy" and a treat.
When he goes in the house take him outside immediately. Do not put his nose in it, do not yell, just calmly pick him up, put him outside and repeat your command word. You can also take the poo and place it outside, letting him know that that's where you want him to go.
I would also suggest a pet odor remover for the spots that he goes in your house. If the scent is still there then it will be harder to train him. He's marked that area which is why he continues to go there.
This is going to take time and lots of patience. He's been pooing in his cage for 8 months. That's what he thinks is the right thing to do, because he was never taught differently.
I can never condone buying a pet store dog, but I do understand why you did it. It's often hard to walk away. Sadly, the majority of the dogs sold in pet stores come from puppymills, the others are from backyard breeders (which are just one small step above puppymills). By purchasing from a pet store you are in fact keeping those places afloat. As long as there are people willing to purchase from pet stores, there will be puppymills mass producing the product for those stores.
Please make sure to get a complete physical done on this puppy.
Good luck.