Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #783043
    n00kie
    Participant

    Hi everyone!
    This might have been discussed many times before and I did find a lot of topics, but I am still having issues.
    I am very new to site building and this is not I am focusing really much, I just need a working website.
    Please check out my website- http://www.choku.dk
    In the SHOP area I have 5 Choku Fishes. When you move mouse cursor on the product you can click on it and it will then transfer you to a single product page. I don’t want to have. I don’t need those single product pages at all. Is there a way to remove that link from everywhere? Problem is also when you add a product to the basket, you ca also click on this product in the basket and then it will transfer you to a single product page again.
    Could you please explain me in detail how to remove that?
    All the help is very much appreciated!
    Thank you!
    BR/
    Vadim.

    #783549
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    If you do that, user won’t able to add to cart some of your products (product that has read more).

    But if you insist, you can add this code at Admin > Appearance > Customizer > Custom > Javascript

    jQuery( function( $ ) {
    
    $('.entry-product .entry-featured a, .entry-product .entry-header a[href!="/?add-to-cart="], .woocommerce-cart .shop_table.shop_table_responsive.cart a').on( 'click', function(e) { e.preventDefault(); } );
    
    } );

    Thanks.

    #783961
    n00kie
    Participant

    Thank you very much! I will try this one!
    Just one thing, products that have READ MORE, actually are so because they are out of stock. That is the reason it is READ MORE instead of ADD TO BASKET. So is there a way to write OUT OF STOCK instead of READ MORE?

    #783975
    n00kie
    Participant

    Thanks for the code it works great for now!
    Now if there would have been a way to change the text from READ MORE to OUT OF STOCK, that would be awesome !
    Thank you very much once again!

    #784113
    Thai
    Moderator

    Hi There,

    Your website is under construction.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / password

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

    Thanks.

    #784250
    n00kie
    Participant
    This reply has been marked as private.
    #784252
    n00kie
    Participant

    this is the picture

    #784573
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates!

    To change the text from READ MORE to OUT OF STOCK, because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme first. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Return out of stock instead of read more
    // =============================================================================
    function out_of_stock_text(){
      global $product, $woocommerce;
    
      $text = $product->is_purchasable() && $product->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Out of Stock', 'woocommerce' );
    
      return $text;
    }
    add_filter('woocommerce_product_add_to_cart_text', 'out_of_stock_text');
    // =============================================================================

    When you are in the cart and CART is empty there is a button- RETURN TO THE SHOP. When you click on it it goes to the shop. I tried to change it so that it goes back to the homepage, but there is something going wrong. Could you please make it so that it just goes to the homepage?
    Again this needs to be change using a child theme. Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Return to the home page instead of shop is cart is empty
    // =============================================================================
    function return_to_home(){
      return home_url();
    }
    add_filter('woocommerce_return_to_shop_redirect', 'return_to_home');
    // =============================================================================

    If having a child theme is a long process and you are hesitant enough to install it, as an alternative, you can simply add the following JS code in your customizer, Appearance > Customize > Custom > JAVASCRIPT to change the text from READ MORE to OUT OF STOCK.

    (function($){
      $(document).ready(function(){
        $('.woocommerce .product.outofstock .entry-header .button').each(function(){
          $(this).text('Out of Stock');
        });
      });
    })(jQuery);

    The download file in your homepage is because you added a video player element. You forgot to insert the video source and this is why it is showing an error message “Download file”. You need to supply the correct video source file to resolve this issue.
    http://prntscr.com/a0ds5j

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

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