Office-supply retailer Staples Inc. has agreed to a $42 million settlement of a class action alleging it failed to pay overtime to 5,500 assistant managers.

The agreement, approved Tuesday by U.S. District Judge Katharine Sweeney Hayden in Newark, calls for back pay and statutory damages for managers classified as overtime-exempt even though most of their work hours were spent on unloading trucks, stocking shelves and running cash registers.