Magento's $_weeeHelper->typeOfDisplay() Method

magento, php

Solution

Well, maybe this is a partial answer...

In CE 1.3.3.0, there does appear to be a value for `4`.

class Mage_Weee_Model_Config_Source_Display
{

    public function toOptionArray()
    {
        return array(
            array('value'=>0, 'label'=>Mage::helper('weee')->__('Including FPT only')),
            array('value'=>1, 'label'=>Mage::helper('weee')->__('Including FPT and FPT description [excl. FPT VAT]')),
            array('value'=>4, 'label'=>Mage::helper('weee')->__('Including FPT and FPT description [incl. FPT VAT]')),
            array('value'=>2, 'label'=>Mage::helper('weee')->__('Excluding FPT, FPT description, final price')),
            array('value'=>3, 'label'=>Mage::helper('weee')->__('Excluding FPT')),
        );
    }

}

Problem

I'm investigating Magento's infamous price block/`price.phtml` file, and I've run into something that looks like a bug and/or abandoned code path, but I'd like to run it by the community first to make sure I understand what's happening. Throughout this file, Magento will use the following method in conditional calls ``` $_weeeHelper->typeOfDisplay($_product, 0) $_weeeHelper->typeOfDisplay($_product, 1) $_weeeHelper->typeOfDisplay($_product, 4) $_weeeHelper->typeOfDisplay($_product, 2) ``` From what my code tracing has gathered, this method (as called) ultimately compares the second paramater with one of two configuration values. Either ``` Tax -> Fixed Product Taxes -> Display Prices On Product View Page Tax -> Fixed Product Taxes -> Display Prices In Product Lists ``` depending on the current context. If we're on a product page, it's the first. Otherwise, it assumes a product list page. (and "on a product page" means there's a value set in `Mage::registry('current_product')`). This is all well and good except for the following call ``` $_weeeHelper->typeOfDisplay($_product, 4) ``` The only possible values for these configuration fields are 0 - 3. There is no "4". So, first question: Does the above accurately describe the behavior of the `typeOfDisplay` method? (assuming `null` for the `$zone` paramater) Second question: If so, were there (or are there) versions of Magento where a value of "4" was stored in either the ``` Tax -> Fixed Product Taxes -> Display Prices In Product Lists Tax -> Fixed Product Taxes -> Display Prices On Product View Page ``` field?

Original source