Tiny - Version 0.0.6

Version Notes

Importa Pedidos, Produtos e Acesso Pelo menu do Painel

Download this release

Release Info

Developer XDMIX.com.br
Extension Tiny
Version 0.0.6
Comparing to
See all releases


Code changes from version 0.0.5 to 0.0.6

app/code/local/Tiny/Iframe/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Tiny_Iframe>
5
- <version>0.0.4</version>
6
  </Tiny_Iframe>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Tiny_Iframe>
5
+ <version>0.0.6</version>
6
  </Tiny_Iframe>
7
  </modules>
8
  <global>
app/code/local/Tiny/Iframe/etc/system.xml CHANGED
@@ -3,7 +3,7 @@
3
  <tabs>
4
  <tinyt translate="label" module="tiny">
5
  <label>Tiny</label>
6
- <sort_order>350</sort_order>
7
  </tinyt>
8
  </tabs>
9
  <sections>
@@ -100,7 +100,7 @@
100
  <show_in_store>1</show_in_store>
101
  <fields>
102
  <extensions translate="label comment">
103
- <label>Versão 0.0.5</label>
104
  <frontend_type>select</frontend_type>
105
  <source_model>adminhtml/system_config_source_yesno</source_model>
106
  <sort_order>2</sort_order>
3
  <tabs>
4
  <tinyt translate="label" module="tiny">
5
  <label>Tiny</label>
6
+ <sort_order>250</sort_order>
7
  </tinyt>
8
  </tabs>
9
  <sections>
100
  <show_in_store>1</show_in_store>
101
  <fields>
102
  <extensions translate="label comment">
103
+ <label>Versão 0.0.6</label>
104
  <frontend_type>select</frontend_type>
105
  <source_model>adminhtml/system_config_source_yesno</source_model>
106
  <sort_order>2</sort_order>
app/code/local/Tiny/Pedidos/Model/Observer.php CHANGED
@@ -1,84 +1,84 @@
1
- <?php
2
-
3
- /*
4
- * Tiny Magento: Integration Module
5
- * Copyright (C) 2012 Tiny Software
6
- *
7
- * This program is free software: you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
- */
20
-
21
- require_once("config.php");
22
-
23
- class Tiny_Pedidos_Model_Observer {
24
-
25
- /**
26
- * O Magento irá passar a Varien_Event_Observer object como
27
- * o primeiro parâmetro de eventos despachados.
28
- */
29
-
30
- public function inserePedido(Varien_Event_Observer $observer) {
31
- if (INTEGRACAO_NA_CRIACAO_DO_PEDIDO_ATIVA == "S") {
32
- try {
33
- $orderId = $observer->getEvent()->getOrder()->getIncrementId();
34
- $this->exportarPedido($orderId);
35
- } catch(Exception $e) {
36
- }
37
- }
38
- }
39
-
40
- public function exportarPedido($num, $pedidoNota = "P") {
41
- try {
42
-
43
- $url = URL_TINY;
44
- $data = 'apiKey=' . APIKEY_TINY .'&tipo=' . $pedidoNota . '&numeroPedido=' . $num;
45
-
46
- $optional_headers = null;
47
- $params = array('http' => array('method' => 'POST', 'content' => $data));
48
- if ($optional_headers !== null) {
49
- $params['http']['header'] = $optional_headers;
50
- }
51
- $ctx = stream_context_create($params);
52
- $fp = @fopen($url, 'rb', false, $ctx);
53
- if (!$fp) {
54
- throw new Exception("Problema com $url, $php_errormsg");
55
- }
56
- $response = @stream_get_contents($fp);
57
- if ($response === false) {
58
- throw new Exception("Problema obtendo retorno de $url, $php_errormsg");
59
- }
60
- } catch(Exception $e) {
61
- }
62
- }
63
-
64
- public function inserePedidoPeloPagamento(Varien_Event_Observer $observer) {
65
- if (INTEGRACAO_NA_CRIACAO_DA_FATURA_ATIVA == "S") {
66
- try {
67
- $orderId = $observer->getPayment()->getOrder()->getIncrementId();
68
- $this->exportarPedido($orderId);
69
- } catch(Exception $e) {
70
- }
71
- }
72
- }
73
-
74
- public function inserePedidoPeloInvoice(Varien_Event_Observer $observer) {
75
- try {
76
- $order = $observer->getEvent()->getOrder();
77
- $orderId = $order->getRealOrderId();
78
- //$orderId = $observer->getPayment()->getOrder()->getIncrementId();
79
- $this->exportarPedido($orderId);
80
- } catch(Exception $e) {
81
- }
82
- }
83
- }
84
- ?>
1
+ <?php
2
+
3
+ /*
4
+ * Tiny Magento: Integration Module
5
+ * Copyright (C) 2013 Tiny Software
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ require_once("config.php");
22
+
23
+ class Tiny_Pedidos_Model_Observer {
24
+
25
+ /**
26
+ * O Magento irá passar a Varien_Event_Observer object como
27
+ * o primeiro parâmetro de eventos despachados.
28
+ */
29
+
30
+ public function inserePedido(Varien_Event_Observer $observer) {
31
+ if (INTEGRACAO_NA_CRIACAO_DO_PEDIDO_ATIVA == "S") {
32
+ try {
33
+ $orderId = $observer->getEvent()->getOrder()->getIncrementId();
34
+ $this->exportarPedido($orderId);
35
+ } catch(Exception $e) {
36
+ }
37
+ }
38
+ }
39
+
40
+ public function exportarPedido($num, $pedidoNota = "P") {
41
+ try {
42
+
43
+ $url = URL_TINY;
44
+ $data = 'apiKey=' . APIKEY_TINY .'&tipo=' . $pedidoNota . '&numeroPedido=' . $num;
45
+
46
+ $optional_headers = null;
47
+ $params = array('http' => array('method' => 'POST', 'content' => $data));
48
+ if ($optional_headers !== null) {
49
+ $params['http']['header'] = $optional_headers;
50
+ }
51
+ $ctx = stream_context_create($params);
52
+ $fp = @fopen($url, 'rb', false, $ctx);
53
+ if (!$fp) {
54
+ throw new Exception("Problema com $url, $php_errormsg");
55
+ }
56
+ $response = @stream_get_contents($fp);
57
+ if ($response === false) {
58
+ throw new Exception("Problema obtendo retorno de $url, $php_errormsg");
59
+ }
60
+ } catch(Exception $e) {
61
+ }
62
+ }
63
+
64
+ public function inserePedidoPeloPagamento(Varien_Event_Observer $observer) {
65
+ if (INTEGRACAO_NA_CRIACAO_DA_FATURA_ATIVA == "S") {
66
+ try {
67
+ $orderId = $observer->getPayment()->getOrder()->getIncrementId();
68
+ $this->exportarPedido($orderId);
69
+ } catch(Exception $e) {
70
+ }
71
+ }
72
+ }
73
+
74
+ public function inserePedidoPeloInvoice(Varien_Event_Observer $observer) {
75
+ try {
76
+ $order = $observer->getEvent()->getOrder();
77
+ $orderId = $order->getRealOrderId();
78
+ //$orderId = $observer->getPayment()->getOrder()->getIncrementId();
79
+ $this->exportarPedido($orderId);
80
+ } catch(Exception $e) {
81
+ }
82
+ }
83
+ }
84
+ ?>
app/code/local/Tiny/Pedidos/Model/config.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  * Tiny Magento: Integration Module
5
- * Copyright (C) 2012 Tiny Software
6
  *
