You can thank a certain boy wizard for once again pushing the book industry to new heights.

Harry Potter and the Cursed Child, a book containing the script of a two-part play of the same name by author J.K. Rowling, became Barnes & Noble's (BKS) most pre-ordered book since Harry Potter and the Deathly Hallows in 2007. The release of the eighth Harry Potter story -- even though it actually came out on July 31 -- reminded people that Barnes & Noble exists, which is a good thing for the book chain.

BKS Chart

BKS data by YCharts.

What: Barnes & Noble opened July at $11.38 and closed the month at $13.08, a nearly 15% gain, according to data provided by S&P Global Market Intelligence. It's hard to see any reason why the company's stock would have risen other than the heavy demand for the Harry Potter book.

So what: This isn't just a hit book -- it's one of the bigger releases in publishing history.

"We expect it to be our biggest selling book of the year," said Barnes & Noble chief merchandising officer Mary Amicucci in a press release. To celebrate the launch of what Rowling has called the eighth story in Potter's saga, the bookseller hosted "Midnight Magic" parties on July 30.

Now what: As an investor, if you buy Barnes & Noble because of traffic driven by a hit book, you might as well buy all retailers based on the fact that they will be pretty crowded on Black Friday. Few book releases will equal this one, and Barnes & Noble cannot count on repeating the phenomenon or the sales.

What it can do, however, is use the opportunity presented by the Cursed Child crowds to expose lapsed customers to its revamped stores. Barnes & Noble has branched out well beyond being a bookstore which sells coffee. The chain has moved into toys, gifts, vinyl records, collectible gaming, and more.

The Potter crowd, for example, might overlap with the kids who play the Pokemon card game, or adults who play the various Star Wars collectible games. This book release was essentially a second Christmas for the retailer; how well it profits in the long run depends not on how many Potter books it sells, but whether it gives fans of that series another reason to come back.