Image source: Wal-Mart

The story at Wal-Mart (WMT 1.32%) for the past year or so has been its declining online sales growth. E-commerce growth went from 16% in the second quarter of last year to 10% in the third quarter before falling into single-digit territory for two straight quarters. Last quarter, e-commerce sales started to rebound, growing 12% year over year.

But one quarter of sales acceleration doesn't make a comeback. With a lot of rearrangement in its e-commerce divisions, Wal-Mart is setting itself up for continued growth in online sales.

Dropping the dead weight in China

Until recently, Wal-Mart operated a site called Yihaodian in China. It bought a 51% stake in the company in 2012, and it bought out the remaining 49% last year for $760 million. After struggling to grow the business, Wal-Mart sold the company to JD.com (JD 2.61%) for a 5% stake in the leading Chinese e-commerce company. That stock was worth about $1.5 billion at the time of the agreement, roughly the same value Wal-Mart bought out Yihaodian for last year.

The fact that Wal-Mart was unable to increase the value of Yihaodian over the past year is indicative of slow sales growth. It's possible the tie-up with JD.com will help spur sales, considering its success with e-commerce in China. Shedding that slow-growing property from its e-commerce platform may allow whatever growth is happening on its websites in the rest of the world to shine through. That's not really sales acceleration, but it makes the numbers look good.

What could actually spur acceleration is the other part of Wal-Mart and JD's agreement. Wal-Mart will establish a store on JD.com under its Sam's Club brand. Additionally, JD.com will list Wal-Mart as a preferred retailer on JD.com's O2O JV Dada, China's largest crowd-sourced delivery platform.

Bringing in Jet propulsion

Earlier this month, Wal-Mart purchased Jet.com for $3 billion in cash and $300 million in stock. Jet is one of the fastest growing e-commerce start-ups in the United States, and it instantly adds about $1 billion in gross merchandise volume to Wal-Mart's operations. That's about a 7% boost to Wal-Mart's 2015 e-commerce sales.

With the acquisition, Wal-Mart is bringing on Marc Lore to lead its e-commerce business. Not only did he start Jet.com; he also started Quidsi, which owned Diapers.com, Soap.com, and Wag.com, before Amazon.com (AMZN -1.64%) bought the company in 2011. Wal-Mart's previous head of e-commerce, Neil Ashe, was a digital-media guy -- not an e-commerce guy. With Lore at the helm, Wal-Mart could see some improvements in its e-commerce operations from a seasoned vet with a track record of growing companies.

Growing investments

On top of Wal-Mart's blockbuster acquisition of Jet.com, the company plans to spend $900 million on improving its e-commerce platform this year. Next year, that number will climb to $1.1 billion. That's up from $700 million in fiscal 2016.

A large chunk of that money is earmarked for building more fulfillment centers to compete with Amazon Prime's two-day shipping. Earlier this year, Wal-Mart launched ShippingPass, which offers the same two-day shipping perk of Amazon Prime. It doesn't include the bevy of other benefits Amazon offers Prime members, such as video and music streaming, free e-book rentals, unlimited cloud storage for photos, and more, but it's half the price at just $49 per year.

Wal-Mart is also investing in expanding its online grocery ordering. CEO Doug McMillan specifically pointed to online grocery sales as a reason for the acceleration of Wal-Mart's e-commerce sales in the second quarter. Online grocery pickup is currently available in just 60 markets and 400 locations. Considering Wal-Mart has over 5,000 locations and nearly 3,500 Supercenters in the United States, it has a lot of room to grow that part of its business.

Online grocery pickup, in particular, takes advantage of Wal-Mart's brick-and-mortar locations -- its biggest advantage over Amazon. If Wal-Mart can continue to leverage its physical locations through innovative supply chain management or online ordering options, it could continue to accelerate sales.

Amazon has continued to grab share of the market as Wal-Mart's sales slow. If Wal-Mart's big investments don't help turn around its sales growth, it will be a major blow to the company; overall revenue growth came in at just 0.7% through the first half of fiscal 2017 after flat revenue in the first half of last year. The company is counting on e-commerce to keep that number moving in the right direction.