Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

splashingpixels.com on "[Plugin: WooCommerce - excelling eCommerce] Order Summary page"

$
0
0

Ok here is the code from that plugin JS file.

jQuery.noConflict();
( function( $ ) {
	var updateTimer;
	var xhr;
	woocommerce_de = {
        init : function () {
            this.remove_totals();
            this.register_payment_update();
            this.remove_first_checkout_button();
            this.show_no_delivery_time_string_control();
            this.scale_unit_hint();
        },
        remove_totals : function () {
            if( 1 == woocommerce_remove_updated_totals ) {
                $( '.woocommerce_message' ).remove();
            }
        },
        register_payment_update : function () {
        	$( '.payment_methods' ).live( 'change', function () {
        		 $( 'body' ).trigger( 'update_checkout' );
        	});
        },
        remove_first_checkout_button : function () {
        	$.each( $( '.checkout-button' ), function( index, value ) {
        		if( ! $( value ).hasClass( 'second-checkout-button' ) ) {
        			$( value ).hide();
        		}
        	});
        },
        show_no_delivery_time_string_control : function () {
        	$( '#lieferzeit_product_panel' ).live( 'change', function(){
        		if( 10 == $( '#lieferzeit_product_panel' ).val() ) {
            		$( '._no_delivery_time_string_field' ).show();
            	} else {
            		$( '._no_delivery_time_string_field' ).hide();
            	}
        	});
        },
        scale_unit_hint : function () {
        	if( 1 < $( '#woocommerce_attributes .toolbar' ).length )
        		$( '#woocommerce_attributes .toolbar' ).last().append( '<small>Sie können weitere Maßeinheiten unter <a href="' + woocommerce_product_attributes_url + '">Produkte &rarr; Attribute</a> anlegen.</small>' );
        }

    };
    $( document ).ready( function( $ ) { woocommerce_de.init(); } );
} )( jQuery );

I don't believe you need everything in here though.


Viewing all articles
Browse latest Browse all 104029

Trending Articles