WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] how to remove this button from add to cart and checkout (12 posts)

  1. saadat68
    Member
    Posted 1 year ago #

    Hi
    I want to remove this button from add to cart and checkout pages
    I Show that in this image, please see :
    http://i45.tinypic.com/nvb4eb.jpg

    can you help me to remove that ?

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

  2. royho
    Member
    Posted 1 year ago #

    Hmmm your theme seems to have modified that because I believe by default it is "View Cart" and not "Continue Shopping". So the URL would be different.

    But the file that outputs this is in messages.php of your template files. It is dynamically generated based on context so you might need to backtrace to the source. Back if you want a fast simple fix, just simply use CSS to hide it...

  3. royho
    Member
    Posted 1 year ago #

    Or perhaps you have the "go to checkout when add to cart is click" enabled is why you're seeing "continue shopping" instead of "view cart".

  4. saadat68
    Member
    Posted 1 year ago #

    Thank you royho
    I enabled "go to checkout when add to cart is click" so this massage show in checkout page

    I check messages.php file but I cant edit it

    can someone help me ? I want a code that remove "Continue Shopping" button

    messages.php :

    <?php
    /**
     * Show messages
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! $messages ) return;
    ?>
    
    <?php foreach ( $messages as $message ) : ?>
    	<div class="woocommerce_message"><?php echo $message; ?></div>
    <?php endforeach; ?>
  5. royho
    Member
    Posted 1 year ago #

    Here is a filter you might be able to use -> "post_updated_messages" (not tested) or simply just hide it with CSS as I mentioned above. But only hide it if there are no other viable solutions. Use

    .woocommerce_message a.button {display:none;}
  6. saadat68
    Member
    Posted 1 year ago #

    thanks royho but can you say where paste this code ?
    I attached messages.php source code above. can you edit that for me ?

    thanks a lot

  7. royho
    Member
    Posted 1 year ago #

    The code I provided is pasted in your theme CSS file.

  8. saadat68
    Member
    Posted 1 year ago #

    oh its bad - I cant edit css file
    is there a cod for messages.php that dont show this Message ?

    anybody can help me to edit messages.php file that dont show this message ?

  9. saadat68
    Member
    Posted 1 year ago #

    I delete all codes in messages.php and I think do that
    The message deleted from checkout page

    is this way correct ?

  10. royho
    Member
    Posted 1 year ago #

    Not sure why you can't edit CSS file? No you should not delete all codes in the messages.php file as you'll lose other messages you may need. You're only trying to remove the button, not the message as you stated.

  11. saadat68
    Member
    Posted 1 year ago #

    I check all process and there is no any problem
    other messages have been show like :
    your cart is empty
    First Name is a required field.
    and ...

    that is working

    I dont edit css because Im noob and I cant

    thanks royho for helping

  12. Jeff Smith
    Member
    Posted 1 year ago #

    saadat68 - Install this Custom CSS plugin: http://wordpress.org/extend/plugins/pc-custom-css/

    Activate it and paste royho's code ( .woocommerce_message a.button {display:none;} ) into the text field it offers in the admin panel.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.