Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #224497

    Michael M
    Participant

    Hi,
    I added this snippet to my x functions php:

    add_action( ‘woocommerce_before_cart_table’, ‘woo_add_continue_shopping_button_to_cart’ );

    function woo_add_continue_shopping_button_to_cart() {
    $shop_page_url = get_permalink( woocommerce_get_page_id( ‘shop’ ) );
    echo ‘<div class=”woocommerce-message”>’;
    echo ‘ Continue Shopping → Need some more products?’;
    echo ‘</div>’;
    }

    and the “Continue Shopping” button looks like this:
    https://www.dropbox.com/s/spwemh6lcrlgxg8/Screenshot%202015-03-10%2014.36.46.png?dl=0

    Is there anything I can do to make it look like the rest of my buttons?
    Like This: https://www.dropbox.com/s/4hum6276aq47sxf/Screenshot%202015-03-10%2014.37.53.png?dl=0

    Thanks!
    Mike

    #224574

    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    You could customize the button using Customizer’s Custom CSS

    for example:

    .woocommerce-message{
    /* CSS propoerty Customization*/
    }

    Hope it helps.

    Cheers!

    #224599

    Michael M
    Participant

    I added it…but still the button created from the snippet shown above shows up like this?
    https://www.dropbox.com/s/y40hfx9o7xnxb10/Screenshot%202015-03-10%2016.50.21.png?dl=0

    #224602

    Michael M
    Participant

    I am using the snippet above just to get a “continue shopping” button to show up in the “cart” when I enter the cart other than adding a product. In other words, the “continue shopping” button shows up when I add a product and an directed to the cart, but if I click the “card” menu link, there is no “continue shopping” button, and the customer has no intuitive way out.
    Thanks for any advice you can offer,
    Mike

    #224763

    Rue Nel
    Moderator

    Hi Mike,

    To change the button to something similar to the rest of your buttons, try adding this code in the customizer, Appearance > Customize > Custom > CSS

    .woocommerce-message a.button,
    .woocommerce-message a.button:hover {
        text-decoration: none;
        margin-top: -4px;
        padding: 4px 10px;
        border: solid 1px #000;
    }

    Please remove ‘→’ from snippet that you have added. To resolve your issue that the snippet you added will also appear in your cart, our best advice is to checkout the Woocommerce support. They can surely provide you with the exact hook names, filters and conditions that will apply in your case.

    Thank you for understanding.

    X

    #224955

    Michael M
    Participant

    Thanks, I will do that. I appreciate your help.

    #225024

    Thai
    Moderator

    You’re always welcome.