Yazılımcılar Bakabilir mi? Kod yardımı istiyorum.
10
●292
- 22-12-2024, 14:20:58js ile yapılabilir,
eklediğiniz butona bu kodları girip dener misiniz:
<script> document.getElementById('whatsappButton').addEventListener('click', function () { const phone = "{{$order->phone}}"; const message = encodeURIComponent("{{$item->get('sms-icerigi')}}"); const whatsappUrl = `https://api.whatsapp.com/send/?phone=${phone}&text=${message}`; window.open(whatsappUrl, '_blank'); }); </script> - 22-12-2024, 14:20:59Bu dediğim apiye gerek kalmadan yapılan manuel bir durum. Api ile yapabilecek bir durumum yok diye böyle bir arayışa girdim.m4lisen adlı üyeden alıntı: mesajı görüntüle
- 22-12-2024, 14:27:05Hocamfatihanily adlı üyeden alıntı: mesajı görüntüle
<script>
document.getElementById('whatsappButton').addEvent Listener('click', function () {
const phone = "{{$order->phone}}"; const message = encodeURIComponent("{{$item->get('sms-icerigi')}}");
const whatsappUrl = `https://api.whatsapp.com/send/?phone=${phone}&text=${message}`;
window.open(whatsappUrl, '_blank'); });
</script>
Bu şekilde sayfa editörünün en altına ekledim, js olduğu için. Fakat bu sefer sipariş detay sayfam 404'e düşüyor. - 22-12-2024, 14:30:18bu ksıım değiştirilmeli birleşik yazılmalıAlıntı
document.getElementById('whatsappButton').addEventListener('click', function () {bu şekilde dener misiniz?
