You can't. Regardless of how well you pack a cooler and what kind of cooler it is, the ice will melt at one point or another. Some coolers like a yeti cooler may be able to keep ice for a couple of days before melting. If you are using regular ice there is no way to prevent it from melting, but you can stall by packing efficiently, keeping your cooler closed and locked as much as possible, and putting it in the shade, not direct sunlight.