Disable URL Redirection When Clicking On Product Image on home page

Hi,

I am using the Prestige theme and would like to disable the URL redirection when clicking on the product image that’s on my home page. Rather than redirecting to the product page, I’d like for the product image to do nothing at all when clicking on it, i.e. I just want to remain on the same page.

Thanks!

Hello @ggbears2022

You can follow these steps:

  1. Go to Online Store->Theme->Edit code

  1. Open your theme.liquid file, paste the below code before

{%  if template contains 'index' %}
    
    
    {%  endif %}

I hope the above is useful to you.

Kind & Best regards,
GemPages Support Team

Hi @GemPages , thanks for the response. Unfortunately, the same issue is still persisting after adding the code. I’d appreciate any other potential solutions that you may have. Thanks!

Hello @ggbears2022 ,

Please share your store URL and password.
So that I will check and let you know the exact solution here.

Hi @f_malik , will this preview of our site suffice? https://k6pg6achah3p6wxi-68791861539.shopifypreview.com

thank you!

Hi @ggbears2022

Please follow these steps:

Go to Online Store > Theme > Edit Code, and find the assets folder. Then, please add the following code at the end of any JS file until the image link doesn’t work. Usually, that file is called theme.js:

setTimeout(() => {
  document.querySelector(".FeaturedProduct .FeaturedProduct__Gallery").style.pointerEvents = "none"
}, 1000)

I hope that it will work for you.

1 Like

EDIT:

Hi @BSS-Commerce , this worked!! Thanks so much for your help

1 Like

Hi, @BSS-Commerce I encounter the same problem that the it redirects to the home page when I click on the product page. How can I stop the redirect? I’m using Testament theme and couldn’t find the code in the JS file you mentioned above. Can you please help?