Been to Marrakech three times, last time in February and I love the place.
I'm not sure why some people get hassled as I haven't experienced that - maybe because I just say no if I'm not interested? As to being ripped off, well if you want to haggle over the equivalent of 50p, that's up to you...... I had a genuine pair of Italian made Oakleys for all of £4!! (Not the Chinese made ones, I was assured).
The locals can be very friendly and they loved my two kids - maybe that's why we had a good feeling about the place this time, but I've been there without kids before and enjoyed it.
They do prefer visitors to try and speak some Arabic rather than French - just good manners to say Shoukran rather than Merci I suppose.
As mentioned above the Majorelle Gardens are beautiful. The main square and markets are a must. Off hand I can't remember where else we went, but the main town is good for just wandering.
Eat where the locals eat but make sure that you don't eat anything that's been in contact with water - fresh fruit, salad, etc. I'd say that absolutely anything you eat needs to be hot and well cooked otherwise you'll come down with the worst stomach bug you've ever had. Out of 11 of us on an Exodus holiday 10 years ago, I was the only one unaffected and only because I'd been before. Coffee, soft drinks etc are surprisingly expensive there.