Jump to content

Hide cart & prices from specific countries


Recommended Posts

Good day everyone,

 

I would appreciate some help with my store.

 

I need to hide the cart and prices from some specific countries (distributor issues). Visitors from those countries should continue to have accessible to browse all the products though.

 

How can I do that from the backoffice?

 

Thanks~

Link to comment
Share on other sites

The problem is, prestashop won't know where a person is from prior to having it sill the address box. SO, you either need a geolocation module, and tie it into a customer group modification that binds the current visitor to a customer group prices are hidden for, or a totally custom solution. You can start by having a look at eTiendas, by El Patron ;)

Link to comment
Share on other sites

Hi,

 

You can hide Price and Add to Cart button with IP address country.

Previous I hide some product with ip address country.

 

I have used this code for get country

 

$ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/".$ip));
 
and check $details->country in database for prohibited country and make some custom code in CategoryController.php and ProductController.php file
Link to comment
Share on other sites

×
×
  • Create New...