6/recent/ticker-posts

Affiliate Product Comparison Table Generator

Affiliate Product Comparison Table Generator

Affiliate Product Comparison Table Generator

Create beautiful, responsive comparison tables for your affiliate products. Customize the design, add buy buttons, and generate SEO-optimized HTML code for your Blogger.com posts.

Add Products

Blue
Green
Red
Yellow
Purple

Manage Products

No products added yet. Add your first product above.

Table Customization

Blue
Green
Red
Yellow
Purple

Output

`; // Generate HTML table let htmlTable = `

${tableTitle}

${tableDescription}

`; products.forEach(product => { htmlTable += ` `; }); htmlTable += `
Product Description Price Action
${product.imageUrl ? `${product.title}` : ''} ${product.title} ${product.description || 'N/A'} $${product.price} Buy Now
`; // Combine everything const fullHtml = `${schemaMarkup}\n\n${htmlTable}`; generatedCode.value = fullHtml; // Enable copy and download buttons copyCodeBtn.disabled = false; downloadCodeBtn.disabled = false; // Show success message alert('HTML code generated successfully!'); }); // Copy HTML code copyCodeBtn.addEventListener('click', function() { if (!generatedCode.value) { alert('No code to copy. Please generate the HTML first.'); return; } generatedCode.select(); document.execCommand('copy'); // Change button text temporarily const originalText = this.innerHTML; this.innerHTML = ' Copied!'; setTimeout(() => { this.innerHTML = originalText; }, 2000); }); // Download HTML code downloadCodeBtn.addEventListener('click', function() { if (!generatedCode.value) { alert('No code to download. Please generate the HTML first.'); return; } const blob = new Blob([generatedCode.value], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'affiliate-comparison-table.html'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); }); // Preview table previewTableBtn.addEventListener('click', function() { if (products.length === 0) { alert('Please add at least one product'); return; } // Generate a preview version without schema markup const tableTitle = document.getElementById('table-title').value.trim() || 'Product Comparison'; const tableDescription = document.getElementById('table-description').value.trim() || 'Compare these top products and choose the best one for your needs.'; const borderStyle = document.getElementById('border-style').value; let htmlTable = `

${tableTitle}

${tableDescription}

`; products.forEach(product => { htmlTable += ` `; }); htmlTable += `
Product Description Price Action
${product.imageUrl ? `${product.title}` : ''} ${product.title} ${product.description || 'N/A'} $${product.price} Buy Now
`; tablePreview.innerHTML = htmlTable; previewSection.style.display = 'block'; // Prevent actual navigation for preview buttons tablePreview.querySelectorAll('.buy-now').forEach(btn => { btn.addEventListener('click', function(e) { e.preventDefault(); alert('In a real implementation, this would link to your affiliate URL.'); }); }); }); // Share buttons document.getElementById('share-whatsapp').addEventListener('click', function(e) { e.preventDefault(); if (!generatedCode.value) { alert('Please generate the HTML code first.'); return; } const text = "Check out this affiliate product comparison table I created!"; const url = encodeURIComponent(window.location.href); window.open(`https://wa.me/?text=${text}%20${url}`, '_blank'); }); document.getElementById('share-telegram').addEventListener('click', function(e) { e.preventDefault(); if (!generatedCode.value) { alert('Please generate the HTML code first.'); return; } const text = "Check out this affiliate product comparison table I created!"; const url = encodeURIComponent(window.location.href); window.open(`https://t.me/share/url?url=${url}&text=${text}`, '_blank'); }); document.getElementById('share-twitter').addEventListener('click', function(e) { e.preventDefault(); if (!generatedCode.value) { alert('Please generate the HTML code first.'); return; } const text = "Check out this affiliate product comparison table I created!"; const url = encodeURIComponent(window.location.href); window.open(`https://twitter.com/intent/tweet?text=${text}&url=${url}`, '_blank'); }); });

Post a Comment

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

Search

Recent Posts