Wal-Mart Stores Inc. (NYSE:WMT) trimmed its earnings outlook for the year after another quarter of declining store traffic and flat sales in the U.S., indicating a continuing slump for the world’s biggest retailer.

The company said Thursday it expects earnings per share for the year to be about 20 to 30 cents less, at $4.90 to $5.15, down from $5.10 to $5.45, due to investments in its e-commerce business worldwide and higher-than-expected health care costs in the U.S.

Wal-Mart president and CEO Doug McMillon said in a statement he’s pleased with the retailer’s international business, U.S. sales at the company’s smaller stores (called neighborhood markets), and e-commerce sales.

“As it relates to our challenges in the quarter, we wanted to see stronger comps in Wal-Mart U.S. and Sam’s Club, but both reported flat comp sales,” he said. “Stronger sales in the U.S. businesses would’ve also helped our profit performance.”

Wal-Mart’s international stores grew net sales by 3.1 percent to $33.9 billion over the 13 weeks ended Aug. 1, and e-commerce sales globally increased by about 24 percent, led by the U.S., U.K., China and Brazil, the company said.

U.S. store traffic fell by 1.1 percent, the seventh consecutive quarterly decline. Sales in U.S. stores were flat, excluding recently opened and closed locations. Including new and closed stores, sales declined for the fifth consecutive quarter.

According to S&P Capital consumer staples analyst Joseph Agnese, Wal-Mart has historically grown profit in the U.S. by expanding discount stores, which sell home goods, clothes, electronics and other products but not groceries, to supercenters, which include groceries. That drove up traffic as people returned to buy perishables and purchased non-perishables as well. 

"Now most of the discount stores have been converted, so there's less room for growth," he said. "McMillon [CEO] plans to acquire square footage growth with neighborhood markets. But they’re tiny stores. It takes a lot to generate sales of just one supercenter."

For the period ended July 31, Wal-Mart posted $4.09 billion in profit, up from $4.07 billion a year earlier.