Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Any way to make the thumbnail non-clickable?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Any way to make the thumbnail non-clickable?

Tagged: thumbnail

  • This topic has 16 replies, 6 voices, and was last updated 9 years ago by admin.
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • Author
    Posts
  • June 25, 2011 at 3:34 pm #3655
    Jimmy
    Member

    My original image is the same size as the thumbnail so I don’t want people to be able to click it expecting to see a larger version.

    How would I remove the link or make the thumbnail non-clickable?

    Thanks very much,

    Jimmy

    June 26, 2011 at 12:10 am #33671
    wpCommerce
    Moderator

    You will have to tweak the code to do that.

    For Fancy1 and Fancy2 Display

    Open the “eStore_button_display_helper.php” file and look for the following line:

    $output .= '<a href="'.$ret_product->thumbnail_url.'" rel="lightbox" title="'.$ret_product->name.'"><img class="thumb-image" src="'.$thumb_img.'" alt="'.$ret_product->name.'" /></a>';

    Just take the link out so it is just a plain image. Basically make the above line look like the following:

    $output .= '<img class="thumb-image" src="'.$thumb_img.'" alt="'.$ret_product->name.'" />';

    For Rest of the Fancy Displays

    The rest of the fancy displays come from the extra shortcodes plugin so you need to modify that plugin. Open the “eStore_extra_product_display_helper.php” file from the eStore extra shortcodes plugin and search for the following line of code:

    $output .= '<div id="lightbox"><a href="'.$ret_product->thumbnail_url.'" rel="lightbox" title="'.$ret_product->name.'"><img src="'.$thumb_img.'" alt="'.$ret_product->name.'" /></a></div>';

    Once you find it change it to the following:

    $output .= '<img src="'.$thumb_img.'" alt="'.$ret_product->name.'" />';

    June 26, 2011 at 12:12 am #33672
    amin007
    Participant

    You can specify a URL value (the URL of this product page) in the “Thumbnail Target URL” field which will make it go to that product page and not the image itself. Let me know if that helps.

    June 26, 2011 at 6:26 pm #33673
    Jimmy
    Member

    Hey thanks very much for the help!

    I really appreciate it-

    Jimmy

    June 26, 2011 at 7:27 pm #33674
    Jimmy
    Member

    Doesn’t seem to be working-

    I changed the line in “eStore_button_display_helper.php” to this:

    $output .= ‘<img class=”thumb-image” src=”‘.$thumb_img.'” alt=”‘.$ret_product->name.'” />’;

    I’m still able to click the image.

    I even cleared my cache and disabled/re-enabled the plugin.

    The line that I changed is still there without the link part…

    one thing I noticed:

    At the top of the wordpress plugin editor it reads:

    Editing wp-cart-for-digital-products/eStore_button_display_helper.php (inactive)

    Does that (inactive) mean anything?

    Here’s a link to one of my product pages: [http://thingswitheyes.com/penguin-erasers]

    Thanks again,

    Jimmy

    June 26, 2011 at 11:56 pm #33675
    amin007
    Participant

    You are using fancy5 which comes from the extra shortcodes plugin so you need to modify a file from that plugin. I have updated wpCommerce’s post to cover both scenerios. Please take a look at the 2nd post in this thread.

    June 27, 2011 at 3:55 pm #33676
    Jimmy
    Member

    Thanks again for the help!

    That worked-

    Cheers!

    Jimmy

    July 9, 2013 at 3:28 am #33677
    Dan
    Member

    I”m using fancy 11 so I edited “eStore_extra_product_display_helper.php” as per instructions on second part of the second post on this thread but still see the popups.

    I noticed this post is over 2 yesrs old so has the code changrd at all?

    thanks

    July 9, 2013 at 11:55 pm #33678
    admin
    Keymaster

    Some of these fancy product templates were added later so they use a slightly different method.

    Do the following for fancy 10, 11, 12 and 13 to make the thumbnail not clickable.

    Open the “shortcode_include.php” file and search for the following line of code to find where the thumbnail images are being displayed:

    <img src="'.$thumb_img_src.'" alt="'.$ret_product->name.'" />

    Now, delete the full line and replace it with the following code (that will get rid of the link and only place the image by itself):

    $output .= '<img src="'.$thumb_img_src.'" alt="'.$ret_product->name.'" />';

    There will be multiple occurrences of this in the file so make sure to do the same for all of them.

    July 10, 2013 at 1:01 pm #33679
    Dan
    Member

    Hi,

    I just did this and it in all 4 occurrences but it caused an error 500 on my server so had to reinstall plugin.

    Can you please double check the code to make sure it’s sound.

    If that’s the case then It’s me who did something wrong.

    Thanks again

    July 10, 2013 at 1:19 pm #33680
    Dan
    Member

    yep. tried again but same issue.

    It was actually 6 ocurrences after all.

    Please advise.

    Thanks

    July 11, 2013 at 2:25 am #33681
    admin
    Keymaster

    I just tested the code and it works correctly, so some code is going wrong when you are tweaking it. I am going to give you another instruction which may work better.

    Open the “shortcode_include.php” file and go to the “show_wp_eStore_fancy11” function in that file.

    Now find the block of code between the following two lines:

    $output .= '<div class="eStore-thumbnail-fancy-11">';
    ......
    $output .= '</div>';

    Once you find that, replace it with the following:

    $output .= '<div class="eStore-thumbnail-fancy-11">';
    $output .= '<img src="'.$thumb_img_src.'" alt="'.$ret_product->name.'" />';
    $output .= '</div>';

    July 15, 2013 at 3:35 pm #33682
    Dan
    Member

    Worked perfectly.

    Thanks for all the support

    February 8, 2014 at 6:22 pm #33683
    celavi
    Member

    Hi all,

    Great information here… and these tweaks have helped me to remove the link to a product image that was the same size as the thumbnail.

    However, now I have a mix of products where some are just thumbnails that should not link to anything, while other products will need to link to a dedicated product page.

    Any solution for this situation?

    Thank you!

    February 8, 2014 at 11:03 pm #33684
    admin
    Keymaster

    When you change the code, it will do it for everything (not just for some products).

    Try using the following field of the product to specify a target URL for some products.

    Thumbnail Target URL

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