It should work in the shopping cart. Can you give me the URL of a product in your store so that I can add it to the cart to see this feature and how you have it setup?
What I would suggest would be to go to Commerce Setup > Order System > Checkout, and enable the custom checkout fields, and the customer checkout field 1. Don't make this field required, because not all orders will use it.
Then in one of the text fields on the Commerce Setup > Order System > Checkout screen, add the following HTML:
- Code: Select all
<input type="checkbox" id="standard" name="standard" value="Standard" onchange="calcStandard();" checked/>Standard processing time of two to three weeks
<br><input type="checkbox" id="needByDate"name="rush" value="Rush Processing" onchange="calcRush();"/>Need to arrive before or on a certain date.
<span id="date-wrapper" style="display: none">
<input type="text" id="dateBox" name="field01" placeholder="Date Needed By"/>
<br><strong>Some rush delieveries may require a fee, a customer service representative will contact you if your date requires rush processing.</strong>
</span>
<script src="https://www.pedestalsource.com/js/cart.js"></script>
Note, I have added the full SECURE URL to the script file, and I have removed the <form></form> tags. because the field01 is part of the checkout screen form.