-
AuthorPosts
-
March 10, 2015 at 1:38 pm #224497
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=0Is 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=0Thanks!
MikeMarch 10, 2015 at 3:22 pm #224574Hi 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!
March 10, 2015 at 3:52 pm #224599I 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=0March 10, 2015 at 3:57 pm #224602I 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,
MikeMarch 10, 2015 at 10:29 pm #224763Hi 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
March 11, 2015 at 5:59 am #224955Thanks, I will do that. I appreciate your help.
March 11, 2015 at 8:09 am #225024You’re always welcome.
-
AuthorPosts