yoco updated to use webhook
This commit is contained in:
+7
-16
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user