veeqo_bridge - Version 0.1.2

Version Notes

Minor fixes

Download this release

Release Info

Developer Veeqo
Extension veeqo_bridge
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/community/Veeqo/Bridge/Model/Installer.php CHANGED
@@ -56,7 +56,7 @@ class Veeqo_Bridge_Model_Installer
56
  }
57
 
58
  // Download the file from remote server to temporary file
59
- $destinationFilePath = $dest_dir . DIRECTORY_SEPARATOR . $tmp_filename;
60
  $client = new Varien_Http_Client($remote_url, array('keepalive' => true));
61
  $client ->setUri($remote_url)->setMethod('GET');
62
  $response = $client->request();
@@ -68,17 +68,17 @@ class Veeqo_Bridge_Model_Installer
68
  $fp = fopen($destinationFilePath, 'w');
69
  file_put_contents($destinationFilePath, $response->getBody());
70
  fclose($fp);
71
-
72
  // return the error message if download failed
73
  if (!file_exists($destinationFilePath)) {
74
  $result['status'] = 0;
75
  $result['message'] = $this->__("Can't download the file from server.");
76
  return $result;
77
  }
78
-
79
  // Unzip temporary file to destination directory
80
  try {
81
-
82
  $filter = new Zend_Filter_Decompress(array('adapter' =>
83
  'Zend_Filter_Compress_Zip', 'options' => array('target' => $mage_root, )));
84
  $filter->filter($destinationFilePath);
@@ -93,13 +93,13 @@ class Veeqo_Bridge_Model_Installer
93
  else
94
  {
95
  $xml_response = simplexml_load_string($body);
96
- $msg = 'Error code '.$xml_response->return_code.' - '.$xml_response->return_message;
97
  $result['status'] = 0;
98
  $result['message'] = $this->__($msg);
99
  return $result;
100
  }
101
  }
102
-
103
  return $result;
104
  }
105
 
@@ -108,7 +108,7 @@ class Veeqo_Bridge_Model_Installer
108
  $validation_url = Mage::helper('veeqo')->getValidationUrl();
109
 
110
  $result = array('status' => null);
111
-
112
  if (!$download_url) {
113
  $result['error_messages'] = $this->__('Bridge2CartUrl Download Url is empty');
114
  return $result;
@@ -138,7 +138,7 @@ class Veeqo_Bridge_Model_Installer
138
  "application/json;charset=UTF-8");
139
 
140
  $response = $client->request();
141
- $body = $response->getRawBody();
142
 
143
  $result = Mage::helper('core')->jsonDecode($body);
144
  $result['status'] = $response->getStatus();
56
  }
57
 
58
  // Download the file from remote server to temporary file
59
+ $destinationFilePath = $dest_dir . DIRECTORY_SEPARATOR . $tmp_filename;
60
  $client = new Varien_Http_Client($remote_url, array('keepalive' => true));
61
  $client ->setUri($remote_url)->setMethod('GET');
62
  $response = $client->request();
68
  $fp = fopen($destinationFilePath, 'w');
69
  file_put_contents($destinationFilePath, $response->getBody());
70
  fclose($fp);
71
+
72
  // return the error message if download failed
73
  if (!file_exists($destinationFilePath)) {
74
  $result['status'] = 0;
75
  $result['message'] = $this->__("Can't download the file from server.");
76
  return $result;
77
  }
78
+
79
  // Unzip temporary file to destination directory
80
  try {
81
+
82
  $filter = new Zend_Filter_Decompress(array('adapter' =>
83
  'Zend_Filter_Compress_Zip', 'options' => array('target' => $mage_root, )));
84
  $filter->filter($destinationFilePath);
93
  else
94
  {
95
  $xml_response = simplexml_load_string($body);
96
+ $msg = 'Error code '.$xml_response->return_code.' - '.$xml_response->return_message;
97
  $result['status'] = 0;
98
  $result['message'] = $this->__($msg);
99
  return $result;
100
  }
101
  }
102
+
103
  return $result;
104
  }
105
 
108
  $validation_url = Mage::helper('veeqo')->getValidationUrl();
109
 
110
  $result = array('status' => null);
111
+
112
  if (!$download_url) {
113
  $result['error_messages'] = $this->__('Bridge2CartUrl Download Url is empty');
114
  return $result;
138
  "application/json;charset=UTF-8");
139
 
140
  $response = $client->request();
141
+ $body = $response->getBody();
142
 
143
  $result = Mage::helper('core')->jsonDecode($body);
144
  $result['status'] = $response->getStatus();
