The retail apocalypse has been good for Dollar General (NYSE:DG). Discount stores in a broad sense have been immune to changes in how people shop. That's likely because the items sold at these stores are generally things people want right now.

Dollar General has prospered by growing quickly and putting stores where customers are. The chain added about 1,000 locations in 2017 and has plans to do roughly the same this year. That has proven to be a smart strategy since the company's locations largely serve customers who live nearby. By spacing its stores out -- often just a few miles apart -- the company has shown it can build audience without cannibalizing existing locations.

The exterior of a Dollar General store.

Dollar General has been making changes in its stores. Image source: Dollar General.

Growth continues

While many retail chains have seen sales slip as more customers shop online, Dollar General has built an impressive track record of growth. The chain saw a 3.7% increase in same-store sales in the second quarter. That was driven by customers spending more and by an increase in traffic to its stores, according to CEO Todd Vasos, speaking during the company's Q2 earnings call

"I also want to note that our two-year same-store sales stack for the second quarter of 2018 was the highest in 10 quarters," he said. "Year to date, through the second quarter of 2018, we posted 2.9% same-store sales growth driven by greater customer productivity."

The future is bright

Vasos does not expect sales to slow even as his company expands and his rivals grow their digital alternatives, offer increased delivery options, and add same-day delivery.

"Based on our performance in the first half and our outlook for the rest of the year, we are increasing our net sales and same-store sales guidance for 2018," he said.

Be cool

Vasos made it clear that the company plans not just to open new stores but to invest in its existing locations. A key part of that initiative is adding more cooler doors to all of its stores.

"These types of projects drive high returns by encouraging our customers to make more trips and increase their basket sizes," he said. "This year, our goal is to install more than 20,000 incremental cooler doors across our mature store base. As of the end of the quarter, we have installed approximately 16,000 cooler doors across the chain. And we are well on our way to reaching our year-end goal."

Dollar General expects to have an average of 20 cooler doors in every store by the end of its fiscal year. That's up from 10 in 2012.

Drive impulse sales

Increasing impulse sales has been a focus for Dollar General. To make that happen, the company has revamped its checkout lines.

"During the second quarter, we added the enhanced queue lines to more than 400 existing stores, bringing our total for the chain to approximately 6,800 stores," Vasos said. "The queue line retrofit performance remains very strong. We expect to have this enhancement in more than 7,500 stores by the end of 2018."

Not standing pat

Dollar General clearly has a winning formula for the current retail operating environment. Despite that, the company has chosen to continually tweak its formula in order to improve performance. That should continue to help the company in a market in which its rivals are working to undermine stores by increasing delivery options.

Daniel B. Kline has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.