Bloomberg

Walmart (WMT - Get Report) has been facing -- and will likely continue to face -- an uphill fight against Amazon.com (AMZN - Get Report)  in traditional e-commerce.

But in the field of online orders that are picked up or delivered from local stores, Walmart currently looks like the hands-down leader in the U.S.. And that in turn could give Amazon additional motivation to extend its grocery store investments beyond Whole Foods.

For those unfamiliar, the Walmart Grocery website and mobile apps let consumers place orders (subject to a $30 minimum) for items in stock at nearby Walmart stores while paying the same prices charged within the stores. They can subsequently opt to pick up an order from a store during a selected 1-hour window for no extra charge, or have it delivered during a selected 1-hour window for a fee of $7.95 to $9.95 plus tip (food delivery firm DoorDash has been handling many of these deliveries).

It's worth pointing out here that the name "Walmart Grocery" is a bit of a misnomer, since Walmart's local delivery and pickup services also cover many non-grocery items -- everything from clothes and toys to electronics and sporting goods. Almost anything that's available at a local Walmart store and can fit into a car is fair game.

Having used Walmart's grocery pickup service a couple of times, I can say that it both saved time and provided a better customer experience relative to navigating a crowded Walmart store to make purchases the old-fashioned way. Walmart sends an e-mail and a text message when an order is ready, after which a customer can check in via the Walmart Grocery app while on the way. The customer then pulls up to one of the designated grocery pickup parking spots outside of a store, and either uses the app to let Walmart know the spot number or gives his or her name to a nearby employee. After that, the order is typically wheeled out to the parking spot within a couple of minutes (there are also vending machine-like pickup towers and lockers inside of some stores).

Admittedly, this still isn't as convenient as having an order delivered to your door. But thanks to a lack of shipping expenses and the cost efficiency of Walmart's bricks-and-mortar empire, the prices are often markedly lower than what one has to pay for an online order fulfilled from a warehouse, particularly for groceries and other consumer staples. And one also can't generally have items that need to be refrigerated or frozen shipped from an e-commerce warehouse.

Moreover, for those looking to have an order delivered, Walmart has been rolling out a service known as Delivery Unlimited. It lets customers get unlimited deliveries on Walmart Grocery orders for either $98 per year or $12.95 per month.

Walmart Grocery's success is starting to move the needle a bit. During both its July and April quarters, Walmart reported 37% annual e-commerce growth for its Walmart U.S. segment, while making a point of noting its online grocery business was a major contributor. That helped Walmart's U.S. same-store sales rise 7.3% on a stacked 2-year basis, a figure that the company says is it's highest growth rate in more than 10 years.

In addition, Walmart Grocery appears to be helping Walmart obtain new customers. Cowen has estimated that between 40% and 60% of Walmart grocery pickup sales involve new Walmart customers. Separately, customer data from research firm Numerator indicated that the average order for a Walmart Grocery pickup was $124.86, far above the $49.70 average order for in-store trips; such a difference goes a long ways towards making up for the labor cost of having Walmart employees collect the items that are being picked up.

Walmart's U.S. e-commerce unit does appear to be posting significant losses: In July, Recode reported that Walmart projects the unit will lose over $1 billion this year on revenue of $21 billion to $22 billion. However, that report also gave the impression that Walmart's traditional e-commerce operations have much to do with these losses, and it indicated that there's friction between Walmart U.S. e-commerce chief Marc Lore and other execs, some of whom are pushing for Walmart to focus more strongly on its online grocery business.

That's arguably advice worth listening to. In traditional e-commerce, Amazon, whose North American segment is expected to post 2019 revenue of $169 billion, has a long list of competitive strengths that make it far from certain that Walmart will be able to profitably compete against Jeff Bezos' firm on a large scale anytime soon. Key among those strengths are a massive and highly efficient online fulfillment infrastructure, large logistics/delivery investments, an unmatched seller marketplace and the tremendous popularity of Amazon Prime. But in online grocery pickup and delivery, Walmart is the company that has more of a home-field advantage.

Amazon, to be fair, has begun providing free online pickup for many Whole Foods stores, and is also now providing free deliveries on Whole Foods orders in many metro areas via its Prime Now rapid-delivery service (both services have a $35 order minimum). But Whole Foods' scale is much smaller than Walmart's: Whereas Whole Foods claims 500-plus stores in the U.S. and U.K., Walmart plans to offer online pickup at 3,100 U.S. stores, and Delivery Unlimited via 1,600 stores, by the end of this year. And though Amazon has cut Whole Foods' prices a bit since buying the company in 2017, there's still a fairly big price delta between Walmart and Whole Foods.

All of this could be on the minds of Amazon execs as they reportedly push ahead with plans to launch a U.S. grocery store chain that's separate from Whole Foods. In March, The Wall Street Journal reported that Amazon is "planning to open dozens of grocery stores in several major U.S. cities," with the first store possibly launching in Los Angeles by year's end.

Assuming Amazon goes through with such a project, one definitely can't doubt the company's ability to make it a success over time, given its resources and track record. But for the time being, Walmart Grocery looks well-poised to build on its recent momentum.

Amazon.com is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells AMZN? Learn more now.