app/design/adminhtml/default/default/template/veeqo/veeqo.phtml CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- $btn_title = $this->__('Install Script');
3
- $text = $this->__('<p>Thank you for installing the Veeqo Magento Extension!</p><p>To complete the link between Magento and Veeqo you need to do the following:</p><ul><li>(1) Sign up for a free account on <a href="http://Veeqo.com" target="_blank" title="Veeqo">Veeqo.com</a></li><li>(2) Create Magento sales channel in Veeqo</li><li>(3) Copy the special URL Veeqo gives you after creating the sales channel and paste it in the field below and press "Install".</li><li>(4) All done, Veeqo will start syncing your products and orders, the first time might take 30 minutes</li></ul>');
4
- if (Mage::helper('veeqo')->getBridge2CartUrl()) {
5
- $btn_title = $this->__('Re-Install/Update Script');
6
- $text = $this->__('<p>Magento and Veeqo already connected</p><p>Your Magento store is already connected to <a href="http://Veeqo.com" target="_blank" title="Veeqo">Veeqo.com</a> and you do not need to do anything on this page.</p>');
7
- }
8
- ?>
9
- <div class="content-header">
10
- <table cellspacing="0">
11
- <tr>
12
- <td><h3 class="head-veeqo"><?php echo $this->__('Veeqo Bridge') ?></h3></td>
13
- </tr>
14
- </table>
15
- </div>
16
- <div class="veeqo-container">
17
- <div id="veeqo_messages"><?php echo $text?></div>
18
- <div class="veeqo_uploader">
19
- <form id="veeqo_install_form" method="post" action="<?php echo Mage::helper("adminhtml")->getUrl('veeqo/adminhtml_install/index')?>">
20
- <div>
21
- <input type="hidden" value="<?php echo $this->getFormKey()?>" name="form_key"/>
22
- </div>
23
- <div class="fieldset ">
24
- <div class="label">
25
- <label for="bridge2cart_url"><?php echo $this->__('Bridge2Cart Download Url')?>: </label>
26
- </div>
27
- <div class="value">
28
- <input id="bridge2cart_url" type="text" name="download_url" class="input-text required-entry validate-url" value="<?php echo Mage::helper('veeqo')->getBridge2CartUrl()?>"/>
29
- </div>
30
- </div>
31
- <div class="actions">
32
- <button id="bridge2cart_run" class="scalable" style="" onclick="installForm.submit();" type="button" title="<?php echo $btn_title?>">
33
- <span><span><span><?php echo $btn_title?></span></span></span>
34
- </button>
35
- </div>
36
- </form>
37
- </div>
38
- <script type="text/javascript">
39
- Validation.add('validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function(v) {
40
- v = (v || '').replace(/^\s+/, '').replace(/\s+$/, '');
41
- return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(v)
42
- });
43
- var installForm = new varienForm('veeqo_install_form', '');
44
- </script>
45
  </div>
1
+ <?php
2
+ $btn_title = $this->__('Install Script');
3
+ $text = $this->__('<p>Thank you for installing the Veeqo Magento Extension!</p><p>To complete the link between Magento and Veeqo you need to do the following:</p><ul><li>(1) Sign up for a free account on <a href="http://Veeqo.com" target="_blank" title="Veeqo">Veeqo.com</a></li><li>(2) Create Magento sales channel in Veeqo</li><li>(3) Copy the special URL Veeqo gives you after creating the sales channel and paste it in the field below and press "Install".</li><li>(4) All done, Veeqo will start syncing your products and orders, the first time might take 30 minutes</li></ul>');
4
+ if (Mage::helper('veeqo')->getBridge2CartUrl()) {
5
+ $btn_title = $this->__('Re-Install/Update Script');
6
+ $text = $this->__('<p>Magento and Veeqo already connected</p><p>Your Magento store is already connected to <a href="http://Veeqo.com" target="_blank" title="Veeqo">Veeqo.com</a> and you do not need to do anything on this page.</p>');
7
+ }
8
+ ?>
9
+ <div class="content-header">
10
+ <table cellspacing="0">
11
+ <tr>
12
+ <td><h3 class="head-veeqo"><?php echo $this->__('Veeqo Bridge') ?></h3></td>
13
+ </tr>
14
+ </table>
15
+ </div>
16
+ <div class="veeqo-container">
17
+ <div id="veeqo_messages"><?php echo $text?></div>
18
+ <div class="veeqo_uploader">
19
+ <form id="veeqo_install_form" method="post" action="<?php echo Mage::helper("adminhtml")->getUrl('veeqo/adminhtml_install/index')?>">
20
+ <div>
21
+ <input type="hidden" value="<?php echo $this->getFormKey()?>" name="form_key"/>
22
+ </div>
23
+ <div class="fieldset ">
24
+ <div class="label">
25
+ <label for="bridge2cart_url"><?php echo $this->__('Bridge2Cart Download Url')?>: </label>
26
+ </div>
27
+ <div class="value">
28
+ <input id="bridge2cart_url" type="text" name="download_url" class="input-text required-entry validate-url" value="<?php echo Mage::helper('veeqo')->getBridge2CartUrl()?>"/>
29
+ </div>
30
+ </div>
31
+ <div class="actions">
32
+ <button id="bridge2cart_run" class="scalable" style="" onclick="installForm.submit();" type="button" title="<?php echo $btn_title?>">
33
+ <span><span><span><?php echo $btn_title?></span></span></span>
34
+ </button>
35
+ </div>
36
+ </form>
37
+ </div>
38
+ <script type="text/javascript">
39
+ Validation.add('validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function(v) {
40
+ v = (v || '').replace(/^\s+/, '').replace(/\s+$/, '');
41
+ return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(v)
42
+ });
43
+ var installForm = new varienForm('veeqo_install_form', '');
44
+ </script>
45
  </div>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>veeqo_bridge</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -19,11 +19,11 @@
