Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1140836
    Starlord999
    Participant

    Small request today. Can you let me how to go about changing the text that is overlayed on the products on the category page. It currently reads “details” but actually acts as an add to cart. You can see it at http://www.bayatticv2.com/product-category/robert-kelsey-greeting-cards/.

    Thanks in advance.
    David

    #1140904
    Rue Nel
    Moderator

    Hello David,

    Thanks for writing in! To resolve this issue and change the text from “details” to something else, please insert this following code in your child theme’s functions.php file.

    add_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text', 50 );
    function woo_archive_custom_cart_button_text() {
      return __( 'Add to my Basket', 'woocommerce' );
    }

    We would loved to know if this has work for you. Thank you.

    #1141084
    Starlord999
    Participant

    I am afraid that did not work, any other ideas?

    David

    #1141090
    Rue Nel
    Moderator

    Hello David,

    Thanks for the updates! The code previously given should have work because I have tested it first before giving the solutions to you. To better assist you with regards to this issue, would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password
    – FTP Hostname
    – FTP Username
    – FTP Password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1141100
    Starlord999
    Participant
    This reply has been marked as private.
    #1141107
    Rue Nel
    Moderator

    Hello There,

    Thank you for the very detailed information. Actually the given code is working. It turns out that you have added this JS code:

    (function($){
    	$('a.button.product_type_simple').html('Details');
    })(jQuery)

    And this is one big reason why it is showing “Details” and not the desired text you want to place it to display within the button. Please remove this JS code from you customizer, Appearance > Customize > Custom > JS and see the result.

    Please let us know how it goes.

    #1141137
    Starlord999
    Participant

    Sorry about that, I feel stupid, forgot I had added that.
    All fixed now, thanks for the help.

    David

    #1141144
    Rue Nel
    Moderator

    Hey David,

    No Worries and you are most welcome! We’re happy to help you out.
    If you need anything else we can help you with, don’t hesitate to open another thread.

    Best Regards.

  • <script> jQuery(function($){ $("#no-reply-1140836 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>