0

From my module I added a block with a checkbox into checkout_onepage_review. Now I could like to make sure this checkbox was selected. Therefor I am observing the sales_order_place_after event where I can capture the result.

How do I use the the Magento JavaScript validator in the last checkout step (review).

If I add class="checkbox required-entry" nothing happens because the button uses review.save() which does not call the validator. Also it does not send my checkbox value...

PiTheNumber
  • 3,234
  • 10
  • 47
  • 70

1 Answers1

0

rather then observing event you can also add validation class="checkbox required-entry"

Keyur Shah
  • 18,046
  • 6
  • 66
  • 80
  • Thank you. I tried this but nothing happens if I don't check the box. – PiTheNumber Nov 21 '13 at 09:40
  • but after sales_order_place_after you can not go the back to the form because order is already placed but you can also check with sales_order_place_before to check checkbox is check or not – Keyur Shah Nov 21 '13 at 09:51
  • Problem with required-entry is that the button function review.save() does not use a validator because normally there is no need to. I got to add this somehow... – PiTheNumber Nov 21 '13 at 09:56
  • you can check with this event sales_order_place_before put observer and check check-box is check or not – Keyur Shah Nov 21 '13 at 10:11
  • follow this link http://www.techflirt.com/magento-event-observer-hook-in-magento/ it may help you – Keyur Shah Nov 21 '13 at 10:12
  • if you find my answer helpful then accept it @PiTheNumber – Keyur Shah May 06 '15 at 12:25