Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

Variable in inline block declaration to phtml

  1. #1
    New member
    Join Date
    Feb 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Variable in inline block declaration to phtml

    HI All,

    I have this problem that I posted on some sites as well but nobody answers.

    Well, I have an extension which is Custom PDF Invoice Plus. In magento, upon installing this extension, you can access the templates and you can design it accord to what you wish.

    There's only one problem. If you go to Sales->invoice, you will notice that under customer name is customer email and under customer email is the customer group. I have several customer group.

    If you click the Print custom PDF Plus it will load the template.

    In the PDF Template there's this var which is {{var customer_group_id}} and also in that template I created an inline block declaration like so

    Code:
    {{block type='core/template' area='frontend' template='pdf/statement.phtml'}}
    Then in this path I created the statement.phtml

    app/design/frontend/{nameSpace}/{theme}/template/pdf/statement.phtml

    Inside the statement.phtml I have this code

    Code:
    <?php
    	/*$b = $this->getCategoryId();echo $b;die();*/
    	$a = Mage::getModel('customer/group')->load(11)->getCustomerGroupCode();
    	echo $a;die();
    You can see that the load() has a value of 11.

    11 is the customer_group_id which I place there for testing purposes.

    I want the value of {{var customer_group_id}} placed inside that load({{IN HERE}})


    How do I do that?

    I need all the help that I can get.

    Thank You so much for all those who will help and for this forum.

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    156
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    On the off chance that you have effectively pronounced a square factor, it is adequate to pass the variable. An inline square is an unknown square called following instantiation.

  3. #3

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •