Mage_Tax_Model_Config をオーバーライドして、特定の顧客グループに対して異なる税金設定を行います。PDFドキュメントを除いて、すべてがうまくいきました。
$customer->getGroupId() で現在の顧客グループ ID を確認しました。$customer は Mage::helper('customer')->getCustomer(); です。
これが PDF ドキュメントで機能しないのはなぜですか? 詳細については、オーバーライド クラスを参照してください。
public function displaySalesPricesInclTax($store = null)
{
$customer = Mage::helper('customer')->getCustomer();
if ($customer->getGroupId() > 1) {
return false;
} else {
return true;
}
}
public function displaySalesPricesExclTax($store = null)
{
$customer = Mage::helper('customer')->getCustomer();
if ($customer->getGroupId() > 1) {
return true;
} else {
return false;
}
}