Speedup_your_catalog_update_using_our_Direct_SQL_Update_extension - Version 1.4.1.1

Version Notes

added task status to check the direct SQL update status. No need anymore to check your cron_schedule table:

Status: pending, error, missed or succes
Created At, Scheduled and At Finished At times

Download this release

Release Info

Developer Magento Core Team
Extension Speedup_your_catalog_update_using_our_Direct_SQL_Update_extension
Version 1.4.1.1
Comparing to
See all releases


Code changes from version 1.4.1.0 to 1.4.1.1

app/code/community/Ayasoftware/SQLupdate/Model/Utilities.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
- /**
3
- * @category Ayasoftware
4
- * @package Ayasoftware_SQLupdate
5
- * @authors Sebastien Bracquemont <dweeves@gmail.com>, EL Hassan Matar <support@ayasoftware.com>
6
- * website: www.ayasoftware.com/
7
- */
8
- class Ayasoftware_SQLupdate_Model_Utilities
9
- {
10
- public $coreResource;
11
- public $write;
12
- public $website_ids = array();
13
- public $reset = false;
14
- public $logfilename;
15
- public $fp;
16
- public $attributeId;
17
- function __construct ()
18
- {
19
- $this->coreResource = Mage::getSingleton('core/resource');
20
- $this->write = $this->coreResource->getConnection('core_write');
21
- }
22
- public function executeQuery ($query)
23
- {
24
- try {
25
- $this->write->query($sql);
26
- $this->write->commit();
27
- } catch (Exception $e) {
28
- fwrite($fp, $e->getMessage() . "\n");
29
- //if anything got wrong, rollback
30
- $this->write->rollback();
31
- }
32
- }
33
- /**
34
- * load properties
35
- * @param string $conf : configuration .ini filename
36
- */
37
- public function loadProperties ()
38
- {
39
- $xmlPath = Mage::getBaseDir() . DS . 'app/etc/local.xml';
40
- $xmlObj = new Varien_Simplexml_Config($xmlPath);
41
- $this->magdir = Mage::getBaseDir();
42
- if (Mage::getStoreConfig('sqlupdate/sqlupdateSettings/imgsourcedir')) {
43
- $this->imgsourcedir = Mage::getBaseDir() . Mage::getStoreConfig('sqlupdate/sqlupdateSettings/imgsourcedir');
44
- } else {
45
- $this->imgsourcedir = Mage::getBaseDir() . DS . "media/import";
46
- }
47
- $this->tprefix = $xmlObj->getNode("global/resources/db/table_prefix");
48
- $this->logfilename = Mage::getBaseDir() . DS . "var/log/" . Mage::getStoreConfig('sqlupdate/sqlupdateSettings/logfilename');
49
- }
50
- public function clearProducts ()
51
- {
52
- $sql = "SET FOREIGN_KEY_CHECKS = 0";
53
- try {
54
- $this->write->query($sql);
55
- $this->write->commit();
56
- } catch (Exception $e) {
57
- fwrite($fp, $e->getMessage() . "\n");
58
- //if anything got wrong, rollback
59
- $this->write->rollback();
60
- }
61
- $tables = array("catalog_product_bundle_option" , "catalog_product_bundle_option_value" , "catalog_product_bundle_selection" , "catalog_product_entity_datetime" , "catalog_product_entity_decimal" , "catalog_product_entity_gallery" , "catalog_product_entity_int" , "catalog_product_entity_media_gallery" , "catalog_product_entity_media_gallery_value" , "catalog_product_entity_text" , "catalog_product_entity_tier_price" , "catalog_product_entity_varchar" , "catalog_product_entity" , "catalog_product_option" , "catalog_product_option_price" , "catalog_product_option_title" , "catalog_product_option_type_price" , "catalog_product_option_type_title" , "catalog_product_option_type_value" , "catalog_product_super_attribute_label" , "catalog_product_super_attribute_pricing" , "catalog_product_super_attribute" , "catalog_product_super_link" , "catalog_product_relation" , "catalog_product_enabled_index" , "catalog_product_website" , "catalog_category_product_index" , "catalog_category_product" , "cataloginventory_stock_item" , "cataloginventory_stock_status");
62
- foreach ($tables as $table) {
63
- try {
64
- $this->write->query("TRUNCATE TABLE `" . $this->coreResource->getTableName($table) . "`");
65
- $this->write->commit();
66
- } catch (Exception $e) {
67
- fwrite($fp, $e->getMessage() . "\n");
68
- //if anything got wrong, rollback
69
- $this->write->rollback();
70
- }
71
- }
72
- $sql = "SET FOREIGN_KEY_CHECKS = 1";
73
- try {
74
- $this->write->query($sql);
75
- $this->write->commit();
76
- } catch (Exception $e) {
77
- fwrite($fp, $e->getMessage() . "\n");
78
- //if anything got wrong, rollback
79
- $this->write->rollback();
80
- }
81
- }
82
- /**
83
- * Initialize websites list
84
- */
85
- public function initWebsites ()
86
- {
87
- //Get all websites code/ids
88
- $tname = $this->tablename("core_website");
89
- $sql = "SELECT code,website_id FROM $tname";
90
- $stmt = $this->select($sql);
91
- while ($r = $stmt->fetch()) {
92
- $this->website_ids[$r["code"]] = $r["website_id"];
93
- }
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Ayasoftware/SQLupdate/controllers/Adminhtml/SqlupdateController.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  class Ayasoftware_SQLupdate_Adminhtml_SqlupdateController extends Mage_Adminhtml_Controller_Action {
3
  public function indexAction() {
4
- //Mage::helper('affiliatepack')->addAdminhtmlVersion('affiliatepack');
5
  $this->loadLayout ()->renderLayout ();
6
  }
7
  public function postAction() {
@@ -13,18 +13,9 @@ class Ayasoftware_SQLupdate_Adminhtml_SqlupdateController extends Mage_Adminhtml
13
  if ($timecreated > $scheduling) {
14
  throw new Exception ( Mage::helper ( 'sqlupdate' )->__ ( 'Task must be Scheduled after '.$timecreated ) );
15
  }
16
- $update = Mage::getModel ( 'sqlupdate/utilities' );
17
- $update->clearProducts();
18
- //$update->batchUpdate( $scheduling );
19
- //$update->changeScheduling ( $scheduling );
20
- /*
21
- $reset = false;
22
- $sqlimport = Mage::getModel ( 'sqlupdate/massimport' );
23
- $updateFeed = Mage::getStoreConfig ( 'sqlupdate/sqlupdateSettings/feedname' );
24
- $csvfile = Mage::getBaseDir() . DS ."var/import".DS. $updateFeed;
25
- //echo $csvfile; exit();
26
- $sqlimport->import($csvfile, $reset);
27
- */
28
  $message = $this->__ ( 'The SQL Update has been Scheduled Successfully.' );
29
  Mage::getSingleton ( 'adminhtml/session' )->addSuccess ( $message );
30
  } catch ( Exception $e ) {
1
  <?php
2
  class Ayasoftware_SQLupdate_Adminhtml_SqlupdateController extends Mage_Adminhtml_Controller_Action {
3
  public function indexAction() {
4
+
5
  $this->loadLayout ()->renderLayout ();
6
  }
7
  public function postAction() {
13
  if ($timecreated > $scheduling) {
14
  throw new Exception ( Mage::helper ( 'sqlupdate' )->__ ( 'Task must be Scheduled after '.$timecreated ) );
15
  }
16
+ $update = Mage::getModel ( 'sqlupdate/observer' );
17
+
18
+ $update->changeScheduling ( $scheduling );
 
 
 
 
 
 
 
 
 
19
  $message = $this->__ ( 'The SQL Update has been Scheduled Successfully.' );
20
  Mage::getSingleton ( 'adminhtml/session' )->addSuccess ( $message );
21
  } catch ( Exception $e ) {
app/code/community/Ayasoftware/SQLupdate/etc/config.xml CHANGED
@@ -1,7 +1,7 @@
1
  <config>
2
  <modules>
3
  <Ayasoftware_SQLupdate>
4
- <version>1.4.1.0</version>
5
  <depends>
6
  <!-- no dependencies -->
7
  </depends>
1
  <config>
2
  <modules>
3
  <Ayasoftware_SQLupdate>
4
+ <version>1.4.1.1</version>
5
  <depends>
6
  <!-- no dependencies -->
7
  </depends>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Speedup_your_catalog_update_using_our_Direct_SQL_Update_extension</name>
4
- <version>1.4.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
@@ -29,9 +29,9 @@ Extension Features:&#xD;
29
  Status: pending, error, missed or succes&#xD;
30
  Created At, Scheduled and At Finished At times</notes>
31
  <authors><author><name>EL Hassan Matar</name><user>auto-converted</user><email>support@ayasoftware.com</email></author></authors>
32
- <date>2011-06-07</date>
33
- <time>04:35:44</time>
34
- <contents><target name="magecommunity"><dir name="Ayasoftware"><dir name="SQLupdate"><dir name="Block"><dir name="System"><file name="Html.php" hash="9b9e6aa706535e58e86ea1260910cb17"/></dir></dir><dir name="Helper"><file name="Data.php" hash="ecbe414b1c243fb379266dbd15047993"/></dir><dir name="Model"><file name="DBHelper.php" hash="5f991190b397853c5dee307110b21060"/><file name="Massimport.php" hash="87c886e2c9b87d2d4acb9048fd95d7a6"/><file name="Observer.php" hash="fcc7212083cd72920ff117f3299afcc8"/><file name="Utilities.php" hash="2d3dd5665b330b2d881c280629db4e11"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SqlupdateController.php" hash="ddac37db79e13944b49d759e895e3ece"/></dir></dir><dir name="etc"><file name="config.xml" hash="2bffe8f09be83c2dab71e3bac5da2fc6"/><file name="system.xml" hash="45031a024e40a09cf1906fea75a6d03f"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sqlupdate.xml" hash="c71a6d533ec8dd5ec93d52b3d8d2d316"/></dir><dir name="template"><dir name="sqlupdate"><file name="schedule.phtml" hash="250755acf8d21f1aaf73d41b12db2149"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="ayasoftware"><file name="behaviors.js" hash="803fbd82d3a132633288f31edb12f5ca"/><file name="behaviour.js" hash="782fb396b22aff61b4e4b03d144fd1d7"/><file name="datepicker.css" hash="7889f5fe2cf572b8bce80d7d8d1ac5c2"/><file name="datepicker.js" hash="56234bdc9ebbb7f58da1344664f9bbb1"/><file name="datetimepicker.js" hash="39a363522d2654d5a35a7469a753481f"/><file name="prototype-1.6.0.2.js" hash="6f804651639c56d134e892125179b76d"/><file name="prototype-base-extensions.js" hash="eec08721b9e8b4fd05ecd20653978355"/><file name="prototype-date-extensions.js" hash="babd1760797624cbac3479a16647a5fd"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ayasoftware_SQLupdate.xml" hash="8ef6e3f0f41e0960a02484cefd1afd48"/></dir></target></contents>
35
  <compatible/>
36
  <dependencies/>
37
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Speedup_your_catalog_update_using_our_Direct_SQL_Update_extension</name>
4
+ <version>1.4.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
29
  Status: pending, error, missed or succes&#xD;
30
  Created At, Scheduled and At Finished At times</notes>
31
  <authors><author><name>EL Hassan Matar</name><user>auto-converted</user><email>support@ayasoftware.com</email></author></authors>
32
+ <date>2011-06-09</date>
33
+ <time>22:09:49</time>
34
+ <contents><target name="magecommunity"><dir name="Ayasoftware"><dir name="SQLupdate"><dir name="Block"><dir name="System"><file name="Html.php" hash="9b9e6aa706535e58e86ea1260910cb17"/></dir></dir><dir name="Helper"><file name="Data.php" hash="ecbe414b1c243fb379266dbd15047993"/></dir><dir name="Model"><file name="DBHelper.php" hash="5f991190b397853c5dee307110b21060"/><file name="Massimport.php" hash="87c886e2c9b87d2d4acb9048fd95d7a6"/><file name="Observer.php" hash="fcc7212083cd72920ff117f3299afcc8"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SqlupdateController.php" hash="8f4ff5e1322690b832bca7de213b0987"/></dir></dir><dir name="etc"><file name="config.xml" hash="427f759283d795bb3ac44db1693f9302"/><file name="system.xml" hash="45031a024e40a09cf1906fea75a6d03f"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sqlupdate.xml" hash="c71a6d533ec8dd5ec93d52b3d8d2d316"/></dir><dir name="template"><dir name="sqlupdate"><file name="schedule.phtml" hash="250755acf8d21f1aaf73d41b12db2149"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="ayasoftware"><file name="behaviors.js" hash="803fbd82d3a132633288f31edb12f5ca"/><file name="behaviour.js" hash="782fb396b22aff61b4e4b03d144fd1d7"/><file name="datepicker.css" hash="7889f5fe2cf572b8bce80d7d8d1ac5c2"/><file name="datepicker.js" hash="56234bdc9ebbb7f58da1344664f9bbb1"/><file name="datetimepicker.js" hash="39a363522d2654d5a35a7469a753481f"/><file name="prototype-1.6.0.2.js" hash="6f804651639c56d134e892125179b76d"/><file name="prototype-base-extensions.js" hash="eec08721b9e8b4fd05ecd20653978355"/><file name="prototype-date-extensions.js" hash="babd1760797624cbac3479a16647a5fd"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ayasoftware_SQLupdate.xml" hash="8ef6e3f0f41e0960a02484cefd1afd48"/></dir></target></contents>
35
  <compatible/>
36
  <dependencies/>
37
  </package>