Option.php 2.37 KB
<?php
/**
 * @package  anc_image
 * @category magento
 * @mailto	code [at] netz.coop
 * @author	netz.coop eG* 
 * @copyright (c) 2014, netz.coop eG
 * 
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */ 
class Anc_Image_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option
        extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option
{
    /**
     * Class constructor
     */
    public function __construct()
    {
//		D::li('Anc_Image_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option');
        parent::__construct();
        $this->setTemplate('anc/image/catalog/product/edit/options/option.phtml');
    }
    /**
     * Retrieve html templates for different types of product custom options
     *	@eingabetyp_Redundanz
     * @return string
     */
    public function getTemplatesHtml()
    {
        $canEditPrice = $this->getCanEditPrice();
        $canReadPrice = $this->getCanReadPrice();
 
        $this->getChild('ancplaylist_option_type')
            ->setCanReadPrice($canReadPrice)
            ->setCanEditPrice($canEditPrice);
        $this->getChild('ancimage_option_type')
            ->setCanReadPrice($canReadPrice)
            ->setCanEditPrice($canEditPrice);
		$this->getChild('anctext_option_type')
            ->setCanReadPrice($canReadPrice)
            ->setCanEditPrice($canEditPrice);
        $this->getChild('ancaddressimport_option_type')
            ->setCanReadPrice($canReadPrice)
            ->setCanEditPrice($canEditPrice);				
		
        $templates = parent::getTemplatesHtml() . "\n" .
            $this->getChildHtml('ancplaylist_option_type').
			$this->getChildHtml('ancimage_option_type').
			$this->getChildHtml('anctext_option_type').
            $this->getChildHtml('ancaddressimport_option_type');
       return $templates;    
	} 
}