[Resolved] modify the image of the products.

Home Forums Support [Resolved] modify the image of the products.

Home Forums Support modify the image of the products.

  • This topic has 7 replies, 2 voices, and was last updated 4 years ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1248298
    Pablo

    Hello, how are you? Thank you so much for your help.

    I need these three things and I can’t find them in the paperwork.

    https://www.opticaalcudia.com/producto/belt/

    1.The image of the product that is rectangular.

    2-That it does not increase in size when the mouse passes over it.

    3- And that you can’t click on the image (otherwise it gets bigger and doesn’t work for me)

    Thank you very much.

    #1248547
    Leo
    Staff
    Customer Support

    Hi there,

    Not too sure what you mean in #1 but this should help for #2 and #3

    add_action( 'wp', 'tu_remove_wc_zoom', 20 );
    function tu_remove_wc_zoom() {
        remove_theme_support( 'wc-product-gallery-zoom' );
        remove_theme_support( 'wc-product-gallery-lightbox' );
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1248778
    Pablo

    Hello. How are you? Thank you very much.
    The zoo doesn’t work anymore. Now I need:

    1- Modify the size of the image. For example 350 x 200 pixels.

    2- I want to remove this: If you put the mouse over the image a name “Hoodie-with-Logo-2.jpg” appears and if you click, the image becomes big. I want to remove these two things from the products.

    Thank you

    #1249473
    Leo
    Staff
    Customer Support

    1. The image size is handled by the WooCommerce plugin itself:
    https://docs.woocommerce.com/document/fixing-blurry-product-images/

    You might also find the Product IMage Area Width option helpful:
    https://docs.generatepress.com/article/woocommerce-overview/#single-product

    2. Replace the previous snippet with this one:

    function remove_image_zoom_support() {
        remove_theme_support( 'wc-product-gallery-zoom' );
        remove_theme_support( 'wc-product-gallery-lightbox' );
    }
    add_action( 'wp', 'remove_image_zoom_support', 100 );
    #1249571
    Pablo

    That code doesn’t work. It doesn’t do anything.

    A hug.

    #1249994
    Leo
    Staff
    Customer Support

    Try this:

    add_filter('woocommerce_single_product_image_thumbnail_html','wc_remove_link_on_thumbnails' );
     
    function wc_remove_link_on_thumbnails( $html ) {
         return strip_tags( $html,'<img>' );
    }
    #1250513
    Pablo

    Hello. How are you?

    Still not working. You can still click on the image and your name will also appear if you put the mouse over the image.

    #1251648
    Leo
    Staff
    Customer Support

    Hi there,

    I actually try the snippets above:
    https://www.screencast.com/t/pJdvQ8MWT

    And it’s working for me with Prime:
    https://wordpress-202309-991531.cloudwaysapps.com/?product=cap

    Can you make sure both code are added with the correct methods?
    https://docs.generatepress.com/article/adding-php/

    your name will also appear if you put the mouse over the image.

    I don’t believe it’s possible to remove that though – this is handled by WooCommerce so you might need to check with their support.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.