Hide by country

  • Posts: 38
  • Thank you received: 0
  • Hikashop Multisite
4 months 3 weeks ago #346427

-- url of the page with the problem -- : www.gordonzello.com/tienda
-- HikaShop version -- : 4.6.2
-- Joomla version -- : 3.10.11

Hello, I need to hide the prices and the add to cart button for visits outside the Spanish territory, which is the only place where we sell on the web.

Please Log in or Create an account to join the conversation.

  • Posts: 78303
  • Thank you received: 12368
4 months 3 weeks ago #346429


When the user access the product page, he didn't yet enter his address. So the only way to know where he is from is with geolocation of his IP address. However, with more and more people using a VPN, this isn't accurate either.
Also, the geolocation plugin in HikaShop can get the country of the user based on his IP address, and it has a mechanism to restrict access to the whole website based on that country:
But that not what you want. In that case, you would have to use the geolocation plugin only to get the zone_id of the user in the user session. And then you could customize the different product views on the frontend to hide the price and add to cart button based on that value. So it's possible for a PHP developer with a few hours of development maximum but there is not one option you can just turn on to do it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum