A federal judge has certified a class-action lawsuit that accuses J C Penney Co Inc of marking up retail prices on apparel and accessories to trick shoppers into believing they were getting good deals when the items went on sale.

In a decision on Monday, U.S. District Judge Fernando Olguin in Los Angeles said it was possible “in one stroke” to determine whether J C Penney’s advertising practices caused shoppers in California to buy items at discounts that proved illusory.

The J C Penney complaint accused the retailer of running a “massive, years-long, pervasive campaign” to deceive shoppers about its pricing for private-label brands and outside brands, such as Liz Claiborne, sold exclusively by the retailer.

Lead plaintiff Cynthia Spann said she discovered this after buying three blouses for $17.99 each, a 40 percent discount from the “original” $30 price, only to learn the price was never above $17.99 in the prior three months.

By letting shoppers sue as a group, the decision could help them obtain greater compensation at lower cost from the Plano, Texas-based retailer than if they sued individually.

J C Penney did not immediately respond on Tuesday to requests for comment.

Similar lawsuits have been filed against retailers such as Kohls Corp and Men’s Wearhouse Inc’s Jos. A. Bank unit.

Olguin certified a class of plaintiffs who bought private-label or exclusive items from J C Penney in California from Nov. 5, 2010 to Jan. 31, 2012 at discounts of 30 percent or more.

The plaintiffs accused J C Penney of violating state consumer protection laws.

The Federal Trade Commission has said retailers are supposed to sell items at original prices for a “reasonable length of time” before marking them down, if they wish later to provide the original prices to consumers who compare prices.

J C Penney moved away from discounts in 2012, when Chief Executive Officer Ron Johnson adopted a strategy of “fair and square” everyday low pricing. It resumed discounting after sales plunged, resulting in Johnson’s ouster the following year.

Spann’s lawyer was not immediately available for comment.

The case is Spann v. J.C. Penney Corp et al, U.S. District Court, Central District of California, No. 12-00215. (Reporting by Jonathan Stempel in New York; Editing by Jeffrey Benkoe)