2
Answers
Vote up!
0
Vote down!

End User Agreement

Hi.
I need to have customers agree to an agreement before allowing the to checkout. I need to display a box with the agreement and they must either check I agree or I disagree. I agree lets the checkout process start and I disagree returns a message that they must agree to the term s of service.
Does anyone know how or where I should look for this feature?

Thanks so much!

Asked by: savantcreative
on November 12, 2012

2 Answers

Vote up!
0
Vote down!

Hello,

Normally you can alter forms if you create an own module and use the the hook_form_alter function.

function MODULENAME_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'commerce_checkout_form_checkout') {
    $form['terms_of_use'] = array(
      '#type' => 'checkbox',
      '#title' => t("I agree with the website's terms and conditions."),
      '#required' => TRUE,
  '#weight' => 9,
    );
   
    $form['buttons']['#weight'] = 10;
  }
}

When it comes to form validations, it gets more complicated.

Best regards

Answer by: mrbrookman
Posted: Nov 15, 2012
Vote up!
0
Vote down!

well your question is nearly 4 years of age, I have a similar however maybe a much more complicated question..

Just before the checkout, I have to show the user "a sales agreement" page just before checkout. (This is different from the 'terms and condition' like stuff, this is a sales agreement between the purchase (user) and the seller (siteowner) that contains some legal text). If the user accepts ey can check out, if not ey can not. if ey agrees, there may also be a need to record the text of that sales agreement 'cause it will have a dynamic content like the date, the items bought etc.

Any module or suggestions?

thanks

best regards

Answer by: burak
Posted: Mar 18, 2016