In my opinion, as a former dreamweaver user, I would worry about all of the visual stuff in dreamweaver, then use a text editor for the PHP.
Cause like you said, if you don't format it right Dreamweaver junks it.
After enough of that, you'll junk Dreamweaver and come to the dar...light-side.
Also, you might want to check out http://www.cubecart.com for a shopping cart. They just came out with v3, but in my opinion it sucks and is hard to edit. I would just stick with v2 and mod it the way you need. It's rather easy.
Look at thier demo, then check out http://www.135bpm.com