daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected function insertTotals($page, $source)
  2.     {
  3.         $order = $source->getOrder();
  4.         $totals = $this->_getTotalsList();
  5.         $lineBlock = ['lines' => [], 'height' => 15];
  6.         foreach ($totals as $total) {
  7.             echo "<pre>";print_r($total->getData());// I get custom row values here
  8.             $total->setOrder($order)->setSource($source);//But those get lost here
  9.    
  10. <?xml version="1.0"?>
  11. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/pdf_file.xsd">
  12.     <totals>
  13.         <total name="custfee">
  14.             <title translate="true">Custom Fee</title>
  15.             <font_size>7</font_size>
  16.             <display_zero>true</display_zero>
  17.             <sort_order>100</sort_order>
  18.         </total>
  19.     </totals>
  20. </config>
  21.    
  22. $total->setOrder($order)->setSource($source);
  23.    
  24. $total->getOrder()->getData(); // Order data
  25. $total->getSource()->getData(); // Invoice data
  26. //Get specific data from total object
  27. $total->getSourceField();
  28. $total->getSortOrder();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top