Because you are only dealing with an odor problem and the fabric / foam is satisfactory, I would definitely try to clean them before replacing. I cleaned mine a couple of years ago with good results. Remove the fabric from the foam inserts. If the fabric is Sunbrella, you can machine wash with cold water using 8 ounces bleach and a mild detergeant on gentle cycle. I would make sure that the washer is filled with water/bleach/detergent, before placing the fabric in the washer, to prevent concentrated bleach from contacting the material. You can also do this in a bath tub. To clean the foam, use 4 ounces of bleach and 2 ounces of detergent per gallon of water. Soak the foam for 15 to 20 minutes, rinse, dry as much as possible outdoors and then bring inside in climate controlled area for final drying. It would be a good idea to replace the fabric coverings on the foam before the fabric completely dries to prevent shrinkage and excess wrinkles. The idea is to get rid of mildew, dirt, sweat, and salt from the foam and fabric. Finally, after the foam & fabric are completely dry, spray a coating of 303 fabric guard on the fabric covering after it is reinstalled on the foam cushion. (for sunbrella fabrics). I think that you will be pleased with the results.
Needless to say, I only cleaned my salon cushions because the coverings were soiled and somewhat oderous. We hated the lime green fabric and wanted to replace them as soon as practical. The cost to replace five salon cushions was about $1500. We selected an expensive fabric that resists fluid penetration and is supposedly used on furniture on cruise ships. The foam and backings were only 5 years old and we reused those components. We replaced the fabric covering and zippers only. Labor costs were about $1100. and material costs were about $500. You definitely want to check a few sources for price & quality.