Fatal error: Call to a member function setTemplate() on a non-object in












0















path: appcodelocalBhtechDesigner
inside this folder all other folder Block, Controller



config.xml



<?xml version="1.0"?>
<config>
<modules>
<Bhtech_Designer>
<version>0.1.0</version>
</Bhtech_Designer>
</modules>
<frontend>
<routers>
<routeurfrontend>
<use>standard</use>
<args>
<module>Bhtech_Designer</module>
<frontName>designer</frontName>
</args>
</routeurfrontend>
</routers>
<layout>
<updates>
<bhtech_designer>
<file>bhtech_designer.xml</file>
</bhtech_designer>
</updates>
</layout>
</frontend>
<global>
<blocks>
<bhtech_designer>
<class>Bhtech_Designer_Block</class>
</bhtech_designer>
</blocks>
</global>
</config>


indexController.php



<?php
class Bhtech_Designer_IndexController extends Mage_Core_Controller_Front_Action
{
protected function _initAction()
{
$this->loadLayout();
$this->renderLayout();
return $this;
}
public function indexAction()
{
$block = $this->getLayout()->createBlock('bhtech/designer');
$block->setTemplate('designer/designer.phtml');
echo $block->toHtml();
//Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

}
}


Block
designer.php



<?php
class Bhtech_Designer_Block_Designer extends Mage_Core_Block_Template
{
// Methods (optional)
}
?>


designer.xml



<?xml version="1.0" ?>
<!-- Root node for Magento layout configuration -->
<layout version="0.1.0">
<!--Page handle -->
<designer_index_view>
<!-- reference tag specifies the block where we a going to add child block -->
<reference name="content">
<!-- Our page content block -->
<block type="bhtech/designer" name="designer" template="design.phtml"></block>
</reference>
</designer_index_view>
</layout>


path: appdesignfrontendbhtechdesigner
inside this folder layout and template folders are placed



layout.xml



<block type="bhtech/designer" template="bhtech/designer.phtml">
<action method="setData">
<key>area</key>
<value>frontend</value>
</action>
</block>


but I still getting error my magento version 1.9
please help me out if there any details document or example of this please give me that. I'm just trying to load a complete new template for a page.










share|improve this question
















