John Swinney has faced a furious backlash from retailers over his plan to impose price caps on certain items - while opponents branded the policy a "political stunt".