To redirect from a certain product page in Shopify, you can follow these steps:
Note: Before making any changes to your Shopify store, it's always a good idea to create a backup or duplicate of your theme to avoid any potential issues.
{% assign product_ids_to_redirect = "ID1,ID2,ID3" | split: ',' %}
{% assign redirect_url = "URL_TO_REDIRECT_TO" %}
{% for p in product_ids_to_redirect %}
{% assign pr = p | plus: 0 %}
{% if pr == product.id %}
<script>
window.location.href = "{{ redirect_url }}";
</script>
{% endif %}
{% endfor %}
<!-- The rest of your regular product.liquid template code goes here -->
Replace "ID1,ID2,ID3" with a comma-separated list of the product IDs you want to redirect. For example: "123,456,789". Ensure that there are no spaces between the IDs. if you only want to redirect from one product page then simply use one product ID e.g. "123".
Replace 'URL_TO_REDIRECT_TO' with the actual URL where you want all products to redirect to.
Remember that this method requires basic knowledge of Liquid, the Shopify template language. If you're not comfortable with coding, consider seeking assistance from a Shopify expert or developer to implement the redirect for you. Additionally, when making changes to your store's code, always be cautious to avoid any unintentional issues.