$0.00 0

Cart

No products in the cart.

Continue shopping

Contact

Elementum pulvinar tortor non dignissim fringilla mauris semper blandit. Amet at eget aliquam augue.

Our Location

400 Broad St, Seattle, WA 98109

Contact Us

Mobile: +1 (605) 475 6968 Fax: +1 (605) 475 6968

Email Address

support@zalya.com info@zalya.com

Leave a reply

  • +1 (605) 475 6968
  • 400 broad st, seattle, WA
  • info@oclock.com
© 2023 Oclock. all rights reserved
document.addEventListener("DOMContentLoaded", function () { function updateButtonText() { const selectedMaterialElement = document.querySelector('.variable-items-wrapper[data-attribute_name="attribute_material-piece"] .variable-item.selected'); const selectElement = document.querySelector('select[name="attribute_material-piece"]'); const addToCartButton = document.querySelector('.single_add_to_cart_button'); if (!addToCartButton) { console.error("Add to Cart button not found."); return; } let selectedMaterial = ""; // Check the selected visible button first if (selectedMaterialElement) { selectedMaterial = selectedMaterialElement.dataset.value; } // If no button is selected, check the dropdown (in case Breakdance triggers this) const selectElement = document.querySelector('select[name="attribute_material-piece"]'); if (selectElement) { selectElement.addEventListener("change", updateButtonText); } // Backup: Use MutationObserver to detect any UI updates const observer = new MutationObserver(updateButtonText); observer.observe(document.body, { subtree: true, childList: true }); // Run once on page load updateButtonText(); });