For generations, a visit to the Jersey Shore wasn't complete without grabbing a box of salt water taffy or fudge to take back home. And the folks who didn't get to go waited for you to bring them back a taste of the Boardwalk from your visit.

But a company which for so many years contributed to those memories -- and made the gooey taffy packaged in boxes emblazoned with vintage seashore scenes -- has filed for bankruptcy.

The James Candy Co., based in Atlantic City, and maker of the famous Fralinger's and James' salt water taffy and confections and Bayard Chocolates, filed on Nov. 7 for Chapter 11 bankruptcy.

The move will allow the company to reorganize and pay off creditors and keep operating.

The goodies so coveted by Jersey Shore visitors remain available in its stores and online.

"The combination of reduced Atlantic City visitors and Boardwalk foot traffic since 2006, the underperformance of 2018 summer sales along the New Jersey seashore and the continuing increased cost of business operations has impacted our efforts to remain a profitable business," said Frank J. Glaser, James Candy Co. president and CEO.

"Over the last several years we have worked very hard to transform our business and cut costs. While these efforts made great strides, the plan was not able to deliver the results the company needed."

The company, which was founded in 1880, produces a wide range of treats including its famous salt water taffy, fudge, macaroons and other treats.

Its 11 stores are located in Atlantic City, Ocean City, Wildwood, Cape May, Cherry Hill and Cinnaminson.

Sales for the company have declined over the past year and a half by about 23 percent, according to spokeswoman Lisa Glaser Whitley.

A number of factors have played into that, Whitely said. They include the weather along with foot traffic and the type of visitors who come to Atlantic City, where most of the company's stores are located.

Besides the financial restructuring, there are "no changes of who we are and how we are operating," according to Whitley.

The company employs between 50 and 150 workers, depending on the season, and candy production is continuing on schedule. The taffy is being pulled, cut and wrapped and fudge and other candy treats are in production.

The company "has stood the taste of time and continues to bring nostalgic, quality confections to its customers," it says.

"Customers should not expect any changes in operations and product fulfillment during the 2018 holiday season and thereafter. The company plans to continue payment of employee wages, benefits, vendors and suppliers in the ordinary course for all goods and services provided on or after the filing date."

So anyone hankering for a tastes of the Shore at Christmas time, may still find some familiar salt water taffy or fudge under their tree or in their mailbox.

"The message is we're here and were doing the same things we have been doing for a combined 138 years," Whitley said.

Bill Gallo Jr. may be reached at bgallo@njadvancemedia.com. Follow Bill Gallo Jr. on Twitter @bgallojr. Find NJ.com on Facebook. Have a tip? Tell us. nj.com/tips.