Automated Affiliate Terms & Conditions Generator
Create a comprehensive T&C document for your affiliate program.
Company Information
Commission & Payouts
Prohibited Activities
Select activities that affiliates are explicitly forbidden from engaging in.
Additional Clauses
Include other important clauses in the agreement.
The following activities are strictly prohibited and will result in immediate termination from the Affiliate Program and forfeiture of any outstanding commissions:
-
${prohibitedActivities || "
- No specific activities prohibited. "}
6. Disclosure Requirements
You must comply with all applicable laws and regulations, including the Federal Trade Commission (FTC) guidelines concerning endorsements and testimonials. You must clearly and conspicuously disclose your affiliate relationship with us whenever you promote our products/services.
` : ''} ${includeConfidentiality ? `7. Confidentiality
Any non-public information we provide to you shall be considered confidential. You agree not to disclose this confidential information to any third party without our prior written consent.
` : ''}8. Term and Termination
This Agreement will begin upon our acceptance of your Affiliate application and will end when terminated by either party. You may terminate this Agreement at any time, with or without cause, by giving the other party written notice. We may terminate this Agreement for any breach of its terms.
9. Limitation of Liability
We will not be liable for indirect, special, or consequential damages arising in connection with this Agreement or the Affiliate Program, even if we have been advised of the possibility of such damages.
10. Modification
We may modify any of the terms and conditions in this Agreement at any time at our sole discretion. We will notify you by email. If any modification is unacceptable to you, your only recourse is to terminate this Agreement.
`; document.getElementById('generated-terms-container').innerHTML = terms.trim(); }; const handleNavClick = (direction) => { const currentIndex = TABS.indexOf(currentTab); const newIndex = direction === 'next' ? currentIndex + 1 : currentIndex - 1; if (newIndex >= 0 && newIndex < TABS.length) { showTab(TABS[newIndex]); } }; const copyToClipboard = () => { const termsText = document.getElementById('generated-terms-container').innerText; navigator.clipboard.writeText(termsText).then(() => { copyTermsBtn.textContent = 'Copied!'; setTimeout(() => { copyTermsBtn.textContent = 'Copy to Clipboard'; }, 2000); }).catch(err => console.error('Failed to copy: ', err)); }; const generatePDF = () => { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('generated-terms-container'); const pdfBtnContainer = document.getElementById('pdf-button-container'); if (!pdfContent || !pdfBtnContainer) return; const companyName = document.getElementById('company-name').value || "Company"; pdfBtnContainer.style.display = 'none'; html2canvas(pdfContent, { scale: 2, useCORS: true, scrollY: -window.scrollY }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgWidth = pdfWidth - 20; const imgHeight = (canvas.height * imgWidth) / canvas.width; let heightLeft = imgHeight; let position = 15; pdf.setFontSize(22); pdf.setFont('helvetica', 'bold'); pdf.text('Affiliate Program T&C', pdfWidth / 2, 10, { align: 'center' }); pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); heightLeft -= pdfHeight; while (heightLeft > 0) { position = heightLeft - imgHeight +15; // +15 for margin pdf.addPage(); pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); heightLeft -= pdfHeight; } pdf.save(`${companyName}-Affiliate-Terms.pdf`); pdfBtnContainer.style.display = 'block'; }).catch(err => { console.error("Error generating PDF:", err); pdfBtnContainer.style.display = 'block'; }); }; // --- Event Listeners --- Object.keys(tabButtons).forEach(key => tabButtons[key].addEventListener('click', () => showTab(key))); prevBtn.addEventListener('click', () => handleNavClick('prev')); nextBtn.addEventListener('click', () => handleNavClick('next')); copyTermsBtn.addEventListener('click', copyToClipboard); downloadPdfBtn.addEventListener('click', generatePDF); // --- Initial Setup --- showTab('details'); });