WhatsApp button
Page: Product Pages (Optimized for Conversions)


Snippet Code
<a href="#" onclick="sendWhatsAppOrder()" style="text-decoration: none;">
<div class="order_whatsapp" style="margin-top: 10px; margin-bottom:19px; padding: 11px; text-align: center; background-color: #1EA651; height: 48px; color: white; display: flex; align-items: center; justify-content: center; border-radius: 100px;">
<img src="https://cdn.shopify.com/s/files/1/0073/2522/0979/files/whatsapp-icon.png?v=1615793565" width="25px" style="vertical-align: middle; margin-right: 10px;">
Order on WhatsApp
</div>
</a>
<script>
function sendWhatsAppOrder() {
// Get current product URL
const productUrl = window.location.href;
// Pre-filled WhatsApp message (includes "Help Me Place an Order")
const message = `Hello! I need help placing an order. 🛒nn*Product Link:* ${productUrl}nn- Please confirm availability & price.n- What are the payment options?n- Can I get assistance with checkout?nnThank you! 🙏`;
// Encode for URL
const encodedMessage = encodeURIComponent(message);
// WhatsApp number (replace with yours)
const whatsappNumber = '919714409600';
// Open WhatsApp with message
window.open(`https://wa.me/${whatsappNumber}?text=${encodedMessage}`, '_blank');
}
</script>