0

class BS_Flooring_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View {

public function getBoSuaFlooringJsonConfig()
{
    $config = array();


    foreach ($this->getProduct()->getOptions() as $option) {
        /* @var $option Mage_Catalog_Model_Product_Option */
        $priceValue = 0;
       //Mage::log($option);
       if($option->getType()==Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD){
        $config['label'] = $option->getTitle();
        $config['sqinput'] = $option->getId();
       }

        if($option->getType()==Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO){
            $config['options'] = array();
            $count = 1;
            foreach ($option->getValues() as $_value) {
                $count++;
                $config['options'][] = array('id'=>"options_".$option->getId()."_".$count,'price'=>$_value->getPrice());

            }                   
       }
    }
    $config['coverage'] = $this->getProduct()->getFlooringCoverage();
    $config['id'] = $this->getProduct()->getId();
    $config['isflooring'] = $this->getProduct()->getIsFlooringProduct();
    $config['price'] = $this->getProduct()->getFinalPrice();        
    $config['prices'] = $this->getTierPrices($this->getProduct());
  return Mage::helper('core')->jsonEncode($config);
    }

}

Above code returns a array.

After uploading new theme file it stopped working what should i do???

0

You should adapt your new theme layout with the BS_Flooring extension layout. Normally by copying layout file and templates (you might need customization for templatrs) from old theme to the new one, this is supposing that new theme does not inherit from old one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.