The VirtueMart forums are full of complaints like:
When a shopper from my wholesale group (50% off) opens the product page it shows the parent products discounted price as the price of each child. Any help would be appreciated.
So, here's the much awaited fix!
Open /administrator/components/com_virtuemart/classes/ps_product.php.
Locate function get_price (around line 1586, depending on version)
Locate in the function the comment:
// If this is a child product and it has not a price for the requested shopper group, get the price for the default shopper group
In the line below:
$price=$this->getPriceByShopperGroup($product_parent_id,$GLOBALS['vendor_info'][$vendor_id]['default_shopper_group_id'],
$check_multiple_prices,$volume_quantity_sql);
Replace $product_parent_id with $product_id to get this line at the end:
$price=$this->getPriceByShopperGroup($product_id,$GLOBALS['vendor_info'][$vendor_id]['default_shopper_group_id'],
$check_multiple_prices,$volume_quantity_sql);
Works for me!