For consumers, one of the great things about shopping online is bypassing the queue to check out. For producers of the candy, magazines and drinks often sold there, it's a problem.
In Britain, the country where e-commerce is most popular, about 13 percent of people do all or most of their grocery shopping online. Yet this only accounts for 5 percent of overall spending, suggesting consumers spend more when they visit a store.
That is because online shoppers search for what they need, usually sticking close to their shopping lists. They don't spontaneously buy magazines they opened while waiting to pay, or chocolate to eat on the go.
Elizabeth Clark, a 40-year-old teacher in Liverpool, England, now does most of her shops on the Internet, and says she ends up buying fewer sweets, newspapers, toys, and wine.
(Read more: Clipping grocery bills, without coupons)
"In the supermarket, obviously you walk past it and you see a special offer and you think 'Oh, I'll have that'," she said.
Even though retailers try to do the same thing by flagging special offers at online check-out, it doesn't usually work.
"I always just press 'next, next, next, next' without even reading them, deliberately, because I don't want to be tempted," she said.
The latest survey of European shoppers by IRI found that 73 percent spent more time planning shopping in order to avoid non-essential purchases amid the economic slowdown.
"Shoppers are reducing their impulse purchasing," said Cristina Lazzaroni, who monitors the confectionary market for IRI in Italy, where online shopping is less of a habit.
And when they do buy chocolate at stores, more Italian shoppers are buying larger take-home tablets instead of single-serve snacks, Lazzaroni said, noting that the shift can hurt the bottom line as smaller packages often carry higher margins. IRI said sales of confectionary fell 2.4 percent in Italy in the last year.
Worldwide, the retail confectionery market is worth $196.5 billion, according to Euromonitor International, up 5.6 percent from a year ago. Nearly all sales are from stores, though online made up 0.9 percent this year, up from 0.6 percent in 2008. That is the same amount as purchased through vending machines.
Grocery is one of the last areas of retail to go online, due to challenges around delivery and perishability, but a shift is underway. Amazon.com is expanding its grocery business in the United States and abroad, and traditional grocers are boosting their own digital capabilities as well.
In the United States, Bernstein Research estimates that about one quarter of spending on consumer goods — some $222 billion a year — will ultimately be spent online.
(Read more: Amazon plans major move into grocery business)
Not surprisingly, nonperishables enjoy the most online purchasing, with skin care products deriving 12.2 percent of sales online, Bernstein found, way ahead of the 2.4 percent average. Confectionary and biscuits were at less than 1 percent.
Of Britain's 7 million online grocery shoppers, only 12 percent visit a confectionery-related webpage, and just half of those actually buy anything there, according to Kantar Media.
When asked about efforts to lift sales online or at check-out, Hershey and Mars did not offer examples or make anyone available to discuss. Hershey said its sales have grown at a rate above the industry average for the past several years.
A Nestle spokeswoman said: "The online channel represents an opportunity for confectionery. It is an important channel for us and we are experiencing much success. The path to purchase for confectionery is nonetheless different online versus traditional channels."
Online grocery sales will roughly double on average by 2016 in five key European markets —Britain, France, Germany, Switzerland, and the Netherlands — the food and consumer goods research group IGD predicts.