WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
AGB text with links on checkout-page (2 posts)

  1. Sales-Man
    Member
    Posted 1 year ago #

    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/

  2. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    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 :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.