To dynamically update a price based on checkboxes and send that updated price to the Webflow eCommerce cart, you’ll need a custom solution using jQuery or vanilla JavaScript, because Webflow’s eCommerce doesn’t support this natively.
Here's how you can do it:
In your Page Settings → Before
custom code, add a script like this:
<script>$(document).ready(function () { let basePrice = 100; // Replace with your actual base product price let totalAddons = 0; // Update displayed price function updateTotalPrice() { let totalPrice = basePrice + totalAddons; $('.product-price').text('$' + totalPrice.toFixed(2)); } $('.addon-checkbox').change(function () { let addonPrice = parseFloat($(this).attr('data-price')); if ($(this).is(':checked')) { totalAddons += addonPrice; } else { totalAddons -= addonPrice; } updateTotalPrice(); });});</script>
data-price="10"
.Because Webflow doesn’t let you change product price dynamically at checkout, you have two workarounds:
Webflow cart doesn’t support custom pricing directly from JS, so this is a common workaround.
You can push checkbox selections into the "Note" field of the cart item using JavaScript by pre-filling a text input.
$('.form-note-input').val('Addon A: Yes, Addon B: No');
Replace .form-note-input
with the correct selector for a hidden input or a visible field in the product form.
To reflect checkbox selections in total price:
Let me know if you want code for fake variant selection or Zapier integration too.