7
  * This program is free software: you can redistribute it and/or modify
8
  * it under the terms of the GNU General Public License as published by
2
 
3
  /*
4
  * Tiny Magento: Integration Module
5
+ * Copyright (C) 2013 Tiny Software
6
  *
7
  * This program is free software: you can redistribute it and/or modify
8
  * it under the terms of the GNU General Public License as published by
app/code/local/Tiny/Pedidos/etc/config.xml CHANGED
@@ -2,14 +2,11 @@
2
  <config>
3
  <modules>
4
  <Tiny_Pedidos>
5
- <version>0.0.4</version>
6
  </Tiny_Pedidos>
7
  <Tiny_Pedidos_Pagos>
8
- <version>0.0.4</version>
9
  </Tiny_Pedidos_Pagos>
10
- <Tiny_Pedidos_Criacao_Invoice>
11
- <version>0.0.4</version>
12
- </Tiny_Pedidos_Criacao_Invoice>
13
  </modules>
14
  <global>
15
  <models>
@@ -22,11 +19,6 @@
22
  <class>Tiny_Pedidos_Model</class>
23
  </Tiny_Pedidos_Pagos>
24
  </models>
25
- <models>
26
- <Tiny_Pedidos_Criacao_Invoice>
27
- <class>Tiny_Pedidos_Model</class>
28
- </Tiny_Pedidos_Criacao_Invoice>
29
- </models>
30
  <events>
31
  <sales_model_service_quote_submit_success>
32
  <observers>
@@ -46,15 +38,6 @@
46
  </Tiny_Pedidos_Pagos>
47
  </observers>
48
  </sales_order_payment_pay>
49
- <sales_order_invoice_register>
50
- <observers>
51
- <Tiny_Pedidos_Criacao_Invoice>
52
- <class>Tiny_Pedidos/observer</class>
53
- <method>inserePedidoPeloInvoice</method>
54
- <type>singleton</type>
55
- </Tiny_Pedidos_Criacao_Invoice>
56
- </observers>
57
- </sales_order_invoice_register>
58
  </events>
59
  </global>
60
- </config>
2
  <config>
3
  <modules>
4
  <Tiny_Pedidos>
5
+ <version>0.0.6</version>
6
  </Tiny_Pedidos>
7
  <Tiny_Pedidos_Pagos>
8
+ <version>0.0.6</version>
9
  </Tiny_Pedidos_Pagos>
 
 
 
10
  </modules>
11
  <global>
12
  <models>
19
  <class>Tiny_Pedidos_Model</class>
20
  </Tiny_Pedidos_Pagos>
21
  </models>
 
 
 
 
 
22
  <events>
23
  <sales_model_service_quote_submit_success>
24
  <observers>
38
  </Tiny_Pedidos_Pagos>
39
  </observers>
40
  </sales_order_payment_pay>
 
 
 
 
 
 
 
 
 
41
  </events>
42
  </global>
43
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tiny</name>
4
- <version>0.0.5</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
@@ -14,8 +14,8 @@ Menu Tiny com janela para para o Sistema Tiny.</description>
14
  <notes>Importa Pedidos, Produtos e Acesso Pelo menu do Painel</notes>
15
  <authors><author><name>XDMIX.com.br</name><user>ClarckBR</user><email>clarck.1@gmail.com</email></author><author><name>tiny.com.br</name><user>marcosGrzeca</user><email>marcos@tiny.com.br</email></author></authors>
16
  <date>2013-02-06</date>
17
- <time>16:32:01</time>
18
- <contents><target name="magelocal"><dir name="Tiny"><dir name="Iframe"><dir name="Block"><dir name="Adminhtml"><file name="Tinybackend.php" hash="ecf98e41f9335db02d7a2b780017d355"/><file name="Tinybackendnew.php" hash="fe03059e072a3ac07d38be59035b7f0b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="89f964f9eae39d4b89861c4af449f27a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TinybackendController.php" hash="6730806216146eb04e89c12e8c757d6f"/><file name="TinybackendnewController.php" hash="6047fe80abd6eccd543ac5959fcc6bd1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f6d0d5eb762fa72b2c3acb17f0dce47b"/><file name="config.xml" hash="64b1fca863a5a89deb30d328cf7d652b"/><file name="system.xml" hash="ed00060dfe8aa2486944f1217f319744"/></dir></dir><dir name="Pedidos"><dir name="Model"><file name="Observer.php" hash="d796d6de1e7ce4e7d2e8c00932b7534c"/><file name="config.php" hash="8a8cc4325233b1a1ba18a38574360e97"/></dir><dir name="etc"><file name="config.xml" hash="6a88e63002cd008bd58bf6501cc2fd39"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tiny.xml" hash="335baf6004b5b0afe2d19f0a752bbec6"/></dir><dir name="template"><dir name="tiny"><file name="author.phtml" hash="698dc19d489c4e4db73e28a713eab07b"/><file name="tinybackend.phtml" hash="a52bca8a8b3f7de6281a1305476f5d28"/><file name="tinybackendnew.phtml" hash="3c76a75bb7adb8b7223c2faa331579a4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tiny.xml" hash="468d04f14f2ac16ee21d0cb863c10137"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tiny</name>
4
+ <version>0.0.6</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
14
  <notes>Importa Pedidos, Produtos e Acesso Pelo menu do Painel</notes>
15
  <authors><author><name>XDMIX.com.br</name><user>ClarckBR</user><email>clarck.1@gmail.com</email></author><author><name>tiny.com.br</name><user>marcosGrzeca</user><email>marcos@tiny.com.br</email></author></authors>
16
  <date>2013-02-06</date>
17
+ <time>19:32:52</time>
18
+ <contents><target name="magelocal"><dir name="Tiny"><dir name="Iframe"><dir name="Block"><dir name="Adminhtml"><file name="Tinybackend.php" hash="ecf98e41f9335db02d7a2b780017d355"/><file name="Tinybackendnew.php" hash="fe03059e072a3ac07d38be59035b7f0b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="89f964f9eae39d4b89861c4af449f27a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TinybackendController.php" hash="6730806216146eb04e89c12e8c757d6f"/><file name="TinybackendnewController.php" hash="6047fe80abd6eccd543ac5959fcc6bd1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f6d0d5eb762fa72b2c3acb17f0dce47b"/><file name="config.xml" hash="12f21b40609c3d5453b4d99f5bd38b5e"/><file name="system.xml" hash="99246fdaf2a1d1fe794af30b862de230"/></dir></dir><dir name="Pedidos"><dir name="Model"><file name="Observer.php" hash="5ef302545e20649861c0da6a8a4d8211"/><file name="config.php" hash="29b264e9c213923f236647113c90ee9c"/></dir><dir name="etc"><file name="config.xml" hash="2a05c8ed8fd3e676779783ae95687f5c"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="tiny.xml" hash="335baf6004b5b0afe2d19f0a752bbec6"/></dir><dir name="template"><dir name="tiny"><file name="author.phtml" hash="698dc19d489c4e4db73e28a713eab07b"/><file name="tinybackend.phtml" hash="a52bca8a8b3f7de6281a1305476f5d28"/><file name="tinybackendnew.phtml" hash="3c76a75bb7adb8b7223c2faa331579a4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tiny.xml" hash="468d04f14f2ac16ee21d0cb863c10137"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>