bumped to the homepage by Community 42 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    path: appcodelocalBhtechDesigner
    inside this folder all other folder Block, Controller



    config.xml



    <?xml version="1.0"?>
    <config>
    <modules>
    <Bhtech_Designer>
    <version>0.1.0</version>
    </Bhtech_Designer>
    </modules>
    <frontend>
    <routers>
    <routeurfrontend>
    <use>standard</use>
    <args>
    <module>Bhtech_Designer</module>
    <frontName>designer</frontName>
    </args>
    </routeurfrontend>
    </routers>
    <layout>
    <updates>
    <bhtech_designer>
    <file>bhtech_designer.xml</file>
    </bhtech_designer>
    </updates>
    </layout>
    </frontend>
    <global>
    <blocks>
    <bhtech_designer>
    <class>Bhtech_Designer_Block</class>
    </bhtech_designer>
    </blocks>
    </global>
    </config>


    indexController.php



    <?php
    class Bhtech_Designer_IndexController extends Mage_Core_Controller_Front_Action
    {
    protected function _initAction()
    {
    $this->loadLayout();
    $this->renderLayout();
    return $this;
    }
    public function indexAction()
    {
    $block = $this->getLayout()->createBlock('bhtech/designer');
    $block->setTemplate('designer/designer.phtml');
    echo $block->toHtml();
    //Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

    }
    }


    Block
    designer.php



    <?php
    class Bhtech_Designer_Block_Designer extends Mage_Core_Block_Template
    {
    // Methods (optional)
    }
    ?>


    designer.xml



    <?xml version="1.0" ?>
    <!-- Root node for Magento layout configuration -->
    <layout version="0.1.0">
    <!--Page handle -->
    <designer_index_view>
    <!-- reference tag specifies the block where we a going to add child block -->
    <reference name="content">
    <!-- Our page content block -->
    <block type="bhtech/designer" name="designer" template="design.phtml"></block>
    </reference>
    </designer_index_view>
    </layout>


    path: appdesignfrontendbhtechdesigner
    inside this folder layout and template folders are placed



    layout.xml



    <block type="bhtech/designer" template="bhtech/designer.phtml">
    <action method="setData">
    <key>area</key>
    <value>frontend</value>
    </action>
    </block>


    but I still getting error my magento version 1.9
    please help me out if there any details document or example of this please give me that. I'm just trying to load a complete new template for a page.










    share|improve this question
















    bumped to the homepage by Community 42 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      path: appcodelocalBhtechDesigner
      inside this folder all other folder Block, Controller



      config.xml



      <?xml version="1.0"?>
      <config>
      <modules>
      <Bhtech_Designer>
      <version>0.1.0</version>
      </Bhtech_Designer>
      </modules>
      <frontend>
      <routers>
      <routeurfrontend>
      <use>standard</use>
      <args>
      <module>Bhtech_Designer</module>
      <frontName>designer</frontName>
      </args>
      </routeurfrontend>
      </routers>
      <layout>
      <updates>
      <bhtech_designer>
      <file>bhtech_designer.xml</file>
      </bhtech_designer>
      </updates>
      </layout>
      </frontend>
      <global>
      <blocks>
      <bhtech_designer>
      <class>Bhtech_Designer_Block</class>
      </bhtech_designer>
      </blocks>
      </global>
      </config>


      indexController.php



      <?php
      class Bhtech_Designer_IndexController extends Mage_Core_Controller_Front_Action
      {
      protected function _initAction()
      {
      $this->loadLayout();
      $this->renderLayout();
      return $this;
      }
      public function indexAction()
      {
      $block = $this->getLayout()->createBlock('bhtech/designer');
      $block->setTemplate('designer/designer.phtml');
      echo $block->toHtml();
      //Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

      }
      }


      Block
      designer.php



      <?php
      class Bhtech_Designer_Block_Designer extends Mage_Core_Block_Template
      {
      // Methods (optional)
      }
      ?>


      designer.xml



      <?xml version="1.0" ?>
      <!-- Root node for Magento layout configuration -->
      <layout version="0.1.0">
      <!--Page handle -->
      <designer_index_view>
      <!-- reference tag specifies the block where we a going to add child block -->
      <reference name="content">
      <!-- Our page content block -->
      <block type="bhtech/designer" name="designer" template="design.phtml"></block>
      </reference>
      </designer_index_view>
      </layout>


      path: appdesignfrontendbhtechdesigner
      inside this folder layout and template folders are placed



      layout.xml



      <block type="bhtech/designer" template="bhtech/designer.phtml">
      <action method="setData">
      <key>area</key>
      <value>frontend</value>
      </action>
      </block>


      but I still getting error my magento version 1.9
      please help me out if there any details document or example of this please give me that. I'm just trying to load a complete new template for a page.










      share|improve this question
















      path: appcodelocalBhtechDesigner
      inside this folder all other folder Block, Controller



      config.xml



      <?xml version="1.0"?>
      <config>
      <modules>
      <Bhtech_Designer>
      <version>0.1.0</version>
      </Bhtech_Designer>
      </modules>
      <frontend>
      <routers>
      <routeurfrontend>
      <use>standard</use>
      <args>
      <module>Bhtech_Designer</module>
      <frontName>designer</frontName>
      </args>
      </routeurfrontend>
      </routers>
      <layout>
      <updates>
      <bhtech_designer>
      <file>bhtech_designer.xml</file>
      </bhtech_designer>
      </updates>
      </layout>
      </frontend>
      <global>
      <blocks>
      <bhtech_designer>
      <class>Bhtech_Designer_Block</class>
      </bhtech_designer>
      </blocks>
      </global>
      </config>


      indexController.php



      <?php
      class Bhtech_Designer_IndexController extends Mage_Core_Controller_Front_Action
      {
      protected function _initAction()
      {
      $this->loadLayout();
      $this->renderLayout();
      return $this;
      }
      public function indexAction()
      {
      $block = $this->getLayout()->createBlock('bhtech/designer');
      $block->setTemplate('designer/designer.phtml');
      echo $block->toHtml();
      //Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

      }
      }


      Block
      designer.php



      <?php
      class Bhtech_Designer_Block_Designer extends Mage_Core_Block_Template
      {
      // Methods (optional)
      }
      ?>


      designer.xml



      <?xml version="1.0" ?>
      <!-- Root node for Magento layout configuration -->
      <layout version="0.1.0">
      <!--Page handle -->
      <designer_index_view>
      <!-- reference tag specifies the block where we a going to add child block -->
      <reference name="content">
      <!-- Our page content block -->
      <block type="bhtech/designer" name="designer" template="design.phtml"></block>
      </reference>
      </designer_index_view>
      </layout>


      path: appdesignfrontendbhtechdesigner
      inside this folder layout and template folders are placed



      layout.xml



      <block type="bhtech/designer" template="bhtech/designer.phtml">
      <action method="setData">
      <key>area</key>
      <value>frontend</value>
      </action>
      </block>


      but I still getting error my magento version 1.9
      please help me out if there any details document or example of this please give me that. I'm just trying to load a complete new template for a page.







      magento-1.9 module magento-1 template custom






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 2 '16 at 13:41









      Raphael at Digital Pianism

      53.8k20118272




      53.8k20118272










      asked Dec 2 '16 at 13:36









      DhimanDhiman

      1




      1





      bumped to the homepage by Community 42 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 42 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          In your config.xml your blocks name is not properly declared, you need to replace:



          <global>
          <blocks>
          <bhtech_designer>
          <class>Bhtech_Designer_Block</class>
          </bhtech_designer>
          </blocks>
          </global>


          With:



          <global>
          <blocks>
          <bhtech>
          <class>Bhtech_Designer_Block</class>
          </bhtech>
          </blocks>
          </global>





          share|improve this answer
























          • @Dhiman feel free to mark your question as answered so it will benefit for others

            – Raphael at Digital Pianism
            Dec 3 '16 at 8:51











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f148622%2ffatal-error-call-to-a-member-function-settemplate-on-a-non-object-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          In your config.xml your blocks name is not properly declared, you need to replace:



          <global>
          <blocks>
          <bhtech_designer>
          <class>Bhtech_Designer_Block</class>
          </bhtech_designer>
          </blocks>
          </global>


          With:



          <global>
          <blocks>
          <bhtech>
          <class>Bhtech_Designer_Block</class>
          </bhtech>
          </blocks>
          </global>





          share|improve this answer
























          • @Dhiman feel free to mark your question as answered so it will benefit for others

            – Raphael at Digital Pianism
            Dec 3 '16 at 8:51
















          0














          In your config.xml your blocks name is not properly declared, you need to replace:



          <global>
          <blocks>
          <bhtech_designer>
          <class>Bhtech_Designer_Block</class>
          </bhtech_designer>
          </blocks>
          </global>


          With:



          <global>
          <blocks>
          <bhtech>
          <class>Bhtech_Designer_Block</class>
          </bhtech>
          </blocks>
          </global>





          share|improve this answer
























          • @Dhiman feel free to mark your question as answered so it will benefit for others

            – Raphael at Digital Pianism
            Dec 3 '16 at 8:51














          0












          0








          0







          In your config.xml your blocks name is not properly declared, you need to replace:



          <global>
          <blocks>
          <bhtech_designer>
          <class>Bhtech_Designer_Block</class>
          </bhtech_designer>
          </blocks>
          </global>


          With:



          <global>
          <blocks>
          <bhtech>
          <class>Bhtech_Designer_Block</class>
          </bhtech>
          </blocks>
          </global>





          share|improve this answer













          In your config.xml your blocks name is not properly declared, you need to replace:



          <global>
          <blocks>
          <bhtech_designer>
          <class>Bhtech_Designer_Block</class>
          </bhtech_designer>
          </blocks>
          </global>


          With:



          <global>
          <blocks>
          <bhtech>
          <class>Bhtech_Designer_Block</class>
          </bhtech>
          </blocks>
          </global>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 2 '16 at 13:40









          Raphael at Digital PianismRaphael at Digital Pianism

          53.8k20118272




          53.8k20118272













          • @Dhiman feel free to mark your question as answered so it will benefit for others

            – Raphael at Digital Pianism
            Dec 3 '16 at 8:51



















          • @Dhiman feel free to mark your question as answered so it will benefit for others

            – Raphael at Digital Pianism
            Dec 3 '16 at 8:51

















          @Dhiman feel free to mark your question as answered so it will benefit for others

          – Raphael at Digital Pianism
          Dec 3 '16 at 8:51





          @Dhiman feel free to mark your question as answered so it will benefit for others

          – Raphael at Digital Pianism
          Dec 3 '16 at 8:51


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f148622%2ffatal-error-call-to-a-member-function-settemplate-on-a-non-object-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          What other Star Trek series did the main TNG cast show up in?

          Berlina muro

          Berlina aerponto