This idea originially came from a Wizards of the Coast message board thread on controlling players who grab everything they find and sell it
The first thing to do was to enforce various rules. The biggest was encumbrance. Ensure that the weight of all the weapons, armor, and other looted gear is added to what the characters are carrying. This will slow down the party and hinder it's combat effectiveness.
In addition to making the party slower, enforce the food and travel rules. The party will be moving slower and thus spending more time traveling. This means more food to be bought and carried. This also will mean more random dungeon and wilderness encounters.
Ensure that the rules on weapon damage are looked at. Weapons break or are damaged. This will reduce the value of anything the party brings back. If appropiate, make some of the weapons Unholy or similar. Also, pay attention to the size of weapons that the monsters use. Some sizes of weapons or armor, and some types of weapons will not be saleable in a human or human-friendly settlement.
Once the party gets back to civilization do not offer full price. Merchants will have to fix stuff that is used. They will probably only buy a certain amount of stuff, so keep in mind the gold piece limits for the size of the settlement.
On a more role-playing or political note there are laws to consider. The local baron may not allow weapons or armor to be sold to peasants or to anybody but himself. The local smith could refuse to buy and tell them about the law. The smith could postpone the deal to setup the party for a reward. Or the smith might be very secretive in order to get weapons for a rebellion.
Once the party goes to see the baron, all sorts of things can happen. The baron will probably invite them to dinner which means the party has to buy decent clothing or risk the barons' wrateh. The party will be noticed with all their wealth and have to pay taxes on what they are carrying. If the loot came from the baron's land, he might take 90% of it, instead of 25% as taxes.
The alternative to the local village & baron would be to travel to a larger town. Again, gate taxes, but also travel time, expense and random encounters.