Description
<div class=”custom-street-sign-configurator”>
[insert your entire working code from the page here – the whole <style>…<script> block you already have]
</div>
<p style=”text-align:center;margin-top:40px;”>
<button onclick=”addCustomSignToCart()” class=”fusion-button button-large button-round button-green” style=”padding:20px 40px;font-size:22px;”>
Add This Sign to Cart – $149 AUD
</button>
</p>
<script>
function addCustomSignToCart() {
var name = document.getElementById(‘streetname’).value.trim();
var type = document.getElementById(‘streettype’).value;
if (!name || !type) {
alert(‘Please enter a street name and select the type first!’);
return;
}
var fullName = name.toUpperCase() + ‘ ‘ + type.toUpperCase();
// Add the real product (ID 12345 – change to your actual product ID) to cart with custom text
fetch(‘/?add-to-cart=12345&custom_sign_text=’ + encodeURIComponent(fullName), {method: ‘GET’})
.then(() => {
alert(‘”‘ + fullName + ‘” has been added to your cart!’);
window.location.href = ‘/cart/’;
});
}
</script>

Reviews
There are no reviews yet.