Parking motorbikes

It seems like sometimes it's ok to park on the sidewalk to go into a store or street stand...other times it's not. For example, if I want to buy a few things at an open market where can I park the bike?

Usually there is a place where you see lot of motorcycles.. try there.
Every market is slightly different, so unless people know what market you refer, they can't help you much :)

Generally it's okey to park front of the shop always, but do park it close to the building.

It depends,if there is a white line(the People's committee loves a white line) then you must not park outside of this. Also don't park out the front of the adjacent building,Vietnamese seem to think the street is owned by them in front of their properties.

One thing you can do is look for a sign that says, "giữ xe" which means parking. Most if not all markets or supermarkets have parking. If you aren't sure ask anybody by saying "you sayah uh dow" which is the best I can do at a phoenetic guess. Maybe some other expats have something else but my you sayah always works.