商量and 讨论both have meaning of talk over/ discuss/consult
but "商量"is more use when you talk with your friends ,s"商量"means you exchange viewpoint and opinion,when you buy things you ask for price ,you can say "商量价钱" which means bargain.
“讨论” sometimes is more formal.you can use it in similar way as "商量"when you discuss with your friends.but when you discuss in class or some meetings ,you should say "讨论""讨论"is also means debate.
and i think the most difference of them is when you say "商量" you want to have a same purpose or outcome.when you say “讨论”,you may more lay stress on the "discuss and difference"
all these are my own view,but i hope it can help you .