WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Calculate Shipping form open on page load (6 posts)

  1. OneTwo Apparel
    Member
    Posted 1 year ago #

    Hi there,

    I'm currently trying to set up my own business website, and as the title says, when a customer loads the cart page on my website I would like the calculate shipping form to be already open because with the theme I am using, it isn't very obvious that it is there.

    If you don't understand what I'm talking about, the link to the problem page is: http://onetwoapparel.co.uk/cart/

    Any help is greatly appreciated!

    Thanks.

    http://wordpress.org/extend/plugins/woocommerce/

  2. IgniteWoo
    Member
    Posted 1 year ago #

    Put this in your cart page template:

    <script>
    jQuery( document ).ready( function() {
        jQuery( ".shipping-calculator-form" ).slideDown( 'fast' );
    })
    </script>
  3. OneTwo Apparel
    Member
    Posted 1 year ago #

    Thanks for your response.

    Would that be in the php file in the ftp here? Onetwoapparel.co.uk/wp-content/plugins/woocommerce/templates/cart

    I just tried it at the top of the cart.php file and it just broke the page.

    I'm a bit of a beginner!

    Thanks

  4. IgniteWoo
    Member
    Posted 1 year ago #

    cart.php would wind up looking like this:

    <script>
    jQuery( document ).ready( function() {
        jQuery( ".shipping-calculator-form" ).slideDown( 'fast' );
    })
    </script>
    <?php
    /**
     * Cart Page
     *
    
    [ BIG SNIP .....]
  5. OneTwo Apparel
    Member
    Posted 1 year ago #

    I have put that in now and unfortunately it hasn't worked, doesn't seem to have changed anything on the page at all.

    Any other suggestions?

    Thanks for your help!

  6. jnicol
    Member
    Posted 6 months ago #

    This is an old thread, I know, but for anyone looking to solve the same problem this can be done with CSS:

    .shipping-calculator-form {
    display: block !important;
    }

    The reason the suggested JS solution may not work is if WooCommerce's JS is being loaded after the inline JS (i.e. at the bottom of the page).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic