Candy bars and sodas have long been a familiar sight at grocery store checkouts. Shoppers may not have planned to buy them, but after standing next to them in line, some end up in the cart anyway.

Berkeley, California, decided to change that setup. In 2021, the city became the first in the world to require larger stores to keep sugary drinks, candy and certain other products out of checkout displays. A new study suggests the policy may have changed some of what shoppers bought, although the results were far from uniform.

The study, published in The Lancet Public Health, compared sales in Berkeley with sales in Davis, Oakland and Sacramento from 2019 through 2023. Researchers used sales records from 71 chain stores, including 11 in Berkeley, to see what changed after the checkout rule took effect and later became enforceable. This type of study can show patterns associated with a policy, but it cannot prove the policy alone caused them.

Berkeley’s rule does not ban soda or candy. Stores can still sell those products elsewhere. Instead, it changes what shoppers see near the register.

Foods and drinks allowed at checkout can include unsweetened beverages and certain fruits, vegetables, nuts, seeds, yogurt, cheese and other foods that meet the city’s nutrition standards.

That makes the policy an interesting test of a simple idea: Does changing what people see at the last moment before they pay change what they buy?

It’s a question other researchers have explored from the opposite direction. Previous Science of Eating coverage found that putting fruits and vegetables near the front of grocery stores was linked to higher produce purchases.

In Berkeley, earlier research had already shown that checkout displays changed after the policy took effect. The new study looked at whether sales changed, too.

Soda sales showed one of the biggest shifts.

After the rule became enforceable, soda sales in Berkeley were estimated to be about 39.5% lower than researchers would have expected based on sales trends in the other cities. Supermarkets showed especially large declines.

But there is an important catch.

Most of the estimated drop came from larger packages of soda, rather than the smaller bottles and cans shoppers would be most likely to grab at checkout. The researchers said that makes it difficult to say the checkout displays themselves were responsible for the full decline.

Stores may have made other changes while putting the policy into place. Shoppers may also have changed what they bought elsewhere in the store. The sales records could not show exactly where a product was picked up.

Candy produced a different pattern.

Overall candy sales did not fall after the policy became enforceable. But sales of smaller packages of candy in supermarkets dropped by about 43% compared with trends in the other cities. Those smaller packages are much more typical of checkout displays.

That finding fits more closely with what the checkout rule was designed to do.

Still, it does not necessarily mean shoppers ate less candy. Someone who no longer picks up a candy bar at the register might buy a larger package from another aisle instead. Stores could also move candy to other prominent spots, such as aisle displays.

The study could not tell whether either happened.

Sales of nuts and seeds also rose after the policy was introduced. Those foods are among the options stores can place at checkout under Berkeley’s rules. But the researchers could not determine whether shoppers were actually replacing candy with nuts, so the finding should not be interpreted as a simple swap from one to the other.

Another clue came from differences between stores.

Supermarkets showed some of the clearest changes in soda and small candy sales. Earlier inspections had found that supermarkets were also among the stores doing a better job of following the checkout rules.

Drugstores, where compliance had been much lower, did not show the same declines.

That suggests having a policy may not be enough. How consistently stores follow it could make a difference.

The results also add to a growing body of research showing that the environment around a food choice can matter.

Other policies have produced mixed results. For example, previous Science of Eating coverage found that sugary drink taxes did not meaningfully change what customers ordered at some fast-food restaurants.

Taken together, studies like these suggest that changing one part of the food environment can influence some choices, but it does not necessarily change everything people buy.

There are also limits to what the Berkeley study can tell us. Researchers had sales data from only 11 Berkeley stores, and independent retailers were not included. They could see what stores sold, but not who bought the products, where shoppers picked them up or whether people simply went somewhere else to buy them.

The study also measured purchases, not what people actually ate or drank.

So the findings do not show that Berkeley residents consumed less sugar or became healthier because of the checkout rule.

What they do suggest is that something as ordinary as what sits beside the cash register may help shape what ends up in a shopper’s cart. Changing that environment appears capable of changing some purchases, particularly when stores actually follow the rules, but a checkout lane is only one small part of a much larger grocery store.

The study was supported by the National Institute of Diabetes and Digestive and Kidney Diseases, part of the National Institutes of Health, and Bloomberg Philanthropies’ Food Policy Program.