yoco updated to use webhook

This commit is contained in:
twotalesanimation
2025-12-29 14:43:24 +02:00
parent 6de01c13c5
commit 00b8ff77b2
123 changed files with 6959 additions and 12669 deletions
+7 -16
View File
@@ -190,8 +190,12 @@ document.head.appendChild(style);
// ===== FORM HANDLING =====
document.querySelectorAll('form').forEach(form => {
// Skip cart-related forms (add to cart, update quantity, remove, etc)
if (form.action.includes('/cart/') || form.action.includes('/orders/')) {
// Skip cart-related, order, custom order, payment, and logout forms (they handle submission themselves)
if (form.action.includes('/cart/') ||
form.action.includes('/orders/') ||
form.action.includes('/custom-orders') ||
form.action.includes('/payment/') ||
form.action.includes('/logout')) {
return;
}
@@ -204,20 +208,7 @@ document.querySelectorAll('form').forEach(form => {
// Here you would typically send to backend
console.log('Form submitted:', data);
// Show success message
const message = document.createElement('div');
message.textContent = 'Thank you! We\'ll be in touch soon.';
message.style.cssText = `
padding: 12px 20px;
background-color: #4caf50;
color: white;
border-radius: 4px;
margin-top: 10px;
`;
this.appendChild(message);
// Form submission handled - no popup message
this.reset();
setTimeout(() => message.remove(), 3000);
});
});