Total price preview from qty product in product page #1753
Danieleeffe1
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
good morning everyone folks
i found this script to print the total price in real time per product quantity on the product page
this script works fine if the product is simple but if the product is configurable or bundled or other than "simple" it has problems.
instead of capturing the product price that is printed on the monitor based on the choices of configurable products, the script always captures the basic starting price.
i am not a developer so i don't know how to change it.
I would like to integrate this feature into the Mimic theme currently being tested in the openmage theme section.
it would be very welcome if some holy soul could analyze and eventually correct the problem.
to test the script it is sufficient to create a static block in openmage, paste the script, create a widget that calls the static block and choose to insert it in the option wrapper section.
Thank you
<script> optionsPrice.unitPrice = optionsPrice.productPrice; if($('qty')) $('qty').observe('blur', function(e) { $('qty').value = Math.max($F('qty').replace(/[^\d].*/, ''), 1); optionsPrice.productPrice = Math.max(optionsPrice.unitPrice, $F('qty') * optionsPrice.unitPrice); optionsPrice.reload(); }); </script>
Beta Was this translation helpful? Give feedback.
All reactions