Drupal Commerce age gate on Add to Basket?
First you can add a popup callback for certain products in the add to cart form alter.

e.g.

function my_module_form_commerce_cart_add_to_cart_form_alter(&amp;$form, &amp;$form_state) {
    // if this is the alcohol
    $form['submit']['#ajax'] = array('event' =&gt; 'click', 'wrapper' =&gt; 'age_check_popup', 'callback' =&gt; 'my_module_age_check');
}

function my_module_age_check($form, &amp;$form_state) {
    ctools_include('modal');
    ctools_modal_add_js();
    $commands = array();
    $commands[] = ctools_modal_command_display('title', theme('my_module_age_block'));
    print ajax_render($commands);
    drupal_exit();
}


Then you'll need to handle the clicks in the popup to either add the product or cancel (just close the popup).

You could do this via hook_menu() callbacks or by rendering a form with buttons in the popup.

Edit:

Implement hook_theme() to create a new template file for your popup content.

e.g.

function my_module_theme($existing, $type, $theme, $path) {
    return array(
       'my_module_age_block' =&gt; array(
          'template' =&gt; 'my_module_age_block'
        ),
     );
 }


Then add a template file my_module_age_block.tpl.php and put your HTML content in here.