I assume that you have already created a different type of client for wholesale and retail clients in the administration area.
In this case, it is very simple to add this functionality to the model.
Open
catalog/model/catalog/products.php
On or around line 22, you will see a line that looks like this:
$query->row['price'] = ($query->row['discount'] ? $query->row['discount'] : $query->row['price']);
Determine the numerical value of your retail customer, let's say that it is 1, and wholesale customers - 2.
The $customer_group_id variable used below is pre-set when the getProduct() method is getProduct() .
Replace the previous line as follows:
if ($customer_group_id == 2): $query->row['price'] = ($query->row['discount'] ? $query->row['discount'] : $query->row['price']); else: $query->row['price'] = ($query->row['discount'] ? $query->row['discount'] : $query->row['retail_price']); endif;
Now, if your customer is logged in and is not a wholesale customer or not logged in, he will see the retail price, if they log in as a wholesale customer, they will see the wholesale price.
source share