This guide explains how to integrate the Pay4Pixels seller items iframe into your website, displaying only a list of products from a specific seller in a clean, customizable format.
To embed a seller's products on your site, add the following iframe code:
<iframe
src="https://br.pay4pixels.com/iframe/v1/seller-list-iframe.html?seller=SELLER_ID"
width="100%"
height="600px"
frameborder="0"
scrolling="no"
allowfullscreen
></iframe>
Replace SELLER_ID with your actual seller ID.
To customize the colors and appearance to match your website:
<iframe
src="https://br.pay4pixels.com/iframe/v1/seller-list-iframe.html?seller=SELLER_ID&primaryColor=%234CAF50&secondaryColor=%23e91e63&bgColor=%23f9f9f9&borderRadius=8"
width="100%"
height="600px"
frameborder="0"
scrolling="no"
allowfullscreen
></iframe>
Available style parameters:
primaryColor - Main color for buttons (hex color like "#4CAF50")secondaryColor - Color for prices (hex color like "#e91e63")bgColor - Background color (hex color like "#f9f9f9")textColor - Main text color (hex color like "#333333")borderRadius - Corner roundness in pixels (e.g., "8")fontFamily - Font family (e.g., "Arial, sans-serif")The iframe will automatically notify the parent page about its height. To support this feature, add this JavaScript to your page:
window.addEventListener('message', function(event) {
if (event.data.type === 'resize') {
const iframe = document.querySelector('iframe[src*="seller-items-iframe.html"]');
if (iframe && event.data.height) {
iframe.style.height = event.data.height + 'px';
}
}
});
When a user selects a product, the iframe will send a message to the parent page. You can listen for this event to handle the selected product:
window.addEventListener('message', function(event) {
if (event.data.type === 'productSelected') {
const product = event.data.product;
console.log('Selected product:', product);
// Example: Show product details or add to cart
// showProductDetails(product);
}
});