How to call block in phtml magento 1.9.*

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I need to make shipping -> "Pickup in store". But in shipping model we can't add enter image description here



how can we do it in payment?
I have Block/Stores.php and template shipment/stores.phtml, I want to add this template to available.phtml in this place



enter image description here



I succesfuly overrided the onepageshipping_methodavailable.phtml



enter image description here
and added enter image description here in my overrided available.phtml. But my stores.phtml doesn't joined.







share|improve this question




























    up vote
    1
    down vote

    favorite












    I need to make shipping -> "Pickup in store". But in shipping model we can't add enter image description here



    how can we do it in payment?
    I have Block/Stores.php and template shipment/stores.phtml, I want to add this template to available.phtml in this place



    enter image description here



    I succesfuly overrided the onepageshipping_methodavailable.phtml



    enter image description here
    and added enter image description here in my overrided available.phtml. But my stores.phtml doesn't joined.







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I need to make shipping -> "Pickup in store". But in shipping model we can't add enter image description here



      how can we do it in payment?
      I have Block/Stores.php and template shipment/stores.phtml, I want to add this template to available.phtml in this place



      enter image description here



      I succesfuly overrided the onepageshipping_methodavailable.phtml



      enter image description here
      and added enter image description here in my overrided available.phtml. But my stores.phtml doesn't joined.







      share|improve this question














      I need to make shipping -> "Pickup in store". But in shipping model we can't add enter image description here



      how can we do it in payment?
      I have Block/Stores.php and template shipment/stores.phtml, I want to add this template to available.phtml in this place



      enter image description here



      I succesfuly overrided the onepageshipping_methodavailable.phtml



      enter image description here
      and added enter image description here in my overrided available.phtml. But my stores.phtml doesn't joined.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 28 at 3:51









      Chintan Kaneriya

      1129




      1129










      asked Aug 28 at 2:56









      Sometimes Play

      82




      82




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You did not add .phtml in template call you should use



          <block type="shipment/stores" name="stores" template="shipment/stores.phtml"/>


          or you can call directly block code inside phtml at the place of $this->getChildHtml('stores').



          <?php echo $this->getlayout()->createBlock('shipment/stores')->setTemplate('shipment/stores.phtml')->toHtml();?>





          share|improve this answer






















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          • check in console is there any js error ?
            – Ansar Husain
            Aug 28 at 10:09










          • This error is coming because magento is not getting block shipment/stores
            – Ansar Husain
            Aug 28 at 10:39










          • can you share etc/config.xml file ?
            – Ansar Husain
            Aug 28 at 10:42










          • did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
            – Ansar Husain
            Aug 28 at 11:02

















          up vote
          1
          down vote













          Try this



          echo $this->getLayout()->createBlock('your/block')
          ->setTemplate('your/phtmlfile.phtml')->toHtml();





          share|improve this answer




















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f239794%2fhow-to-call-block-in-phtml-magento-1-9%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          You did not add .phtml in template call you should use



          <block type="shipment/stores" name="stores" template="shipment/stores.phtml"/>


          or you can call directly block code inside phtml at the place of $this->getChildHtml('stores').



          <?php echo $this->getlayout()->createBlock('shipment/stores')->setTemplate('shipment/stores.phtml')->toHtml();?>





          share|improve this answer






















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          • check in console is there any js error ?
            – Ansar Husain
            Aug 28 at 10:09










          • This error is coming because magento is not getting block shipment/stores
            – Ansar Husain
            Aug 28 at 10:39










          • can you share etc/config.xml file ?
            – Ansar Husain
            Aug 28 at 10:42










          • did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
            – Ansar Husain
            Aug 28 at 11:02














          up vote
          1
          down vote



          accepted










          You did not add .phtml in template call you should use



          <block type="shipment/stores" name="stores" template="shipment/stores.phtml"/>


          or you can call directly block code inside phtml at the place of $this->getChildHtml('stores').



          <?php echo $this->getlayout()->createBlock('shipment/stores')->setTemplate('shipment/stores.phtml')->toHtml();?>





          share|improve this answer






















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          • check in console is there any js error ?
            – Ansar Husain
            Aug 28 at 10:09










          • This error is coming because magento is not getting block shipment/stores
            – Ansar Husain
            Aug 28 at 10:39










          • can you share etc/config.xml file ?
            – Ansar Husain
            Aug 28 at 10:42










          • did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
            – Ansar Husain
            Aug 28 at 11:02












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You did not add .phtml in template call you should use



          <block type="shipment/stores" name="stores" template="shipment/stores.phtml"/>


          or you can call directly block code inside phtml at the place of $this->getChildHtml('stores').



          <?php echo $this->getlayout()->createBlock('shipment/stores')->setTemplate('shipment/stores.phtml')->toHtml();?>





          share|improve this answer














          You did not add .phtml in template call you should use



          <block type="shipment/stores" name="stores" template="shipment/stores.phtml"/>


          or you can call directly block code inside phtml at the place of $this->getChildHtml('stores').



          <?php echo $this->getlayout()->createBlock('shipment/stores')->setTemplate('shipment/stores.phtml')->toHtml();?>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 28 at 4:49









          Abdul

          7,4551834




          7,4551834










          answered Aug 28 at 4:44









          Ansar Husain

          790216




          790216











          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          • check in console is there any js error ?
            – Ansar Husain
            Aug 28 at 10:09










          • This error is coming because magento is not getting block shipment/stores
            – Ansar Husain
            Aug 28 at 10:39










          • can you share etc/config.xml file ?
            – Ansar Husain
            Aug 28 at 10:42










          • did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
            – Ansar Husain
            Aug 28 at 11:02
















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07










          • check in console is there any js error ?
            – Ansar Husain
            Aug 28 at 10:09










          • This error is coming because magento is not getting block shipment/stores
            – Ansar Husain
            Aug 28 at 10:39










          • can you share etc/config.xml file ?
            – Ansar Husain
            Aug 28 at 10:42










          • did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
            – Ansar Husain
            Aug 28 at 11:02















          If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
          – Sometimes Play
          Aug 28 at 10:07




          If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
          – Sometimes Play
          Aug 28 at 10:07












          check in console is there any js error ?
          – Ansar Husain
          Aug 28 at 10:09




          check in console is there any js error ?
          – Ansar Husain
          Aug 28 at 10:09












          This error is coming because magento is not getting block shipment/stores
          – Ansar Husain
          Aug 28 at 10:39




          This error is coming because magento is not getting block shipment/stores
          – Ansar Husain
          Aug 28 at 10:39












          can you share etc/config.xml file ?
          – Ansar Husain
          Aug 28 at 10:42




          can you share etc/config.xml file ?
          – Ansar Husain
          Aug 28 at 10:42












          did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
          – Ansar Husain
          Aug 28 at 11:02




          did you create block file Tsymbal_Shipment_Block_Stores ? and also did you check with flush cache ?
          – Ansar Husain
          Aug 28 at 11:02












          up vote
          1
          down vote













          Try this



          echo $this->getLayout()->createBlock('your/block')
          ->setTemplate('your/phtmlfile.phtml')->toHtml();





          share|improve this answer




















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07














          up vote
          1
          down vote













          Try this



          echo $this->getLayout()->createBlock('your/block')
          ->setTemplate('your/phtmlfile.phtml')->toHtml();





          share|improve this answer




















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07












          up vote
          1
          down vote










          up vote
          1
          down vote









          Try this



          echo $this->getLayout()->createBlock('your/block')
          ->setTemplate('your/phtmlfile.phtml')->toHtml();





          share|improve this answer












          Try this



          echo $this->getLayout()->createBlock('your/block')
          ->setTemplate('your/phtmlfile.phtml')->toHtml();






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 28 at 4:35









          Dinesh Yadav

          3,1671730




          3,1671730











          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07
















          • If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
            – Sometimes Play
            Aug 28 at 10:07















          If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
          – Sometimes Play
          Aug 28 at 10:07




          If I use it, the block "3 delivery options" is not opened in the checkout, I click the "Continue" button in the "2 sending information", but nothing happens.
          – Sometimes Play
          Aug 28 at 10:07

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f239794%2fhow-to-call-block-in-phtml-magento-1-9%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery