Shop Now
Your Cart

Schneider

document.addEventListener('DOMContentLoaded', function () {// Only show the button when the RFQ form exists on the product page const quotationForm = document.querySelector('#rfq-form-product');if (!quotationForm) { return; }// Prevent duplicate buttons if (document.querySelector('#request-quotation-scroll')) { return; }// Create button const quoteButton = document.createElement('button');quoteButton.id = 'request-quotation-scroll'; quoteButton.type = 'button'; quoteButton.className = 'btn request-quotation-scroll';quoteButton.innerHTML = ' REQUEST QUOTATION';// Smooth scroll quoteButton.addEventListener('click', function (e) {e.preventDefault();const form = document.querySelector('#rfq-form-product');if (!form) { return; }// Offset for sticky header const headerOffset = 120;const position = form.getBoundingClientRect().top + window.pageYOffset - headerOffset;window.scrollTo({ top: position, behavior: 'smooth' });});/* * Try to place it next to the QUESTION button */ const buttons = document.querySelectorAll( 'button, a.btn, .btn' );let questionButton = null;buttons.forEach(function (button) {const text = button.textContent .trim() .toUpperCase();if (text.includes('QUESTION')) { questionButton = button; }});if (questionButton) {questionButton.insertAdjacentElement( 'afterend', quoteButton );return; }/* * Fallback: * put it next to Add To Cart */ const cartButton = document.querySelector('#button-cart');if (cartButton) {cartButton.insertAdjacentElement( 'afterend', quoteButton );}});