Easy_PDF_Invoice_Custom_Variables - Version 1.0.0.9

Version Notes

- Allow to define variable which relate to product attribute
- Allow to define variable which relate to customer attribute
- Allow to define static values

Download this release

Release Info

Developer Magento Core Team
Extension Easy_PDF_Invoice_Custom_Variables
Version 1.0.0.9
Comparing to
See all releases


Code changes from version 1.0.0.8 to 1.0.0.9

app/code/community/VES/PdfProCustomVariables/Model/Observer.php CHANGED
@@ -122,12 +122,12 @@ class VES_PdfProCustomVariables_Model_Observer
122
  case 'date':
123
  if(isset($availableAttributes[$attributeInfo->getAttributeCode()])) {
124
  $date = $product->getData($attributeInfo->getAttributeCode());
125
- $dateFormated = new Varien_Object(array(
126
- 'full' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)),
127
- 'long' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG)),
128
- 'medium' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM)),
129
- 'short' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)),
130
- ));
131
  $itemProduct->setData($data['name'],$dateFormated);
132
  }else {
133
  $itemProduct->setData($data['name'],'');
122
  case 'date':
123
  if(isset($availableAttributes[$attributeInfo->getAttributeCode()])) {
124
  $date = $product->getData($attributeInfo->getAttributeCode());
125
+ $dateFormated = $date?new Varien_Object(array(
126
+ 'full' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)),
127
+ 'long' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG)),
128
+ 'medium' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM)),
129
+ 'short' => Mage::app()->getLocale()->date(strtotime($date))->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)),
130
+ )):'';
131
  $itemProduct->setData($data['name'],$dateFormated);
