bakkal işletmesi olrak siparişiwhatsap dan almak istiyorum. Tek tek ürün değil ama sepetin tamamini whatsapdan mesaj olarak almak istiyorum
yani mahalle bakkali üye olmadan sepeti doğrudan whatsap mesajina dönüştürmek amaç
evet ama js uygulamasinda sepet linkine ulaşamiyorum
SEPETIN OLDUĞU YER BU
http://aysenuryavuz.com/bakkal3/ekle.php var message = "Merhaba sepetimdeki siparişleri tamamlamak istiyorum. \n\n";
var totalAmount = 0;
$("tr").each(function() {
var productName = $(this.cells[0]).text();
var productAmount = $(this.cells[1]).text();
var productPiece = $(this).find("input").val();
var productTotalAmount = $(this.cells[4]).text();
totalAmount += parseInt(productTotalAmount);
message += "Ürün adı: " + productName + "\n";
message += "Ürün fiyatı: " + productAmount + "\n";
message += "Ürün adet: " + productPiece + "\n";
message += "Ürün toplam fiyatı: " + productTotalAmount + "\n";
message += "-------------------------\n\n";
});
message += "Genel toplam: " + totalAmount + " TL";
var whatsappLink = encodeURI("https://api.whatsapp.com/send?phone=905555555555&text=" + message);
console.log(whatsappLink);böyle bi kod yazılabilir. Tabi geliştirilmesi lazım.