WordPress.org

Support

Support » Plugins and Hacks » Code Snippets » AGB text with links on checkout-page

AGB text with links on checkout-page

  • Would like to place on checkout-page between headline YOUR ORDER and the product-listing a text with links with or without a checkbox.

    Have found a snippet but this will place it to the customer registration under the alternativ delivery address field. I need to have it on checkout page right between the headline YOUR ORDER (IHRE BESTELLUNG) and the product listing table:

    /*-------------- AGB Hinweis beim Checkout     --------------*/
    
    add_action('woocommerce_after_order_notes', 'agb_checkout_field');
    function agb_checkout_field( $checkout ) {
    
    echo '<div id="agb_checkout">';
    
     woocommerce_form_field( 'agb_checkout', array(
             'type'          => 'checkbox',
             'class'         => array('notes'),
             'label'         => __('Mit Abgabe einer Bestellung bestätigen Sie, unsere <a href="http://blogadresse.com/agb">AGB</a> gelesen, verstanden und akzeptiert zu haben.'),
             'placeholder'       => __('AGB', 'woothemes'),
             'required'         => true,
             ), $checkout->get_value( 'agb_checkout' ));
             echo '</div>'; }
    
    /*-------------- AGB Feld validieren   --------------*/
    
     add_action('woocommerce_checkout_process', 'agb_checkout_valid');
     function agb_checkout_valid() {
             global $woocommerce;
             if (!isset($_POST['agb_checkout']))
    
     $woocommerce->add_error( __('Bitte bestätigen Sie die AGB.') );
    
     }

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Here is the link to the test-shop:

    http://shop.kulturschock-koeln.de/?page_id=6

    Any help is welcome!
    Regards from Cologne

    http://wordpress.org/extend/plugins/code-snippets/

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    @bungeshea

    Hi,

    I’ve had a look at the Woocommerce plugin code, but there doesn’t appear to be a way (short of editing the plugin code directly) to add content in between the heading and the table – only before the heading and after the table. However, I’ve never actually used Woocommerce before, and you might have more luck at the Woocommerce plugin forums. Sorry I couldn’t be more help 🙁

Viewing 1 replies (of 1 total)
  • The topic ‘AGB text with links on checkout-page’ is closed to new replies.
Skip to toolbar