132
  }else {
133
  $itemProduct->setData($data['name'],'');
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Easy_PDF_Invoice_Custom_Variables</name>
4
- <version>1.0.0.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL V3.0</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@
12
  - Allow to define variable which relate to customer attribute&#xD;
13
  - Allow to define static values</notes>
14
  <authors><author><name>Easy PDF Invoice</name><user>auto-converted</user><email>easypdfinvoice@gmail.com</email></author></authors>
15
- <date>2014-03-07</date>
16
- <time>17:04:56</time>
17
- <contents><target name="mageetc"><dir name="modules"><file name="VES_PdfProCustomVariables.xml" hash="f13346f67bbae21fdb87a393a4663ea5"/></dir></target><target name="magecommunity"><dir name="VES"><dir name="PdfProCustomVariables"><dir name="Block"><dir name="Adminhtml"><dir name="Pdfprocustomvariables"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="3870bf494d27ac725fdf0277bcaff17e"/><file name="Intergration.php" hash="236d9e8f74e88befcc05a3d848a8ae56"/></dir><file name="Form.php" hash="1f87d9ee6ce3df463f027ff96aae6cda"/><file name="Tabs.php" hash="1261d8486ffd5c6f41af7e97ddbd56e8"/></dir><file name="Edit.php" hash="25810b8c5ca254c10a0e981e1639e7b9"/><file name="Grid.php" hash="2f8f5025bb9df25d4c2a473821fd74fe"/></dir><file name="Pdfprocustomvariables.php" hash="91f8d4310da8f8da46c6a142e5b38738"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2aba96822fcc8fb043792d40baa2e90a"/><file name="Image.php" hash="091cb7db9e1959e6dd307f8db2b25ba1"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Pdfprocustomvariables"><file name="Collection.php" hash="96ce5d49fee8ca2e52164714a42a9b28"/></dir><file name="Pdfprocustomvariables.php" hash="4718330435a78a6313914cb5e062d3d7"/></dir><file name="Observer.php" hash="aa42d2a3165fcbccef469cb670da7784"/><file name="Pdfprocustomvariables.php" hash="8d2d970597d131ed6ee19bb69d541308"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="VariablesController.php" hash="4db0fd48751f42f539c6e1cbd6a95276"/></dir></dir><dir name="etc"><file name="config.xml" hash="6950bfaf8df8473302c460041002f970"/></dir><dir name="sql"><dir name="pdfprocustomvariables_setup"><file name="mysql4-install-1.0.0.php" hash="203b4b818ccba7bd2107ae1047192b42"/><file name="mysql4-upgrade-1.0.0-1.0.0.1.php" hash="05564671ba8ea3cad6c07202921f1b5a"/><file name="mysql4-upgrade-1.0.0.1-1.0.0.2.php" hash="a036e5b1226ff5bfcdf8181ac983b5e0"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ves_pdfprocustomvariables.xml" hash="347f0604dabbc274177ab47b06587cf3"/></dir><dir name="template"><dir name="ves_pdfprocustomvariables"><file name="intergrationcode.phtml" hash="a0e8686b6585304a99313fe3f7f7cb83"/></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies/>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Easy_PDF_Invoice_Custom_Variables</name>
4
+ <version>1.0.0.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL V3.0</license>
7
  <channel>community</channel>
12
  - Allow to define variable which relate to customer attribute&#xD;
13
  - Allow to define static values</notes>
14
  <authors><author><name>Easy PDF Invoice</name><user>auto-converted</user><email>easypdfinvoice@gmail.com</email></author></authors>
15
+ <date>2014-09-05</date>
16
+ <time>03:40:33</time>
17
+ <contents><target name="mageetc"><dir name="modules"><file name="VES_PdfProCustomVariables.xml" hash="f13346f67bbae21fdb87a393a4663ea5"/></dir></target><target name="magecommunity"><dir name="VES"><dir name="PdfProCustomVariables"><dir name="Block"><dir name="Adminhtml"><dir name="Pdfprocustomvariables"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="3870bf494d27ac725fdf0277bcaff17e"/><file name="Intergration.php" hash="236d9e8f74e88befcc05a3d848a8ae56"/></dir><file name="Form.php" hash="1f87d9ee6ce3df463f027ff96aae6cda"/><file name="Tabs.php" hash="1261d8486ffd5c6f41af7e97ddbd56e8"/></dir><file name="Edit.php" hash="25810b8c5ca254c10a0e981e1639e7b9"/><file name="Grid.php" hash="2f8f5025bb9df25d4c2a473821fd74fe"/></dir><file name="Pdfprocustomvariables.php" hash="91f8d4310da8f8da46c6a142e5b38738"/></dir></dir><dir name="Helper"><file name="Data.php" hash="2aba96822fcc8fb043792d40baa2e90a"/><file name="Image.php" hash="091cb7db9e1959e6dd307f8db2b25ba1"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Pdfprocustomvariables"><file name="Collection.php" hash="96ce5d49fee8ca2e52164714a42a9b28"/></dir><file name="Pdfprocustomvariables.php" hash="4718330435a78a6313914cb5e062d3d7"/></dir><file name="Observer.php" hash="3f59f094a12de2543798c4c1a5546390"/><file name="Pdfprocustomvariables.php" hash="8d2d970597d131ed6ee19bb69d541308"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="VariablesController.php" hash="4db0fd48751f42f539c6e1cbd6a95276"/></dir></dir><dir name="etc"><file name="config.xml" hash="6950bfaf8df8473302c460041002f970"/></dir><dir name="sql"><dir name="pdfprocustomvariables_setup"><file name="mysql4-install-1.0.0.php" hash="203b4b818ccba7bd2107ae1047192b42"/><file name="mysql4-upgrade-1.0.0-1.0.0.1.php" hash="05564671ba8ea3cad6c07202921f1b5a"/><file name="mysql4-upgrade-1.0.0.1-1.0.0.2.php" hash="a036e5b1226ff5bfcdf8181ac983b5e0"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ves_pdfprocustomvariables.xml" hash="347f0604dabbc274177ab47b06587cf3"/></dir><dir name="template"><dir name="ves_pdfprocustomvariables"><file name="intergrationcode.phtml" hash="a0e8686b6585304a99313fe3f7f7cb83"/></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies/>
20
  </package>