• Resolved pollypieces

    (@pollypieces)


    I need to change the button on both products to say learn more and lead to the actual product rather than “add to cart” and “select options” as they are now. The first is a simple product and the second variable but it makes no sense to me to have buy now or add to cart at this level. They can’t even see the product description at this point. Is this a settings issue or just the default setting and how do I change it please_. There is a styling issue with the add to cart button also as you can see a black box behind it. Please advise

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support B C. a11n

    (@battouly)

    Hi there!

    I need to change the button on both products to say learn more and lead to the actual product rather than “add to cart” and “select options” as they are now.

    This is not a default feature of WooCommerce, but it can be accomplished with a free plugin. There are different plugins that can change the label, but here is the WooCommerce doc and plugin recommendation: https://docs.woocommerce.com/document/change-add-to-cart-button-text/

    Thread Starter pollypieces

    (@pollypieces)

    But will this just change the button text or the destination url also? I need to be able to change both

    • This reply was modified 3 years, 10 months ago by pollypieces.
    Plugin Support Senff – a11n

    (@senff)

    Hi @pollypieces

    The solution explained earlier will only change the text of the buttons, not the destination URL.

    If you prefer your customers to not be able to add a product to the cart right from the Shop page, you may just want to remove the button from there. If that sounds like an option, go into your site’s admin Dashboard and select Appearance → Customize →?Additional CSS. In the CSS textbox on the left, add the following code:

    .woocommerce ul.products li.product .button {
      display: none;
    }

    Select “Publish” from the top, and your changes will be applied to your site.

    Thread Starter pollypieces

    (@pollypieces)

    Thank you @senff but two questions
    1) Will that not remove it from the main product page also, obviously I want them to buy at some point
    2) Is there any way to replace it on the shop page with a see more button rather than just have the photo as the link?

    • This reply was modified 3 years, 10 months ago by pollypieces.
    Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hi @pollypieces!

    1) Will that not remove it from the main product page also, obviously I want them to buy at some point

    Yes, that is correct.

    Is there any way to replace it on the shop page with a see more button rather than just have the photo as the link?

    The below custom code will do exactly what you are looking for. You can install the Snippet plugin and put the code there.

    add_filter( 'woocommerce_loop_add_to_cart_link', 'replacing_add_to_cart_button', 10, 2 );
    function replacing_add_to_cart_button( $button, $product  ) {
        $button_text = __("See more", "woocommerce");
        $button = '<a class="button" href="' . $product->get_permalink() . '">' . $button_text . '</a>';
    
        return $button;
    }

    Thanks!

    Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hello @pollypieces,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread. I hope the above code snippet solved the problem.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I change the button to learn more on products’ is closed to new replies.