As counterintuitive as it might sound in the era of e-commerce, Barnes & Noble’s bks bookstores saved the day in the bookseller’s most recent quarter.

Comparable sales in Barnes & Noble’s retail business, which exclude its struggling Nook digital business, rose 1.3% in its third fiscal quarter, the company reported on Thursday, as physical books continued to hold their own against e-books at the company and industrywide.

In contrast, the retailer’s online sales plunged 12.5% because of a botched site relaunch, making it one of the rare chains to see its digital business shrivel in this day and age. Total sales fell 1.8% to $1.4 billion.

Because business at its physical locations is on the upswing again, albeit modestly, Barnes & Noble plans to close only eight stores this fiscal year, the smallest number of closings since 2000. (In June, the company had said it would close 13 locations.)

Hit by Amazon’s explosive growth a decade ago, as well as the rise of e-books (which now seem to have peaked at around 20% of total book sales), Barnes & Noble closed stores year-in, year-out, benefiting from a savvy move in the 1990s that saw it opt for short leases. Its store fleet has shrunk from 798 bookstores in 2008 to 640 now.

“First and foremost, the physical book business as an industry and within Barnes & Noble has stabilized,” B&N CEO Ron Boire told Fortune in an interview. Boire, who took the reins last summer, added that the retailer has benefitted from efforts to diversify its offerings and ramp up its educational toys and gift businesses, sales of which grew 12.5% and 13.8% respectively in the quarter ended Jan. 30.

And B&N has emerged as a major seller of vinyl records. Sales in that category nearly tripled last quarter compared to a year earlier, though the company declined to give specific results. The bookseller holds tens of thousands of events nationwide at its stores to give people a reason to come to stores, rather than shop online from a competitor.

Yet however much B&N’s results are encouraging for fans of the bookstore, the company has been missing out on e-commerce. Last summer, it re-launched after much delay, but the site was beset with problems like poor search capability, making it hard to find books and certainly not equipping Barnes & Noble with a tool with which to fight Amazon.

Online sales, already anemic because of a web site in which B&N had underinvested over the years as it pursued its Nook digital reader efforts, plunged immediately. They fell 28% in the quarter of the launch, and then 22% in the second quarter before moderating during the holiday quarter. In the third quarter, they came to about $110 million.

Last summer, B&N hired a chief digital officer who has been busy fixing the site, making 1,000 changes in all (many of them tweaks, some of them major like fixing its search engine) as past of a complete site redesign, and executives expressed confidence they could rebuild B&N’s digital business. The retailer is also working to improve its mobile shopping app.

The company is looking to pare its losses from its Nook business, a line of devices launched in 2009 to go toe-to-toe with Amazon’s Kindle. The devices, which at first gave Barnes & Noble a horse in the e-book race, have turned out to be an albatross for the company, with losses of almost $70 million in the first nine months of the fiscal year, on sales of only $211 million.

Boire dismissed the idea that B&N could just walk away from the Nook business altogether, saying customers had digital expectations.

“We are the full-service book provider in America, and part of that service has got to be an e-book component,” he said.

In the meantime, B&N is hoping to build in its recovering retail business with the launch of a new store prototype next summer at four locations.

And the company has to be hoping that gussied up format will help it fight against Amazon, which is rumored to be about to launch a chain of physical bookstores of its own.