Magento – let Amasty Order Attributes appear on SNM PDF Print invoice

One of our most commonly used extensions are certainly the Order Attributes of Amasty and PDF-Print Extension of SNM Portal.

Now we have the case, and we would have the order attributes on the documents, created PDF Print.

PictureIn the order confirmation, this still was relatively easy, if you set in the configuration of Order Attributes, that the attributes should appear on the documents. In the statement, however, this was not.

Now…it is possible. but needs some handles, to let appear the attribute and it is also optically adjust.

  1. we wear the document e.g.. in the text following the table following line code:
    {{block type='amorderattr/sales_order_print_attributes' area='frontend' order=$order }}

    This ensures later for the output of the data.

  2. From Magento 1.9 must be given to the block, the permission, that he may be issued. Therefore we wear under System > permissions > Block a new block and allow the output. The code for this is amorderattr / sales_order_print_attributes
  3. This is still not enough. Now the attributes of the issue itself must be allowed. For this we go into the respective order attribute (Sales > Manage Order Attributes) and there set two drop-downs on “Ja”: 1. Visible in Frontend (unfortunately necessary) and 2. Include Into PDF Documents. Now the block with the attributes should already appear.
  4. This is nice but not. One can now provide with some CSS adjustments for, that the code looks good (most directly in the configuration of PDF Print) print.phtml work and or in the. This way we have gone, there were fundamental changes for us. We wanted that the attributes just appeared on the document as e.g.. the method of payment or delivery. Therefore, we have the print.phtml in the template folder app / design / frontend /[Template]/default / template / amasty / amorderattr copied and adapted there. We have the H2 heading away, the table as well and can now print the name of the attribute fat and connect the content directly.
  5. So it works well and looks good.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

2 comments on “Magento – let Amasty Order Attributes appear on SNM PDF Print invoice”

  1. This article actually helps me quite well, but if I follow the instructions, the block appears several times to me, as if it were looping.
    Where can the error be here?
    I only have the following for the test according to your instructions “Text in front of the table” eingebaut:
    {{block type=’amorderattr/sales_order_print_attributes’ area=’frontend’ order=$order }}
    Why is there a loop here?? In the print.phtml no loop is visible for the block.

    1. I just noticed, that the behavior is even more absurd:
      I have now inserted the block again (so a second time), this time below the table.
      Now the first block is only displayed once, but the one below the table continues two times. How does that come and you know the problem?

      The dirty solution is CSS and display:none

      Maybe you can also address the variables individually? or just go the block?

Leave a Reply

Your email address will not be published. Required fields are marked *