Thanks,
maybe, this would be helpful for others:
function onAfterCalculateProductPriceForQuantity(&$product) {
$pc=$product->product_code;
$pctid=substr($pc,7,1);
if ($pctid=="B") {
$pcid=substr($pc, 0, 7);//family
$pcfid=substr($pc,-4);//style pack
$class = hikashop_get('class.cart');
if(!empty($product->cart_id)) {
$element = $class->get($product->cart_id,true,$product->cart_type);
foreach($element as &$value)
if ($value->product_code != $pc && substr($value->product_code,7,1)=="A" && substr($value->product_code,-4)==$pcfid) {
$product->prices[0]->price_value=$product->prices[0]->price_value*50/100;
}
}
}
}
Cheers,
Ralf