Domino's Pizza delivery car Joe Raedle | Getty Images

Papa John's is losing the pizza wars, putting millions of dollars in sales up for grabs. After founder John Schnatter's most recent media blunder and a very public feud with the company's board, customers have shied away from Papa John's. The 10.5 percent blow to the pizza chain's same-store sales in July could just be the beginning. The company said customer sentiment continued to sour in August and the company and its franchisees are bracing for weaker sales and possible store closures. On Tuesday, Papa John's lowered its outlook for same-store sales, saying sales at stores open for at least a year are expected to drop by 7 to 10 percent this year. The lowered forecast implies that same-store sales in the second half of the year will drop between 8.5 percent and 14.5 percent, according to BTIG analyst Peter Saleh.

The bad vibes could be a positive for other pizza chains. "In our opinion, this dynamic creates a visible opportunity for Domino's and other leading brands in the industry to gain additional market share when looking on a short-term and longer-term basis," said David Tarantino, an analyst at Baird. As consumers flee Papa John's, a big piece of the more than $41 billion quick-service pizza category is ripe for the taking — and it's up to Domino's and Pizza Hut to seize the opportunity.

Battle for market share

Thanks to its technological prowess, a popular loyalty program and improvements to its pizza dough, which has been well received by customers, Domino's has become the dominant player, surpassing Pizza Hut for the majority of the industry's market share. In 2017, Domino's controlled 14.2 percent of pizza sales, according to a report by Mark Kalinowski, CEO of Kalinowski Equity Research. Pizza Hut had 13.2 percent of the market and Papa John's held onto 7.2 percent. By the end of 2018, Kalinowski forecasts that Domino's market share will surpass 15 percent and Papa John's will slip below 7 percent. He said that Pizza Hut's market share would remain flat.

Domino's declined to say whether it felt it was benefiting from its rival's struggles. "We have been focused on becoming [No. 1] in the pizza industry for a decade," Tim McIntyre, executive vice president of communication at Domino's, told CNBC via email. "We achieved [No. 1] status in global retail sales late last year. Our focus now is on becoming the dominant player in pizza, through great food; innovative technology; exceptional service to our customers; and a focus on the profitability of our tremendous franchisees." Domino's has had a long streak of growing same-store sales, a key metric for restaurants, in the U.S., with 29 straight quarters of positive results. The last time the company posted negative same-store sales was in the first quarter of 2011.

Baird's Tarantino expects Domino's third-quarter same-store sales to get a lift of between 0.8 to 1.4 percent if weakness at Papa John's continues.

NFL sponsorship

As for Pizza Hut, all eyes are on its partnership with the National Football League. Last November, Papa John's founder and then-CEO Schnatter blamed the NFL for the company's poor performance, saying the league had not resolved an ongoing controversy over players kneeling in protest during the national anthem, and TV ratings slumped as a result. At the time, Papa John's was the league's official pizza sponsor. Papa John's and the NFL mutually agreed to terminate the partnership just a year after the pizza chain renewed its agreement with the league. Papa John's had been the official pizza of the NFL since 2010 and still maintains partnerships with 22 specific NFL teams. NFL players resumed their protest during several preseason games Thursday, kneeling and raising their fists in objection to police brutality in the United States. With the controversy showing no signs of stopping, it will be interesting to watch how much of a boost Pizza Hut receives from the deal it struck. Pizza Hut scooped up the official pizza sponsorship in February and has been taking full advantage of it ever since. In April, Pizza Hut offered a number of discounts and deals to consumers to celebrate the annual NFL draft. It even sponsored a "doorbell dance" competition and gave rookie player Malik Jefferson free pizza for a year because he was the "Pi Pick" of the draft — the 14th player selected in the third round, or 3.14, the number for pi. In addition, as part of its sponsorship deal, Pizza Hut can create local deals with the teams, including fan experiences and game tickets. Pizza Hut may also use all 32 of the team logos in its marketing. Getting a boost from the NFL is critical for Pizza Hut. The pizza chain has been the slowest sales grower of Yum Brands trinity of fast food chains. Pizza Hut had gained a reputation for low quality food, limited technological advancements and, thus, wallowed in the shadow of rival Domino's, which has become a dominant force in the pizza market. Since the beginning of the year, Pizza Hut has been aggressively discounting its pizzas, rolling out contests and offering new rewards in an effort to gain market share from competitors. However, even a $130 million investment in equipment upgrades and marketing from its parent company wasn't enough to make a meaningful impact on sales.