ecommerce: customer choice -> summing up checked values
Permalink
Hi,
what I'm trying to achieve is if I add a customer choice (multiple checkboxes) to a product I would like to have displayed the sum of the checked values so the customer will know how much he has to pay for the extras.
EXAMPLE:
So if both are checked I want to display the value "300".
If there is not a built in possibility I know how I would do it with javascript. The only problem here CONCRETE5 outputs stuff like this:
with value=1 and I have no chance to access the real value of lets say 300 on this page.
Any ideas???
All help is much apprechiated.
Thanks
Toby
what I'm trying to achieve is if I add a customer choice (multiple checkboxes) to a product I would like to have displayed the sum of the checked values so the customer will know how much he has to pay for the extras.
EXAMPLE:
<input type="checkbox" name="extra_1" value="100" /> <input type="checkbox" name="extra_1" value="200" />
So if both are checked I want to display the value "300".
If there is not a built in possibility I know how I would do it with javascript. The only problem here CONCRETE5 outputs stuff like this:
<input type="checkbox" class="ccm-input-checkbox" name="akID[46][atSelectOptionID][]" id="akID[46][atSelectOptionID]_15" value="1" />
Any ideas???
All help is much apprechiated.
Thanks
Toby
ADD THESE LINES TO THE END OF packages/core_commerce/page_types/product_detail.php