E-commerce Compliance Checker

E-commerce Compliance Checker

A self-assessment tool to review key compliance areas for your online store.

Enter Your Website URL

Enter the full URL of your e-commerce store to begin the compliance check.

Legal Pages Checklist

Cookie Consent & Privacy

Accessibility Checklist (WCAG/ADA)

Checkout & Security

Compliance Report Summary

Your compliance report will appear here once you've completed the checklist.

Disclaimer: This tool is for informational purposes only and does not constitute legal advice. Consult with a qualified legal professional for compliance guidance.

Website: ${websiteUrl}

Date: ${reportDate}

`; const generateSection = (title, checklistId) => { let sectionHTML = `

${title}

`; const items = document.querySelectorAll(`#${checklistId} .checklist-item`); items.forEach(item => { const question = item.dataset.question; const selected = item.querySelector(`input[name="${item.dataset.id}"]:checked`); const status = selected ? selected.value : 'Not Answered'; sectionHTML += ``; }); sectionHTML += `
Checklist ItemStatus
${question}${status}
`; return sectionHTML; }; tableHTML += generateSection('Legal Pages', 'legal-checklist'); tableHTML += generateSection('Cookie Consent & Privacy', 'cookie-checklist'); tableHTML += generateSection('Accessibility (WCAG/ADA)', 'accessibility-checklist'); tableHTML += generateSection('Checkout & Security', 'checkout-checklist'); document.getElementById('reportPreview').innerHTML = tableHTML; document.getElementById('pdf-content-wrapper').innerHTML = tableHTML; } /** * Downloads the generated report as a PDF file. */ async function downloadPDF() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-render-area'); if (!pdfContent) { console.error('PDF content area not found.'); return; } downloadPdfBtn.textContent = 'Generating...'; downloadPdfBtn.disabled = true; pdfContent.classList.remove('hidden'); try { const canvas = await html2canvas(pdfContent, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'in', format: 'letter' }); const imgProps = pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('E-commerce_Compliance_Report.pdf'); } catch (error) { console.error('Error generating PDF:', error); } finally { pdfContent.classList.add('hidden'); downloadPdfBtn.textContent = 'Download Report as PDF'; downloadPdfBtn.disabled = false; } } // --- EVENT LISTENERS --- downloadPdfBtn.addEventListener('click', downloadPDF); // --- INITIALIZATION --- populateChecklists(); showTab(currentTab); });
Scroll to Top