19
  &lt;li&gt;Download orders from Amazon and Magento to manage them all in one place and use advance tools like tags and custom filters &lt;/li&gt;&#xD;
20
  &lt;li&gt;Works with barcode scanners to search for products&lt;/li&gt;&#xD;
21
  &lt;li&gt; Beautiful to look at and very easy to use &lt;/li&gt;</description>
22
- <notes>minor fixes</notes>
23
  <authors><author><name>Veeqo</name><user>Veeqo</user><email>helpme@veeqo.com</email></author></authors>
24
- <date>2014-02-04</date>
25
- <time>16:24:25</time>
26
- <contents><target name="magecommunity"><dir><dir name="Veeqo"><dir name="Bridge"><dir name="Block"><dir name="Adminhtml"><file name="Veeqo.php" hash="715b2aa2ad291b4410fe9575ae593a77"/></dir></dir><dir name="Helper"><file name="Data.php" hash="11cc7e2958d7545424b4c94226e9bc5a"/></dir><dir name="Model"><file name="Installer.php" hash="a402167b5bb9981f0b65a97f5a7b0b5e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="44cf0afc6fda8f333fc7b9bac068896a"/><file name="InstallController.php" hash="896718b4d7df17ec2a04cc18318b5281"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5c0990f04a9dc2bdc17f1379ffd692da"/><file name="config.xml" hash="c43361fb57bd00c066d9abbb93de8ff0"/></dir></dir></dir></dir></target><target name="mage"><dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Veeqo_Bridge.xml" hash="b0020889060ad13cd00142fef74e8479"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="veeqo.xml" hash="cdd078a0e10be1d457ae3d8af723fea2"/></dir><dir name="template"><dir name="veeqo"><file name="veeqo.phtml" hash="5ac132fa5e2047feedf0b0a658307924"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="veeqo"><dir name="css"><file name="styles.css" hash="62c1eb55527467abd31c531561537352"/></dir></dir></dir></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>veeqo_bridge</name>
4
+ <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
19
  &lt;li&gt;Download orders from Amazon and Magento to manage them all in one place and use advance tools like tags and custom filters &lt;/li&gt;&#xD;
20
  &lt;li&gt;Works with barcode scanners to search for products&lt;/li&gt;&#xD;
21
  &lt;li&gt; Beautiful to look at and very easy to use &lt;/li&gt;</description>
22
+ <notes>Minor fixes</notes>
23
  <authors><author><name>Veeqo</name><user>Veeqo</user><email>helpme@veeqo.com</email></author></authors>
24
+ <date>2014-04-01</date>
25
+ <time>10:44:31</time>
26
+ <contents><target name="magecommunity"><dir><dir name="Veeqo"><dir name="Bridge"><dir name="Block"><dir name="Adminhtml"><file name="Veeqo.php" hash="715b2aa2ad291b4410fe9575ae593a77"/></dir></dir><dir name="Helper"><file name="Data.php" hash="11cc7e2958d7545424b4c94226e9bc5a"/></dir><dir name="Model"><file name="Installer.php" hash="e40be2d9aee1686e061c583e2829e559"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="44cf0afc6fda8f333fc7b9bac068896a"/><file name="InstallController.php" hash="896718b4d7df17ec2a04cc18318b5281"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5c0990f04a9dc2bdc17f1379ffd692da"/><file name="config.xml" hash="c43361fb57bd00c066d9abbb93de8ff0"/></dir></dir></dir></dir></target><target name="mage"><dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Veeqo_Bridge.xml" hash="b0020889060ad13cd00142fef74e8479"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="veeqo.xml" hash="cdd078a0e10be1d457ae3d8af723fea2"/></dir><dir name="template"><dir name="veeqo"><file name="veeqo.phtml" hash="161ad12a19365ef6c06090a98b037719"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="veeqo"><dir name="css"><file name="styles.css" hash="dd51693d63dcec656b0f16a254442031"/></dir></dir></dir></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
skin/adminhtml/default/default/veeqo/css/styles.css CHANGED
@@ -1,7 +1,7 @@
1
- .veeqo-container {
2
- padding:20px; background-color:#EAF7FF; border:1px solid #CCCCCC;
3
- }
4
- .veeqo-container .label,
5
- .veeqo-container .value {float:left; margin-right:10px;}
6
- #bridge2cart_url {width:450px;}
7
  #veeqo_messages {margin-bottom:20px;}
1
+ .veeqo-container {
2
+ padding:20px; background-color:#EAF7FF; border:1px solid #CCCCCC;
3
+ }
4
+ .veeqo-container .label,
5
+ .veeqo-container .value {float:left; margin-right:10px;}
6
+ #bridge2cart_url {width:450px;}
7
  #veeqo_messages {margin-bottom:20px;}