How to set product page as an index page?

Highlighted
New Member
5 0 0

I just need a single page from which I'm able to sell one single product. However I'm confused since I don't know how to do it. I'm not sure how I should link that one product to the index page because when I copy the code from product template I'll get some liquid error that product needs to be selected.

My website is : saul.sk

The product I'm trying to link: https://saul.sk/products/niekde-v-oblakoch-kazeta

Password: rimeog

0 Likes
Highlighted

You can try a Javascript redirect.

1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:

    <script>
    
    document.addEventListener("DOMContentLoaded", function() {
               window.location.href = "https://saul.sk/products/niekde-v-oblakoch-kazeta";
            });
    </script>



You can change the URL in the code above whenever you wish.
Please let me know whether it works.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Needing urgent help? I am currently available for hire, same day response guaranteed: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
New Member
5 0 0

Hey! I put the code to the theme.liquid but the problem is that the index page will show for a second, then it redirects to the product page and the product page keeps reloading all the time in a loop. Check the page out.

0 Likes