Chuck Netzhammer with the cake he said Wal-Mart made after denying him a Confederate flag cake.

A Walmart in Louisiana is apologizing after making a cake with the logo of Islamic militants on it but turning down a request to do an edible Confederate flag image.

Chuck Netzhammer said he requested a Confederate flag cake with the words "Heritage Not Hate," on it from his local Wal-Mart store. The request came just as the Arkansas-based retailer announced it would no longer sell Confederate flag merchandise due to the controversy that erupted after an armed gunman killed nine black worshipers at a church in South Carolina, a state where the banner is still flown on capitol grounds.

Netzhammer said he received a notice that the store's bakery would not make the Confederate flag cake. He then ordered a cake with the black and white image of an Islamic State of Isis and Syria flag. That cake was produced and Netzhammer posted a video of it on You Tube.

"ISIS happens to be someone we are fighting against who are killing our men and boys overseas and are beheading Christians," he said in the almost 2 minute video.

A spokesperson for Walmart has since apologized for the production of the cake.

"An associate in a local store did not know what the design meant and made a mistake. The cake should not have been made and we apologize," a spokesperson said.

Walmart, Amazon, Etsy and eBay are among the retailers that said they will ban the sale of Confederate flag merchandise in the wake of the June 17 shootings.