I am not sure if this was possible. I want to sell items in my magenta store but only allow access to the store if the traffic has come from a referring domain. I know that this is not full proof using http_referer but it will comply then with the brands conditions and mean that the store cannot be browsed directly. This needs to be more than just hiding the prices it also needs to hide the products.
I was initially thinking added a .htaccess file and if the domain referer is not correct then divert them to an error page, but wondered if there was an area I could add php to the top of the pages which will perform the redirects for me?
Or better still if there is another option to achieve what I am aiming for.
Solved! Go to Solution.
For your requirements you need to do something like this:
Hope that helps. Let me know if it doesn't.
Ok, let me guide you with this.
You can add your php code in Magento theme files.
Here are some suggestions:
You can choose options according to your requirements. If you are still confused then tell me the link which you share on another site with parameter.
Generally, the link for the Product Page or Homepage.