Bootic - Version 1.0.3

Version Notes

Fixed some minor bugs and improved performance

Download this release

Release Info

Developer Pierre Vigier
Extension Bootic
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

Files changed (30) hide show
  1. app/code/community/Bootic/Bootic/Block/Adminhtml/Catalog/Category.php +6 -1
  2. app/code/community/Bootic/Bootic/Block/Adminhtml/Connect/Profile.php +6 -1
  3. app/code/community/Bootic/Bootic/Block/Adminhtml/Product.php +7 -3
  4. app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Create/Form.php +4 -4
  5. app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit.php +9 -5
  6. app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit/Tab/Design.php +5 -4
  7. app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit/Tab/Design/Preview.php +3 -3
  8. app/code/community/Bootic/Bootic/Block/Adminhtml/System/Config/Button/Cron.php +3 -0
  9. app/code/community/Bootic/Bootic/Block/Adminhtml/System/Config/Testapiconnection.php +1 -0
  10. app/code/community/Bootic/Bootic/Exception.php +5 -0
  11. app/code/community/Bootic/Bootic/Helper/Category.php +38 -23
  12. app/code/community/Bootic/Bootic/Helper/Orders.php +5 -1
  13. app/code/community/Bootic/Bootic/Helper/Product.php +41 -9
  14. app/code/community/Bootic/Bootic/Model/Cron.php +6 -0
  15. app/code/community/Bootic/Bootic/Model/Mysql4/Category.php +85 -2
  16. app/code/community/Bootic/Bootic/Model/Shipping/Flatrate.php +17 -15
  17. app/code/community/Bootic/Bootic/controllers/Adminhtml/Catalog/CategoryController.php +16 -4
  18. app/code/community/Bootic/Bootic/controllers/Adminhtml/CatalogController.php +7 -2
  19. app/code/community/Bootic/Bootic/controllers/Adminhtml/ConnectController.php +6 -1
  20. app/code/community/Bootic/Bootic/controllers/Adminhtml/StorefrontController.php +7 -2
  21. app/code/community/Bootic/Bootic/controllers/Adminhtml/System/CronController.php +2 -0
  22. app/code/community/Bootic/Bootic/controllers/IndexController.php +24 -1
  23. app/code/community/Bootic/Bootic/etc/config.xml +8 -0
  24. app/design/adminhtml/default/default/layout/bootic.xml +1 -1
  25. app/design/adminhtml/default/default/template/bootic/bootic.phtml +2 -2
  26. app/design/adminhtml/default/default/template/bootic/storefront/banners.phtml +2 -2
  27. app/design/adminhtml/default/default/template/bootic/storefront/preview.phtml +4 -4
  28. lib/Bootic/Api/Client.php +46 -0
  29. lib/Bootic/Api/Result.php +5 -2
  30. package.xml +6 -6
app/code/community/Bootic/Bootic/Block/Adminhtml/Catalog/Category.php CHANGED
@@ -28,7 +28,12 @@ class Bootic_Bootic_Block_Adminhtml_Catalog_Category extends Mage_Adminhtml_Bloc
28
 
29
  public function getHeaderText()
30
  {
31
- return Mage::helper('bootic')->__('Match Magento categories with Bootic categories');
 
 
 
 
 
32
  }
33
 
34
  /**
28
 
29
  public function getHeaderText()
30
  {
31
+ $email = Mage::getStoreConfig('bootic/account/email');
32
+ if ($email) {
33
+ return Mage::helper('bootic')->__('Match Magento categories with Bootic categories (email: '.$email.')');
34
+ } else {
35
+ return Mage::helper('bootic')->__('Match Magento categories with Bootic categories');
36
+ }
37
  }
38
 
39
  /**
app/code/community/Bootic/Bootic/Block/Adminhtml/Connect/Profile.php CHANGED
@@ -19,6 +19,11 @@ class Bootic_Bootic_Block_Adminhtml_Connect_Profile extends Mage_Adminhtml_Block
19
 
20
  public function getHeaderText()
21
  {
22
- return Mage::helper('bootic')->__('Edit your profile');
 
 
 
 
 
23
  }
24
  }
19
 
20
  public function getHeaderText()
21
  {
22
+ $email = Mage::getStoreConfig('bootic/account/email');
23
+ if ($email) {
24
+ return Mage::helper('bootic')->__('Edit your profile (email: '.$email.')');
25
+ } else {
26
+ return Mage::helper('bootic')->__('Edit your profile');
27
+ }
28
  }
29
  }
app/code/community/Bootic/Bootic/Block/Adminhtml/Product.php CHANGED
@@ -8,7 +8,8 @@ class Bootic_Bootic_Block_Adminhtml_Product extends Mage_Adminhtml_Block_Widget_
8
  public function __construct()
9
  {
10
  parent::__construct();
11
-
 
12
  $this->setId('ProductGrid');
13
  $this->_parentTemplate = $this->getTemplate();
14
  $this->setEmptyText('No Products');
@@ -19,7 +20,8 @@ class Bootic_Bootic_Block_Adminhtml_Product extends Mage_Adminhtml_Block_Widget_
19
 
20
  protected function _prepareCollection()
21
  {
22
- $collection = mage::getResourceModel('catalog/product_collection')
 
23
  ->addAttributeToSelect('*')
24
  ->addAttributeToFilter('type_id', array('nin' => array('bundle', 'virtual', 'grouped', 'downloadable')))
25
  ->addAttributeToFilter('status', 1)
@@ -55,6 +57,7 @@ class Bootic_Bootic_Block_Adminhtml_Product extends Mage_Adminhtml_Block_Widget_
55
 
56
  protected function _prepareColumns()
57
  {
 
58
  $this->addColumn('id', array(
59
  'header'=> Mage::helper('bootic')->__('ID'),
60
  'width' => '50px',
@@ -148,7 +151,8 @@ class Bootic_Bootic_Block_Adminhtml_Product extends Mage_Adminhtml_Block_Widget_
148
 
149
  protected function _prepareMassaction(){
150
 
151
- $this->setMassactionIdField('id');
 
152
  $this->getMassactionBlock()->setFormFieldName('ids');
153
 
154
  $this->getMassactionBlock()->addItem('add_selection', array(
8
  public function __construct()
9
  {
10
  parent::__construct();
11
+ Mage::log("Product->__construct()");
12
+
13
  $this->setId('ProductGrid');
14
  $this->_parentTemplate = $this->getTemplate();
15
  $this->setEmptyText('No Products');
20
 
21
  protected function _prepareCollection()
22
  {
23
+ Mage::log("Product->_prepareCollection()");
24
+ $collection = mage::getResourceModel('catalog/product_collection')
25
  ->addAttributeToSelect('*')
26
  ->addAttributeToFilter('type_id', array('nin' => array('bundle', 'virtual', 'grouped', 'downloadable')))
27
  ->addAttributeToFilter('status', 1)
57
 
58
  protected function _prepareColumns()
59
  {
60
+ Mage::log("Product->_prepareColumns()");
61
  $this->addColumn('id', array(
62
  'header'=> Mage::helper('bootic')->__('ID'),
63
  'width' => '50px',
151
 
152
  protected function _prepareMassaction(){
153
 
154
+ Mage::log("Product->_prepareMassaction()");
155
+ $this->setMassactionIdField('id');
156
  $this->getMassactionBlock()->setFormFieldName('ids');
157
 
158
  $this->getMassactionBlock()->addItem('add_selection', array(
app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Create/Form.php CHANGED
@@ -57,10 +57,10 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Create_Form extends Mage_Adminhtm
57
  'values' => Mage::helper('bootic/storefront')->getAvailableTemplatesValues()
58
  ));
59
 
60
- $fieldset->addField('color_theme', 'hidden', array(
61
- 'name' => 'color_theme',
62
- 'value' => '0CA3DB'
63
- ));
64
 
65
  $form->setUseContainer(true);
66
  $this->setForm($form);
57
  'values' => Mage::helper('bootic/storefront')->getAvailableTemplatesValues()
58
  ));
59
 
60
+ //$fieldset->addField('color_theme', 'hidden', array(
61
+ // 'name' => 'color_theme',
62
+ // 'value' => '000000'
63
+ //));
64
 
65
  $form->setUseContainer(true);
66
  $this->setForm($form);
app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit.php CHANGED
@@ -20,8 +20,12 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit extends Mage_Adminhtml_Block
20
 
21
  public function getHeaderText()
22
  {
23
- $headerText = Mage::helper('bootic')->__('Edit Storefront');
24
-
 
 
 
 
25
  return $headerText;
26
  }
27
 
@@ -32,8 +36,8 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit extends Mage_Adminhtml_Block
32
  */
33
  protected function _prepareLayout()
34
  {
35
- $color = Mage::getSingleton('bootic/storefront')->getColor_theme() ? Mage::getSingleton('bootic/storefront')->getColor_theme() : null;
36
-
37
  $this->_formScripts[] = "
38
  var cp = new colorPicker('storefront_color_theme', {
39
  color:'#" . $color . "',
@@ -44,7 +48,7 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit extends Mage_Adminhtml_Block
44
  }
45
  });
46
  ";
47
-
48
  return parent::_prepareLayout();
49
  }
50
  }
20
 
21
  public function getHeaderText()
22
  {
23
+ $email = Mage::getStoreConfig('bootic/account/email');
24
+ if ($email) {
25
+ $headerText = Mage::helper('bootic')->__('Edit Storefront (email: '.$email.')');
26
+ } else {
27
+ $headerText = Mage::helper('bootic')->__('Edit Storefront');
28
+ }
29
  return $headerText;
30
  }
31
 
36
  */
37
  protected function _prepareLayout()
38
  {
39
+ //$color = Mage::getSingleton('bootic/storefront')->getColor_theme() ? Mage::getSingleton('bootic/storefront')->getColor_theme() : null;
40
+ /*
41
  $this->_formScripts[] = "
42
  var cp = new colorPicker('storefront_color_theme', {
43
  color:'#" . $color . "',
48
  }
49
  });
50
  ";
51
+ */
52
  return parent::_prepareLayout();
53
  }
54
  }
app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit/Tab/Design.php CHANGED
@@ -21,13 +21,14 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design
21
  'values' => Mage::helper('bootic/storefront')->getAvailableTemplatesValues()
22
  ));
23
 
 
24
  $fieldset->addField('color_theme', 'text', array(
25
  'name' => 'color_theme',
26
  'label' => Mage::helper('bootic')->__('Color:'),
27
  'style' => "width:100px;float:left;margin-right:10px;",
28
  'after_element_html' => '<div id="color-preview" style="display:block;width:15px;height:15px;float:left;padding:1px;border:1px solid #AAA;"></div>'
29
  ));
30
-
31
  $bannerFieldset = $form->addFieldset('banner_fieldset', array('legend' => Mage::helper('bootic')->__('Storefront Banner')));
32
 
33
  $bannerFieldset->addField('banner', 'hidden', array(
@@ -43,9 +44,9 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design
43
  'note' => Mage::helper('bootic')->__('Image has to be either png, gif or jpg and be exactly 996*180px'),
44
  ));
45
 
46
- $form->addFieldset('preview_fieldset', array(
47
- 'legend' => Mage::helper('bootic')->__('Storefront Preview'),
48
- ));
49
 
50
  // $previewFieldset->addType('preview','Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design_Preview');
51
  //
21
  'values' => Mage::helper('bootic/storefront')->getAvailableTemplatesValues()
22
  ));
23
 
24
+ /*
25
  $fieldset->addField('color_theme', 'text', array(
26
  'name' => 'color_theme',
27
  'label' => Mage::helper('bootic')->__('Color:'),
28
  'style' => "width:100px;float:left;margin-right:10px;",
29
  'after_element_html' => '<div id="color-preview" style="display:block;width:15px;height:15px;float:left;padding:1px;border:1px solid #AAA;"></div>'
30
  ));
31
+ */
32
  $bannerFieldset = $form->addFieldset('banner_fieldset', array('legend' => Mage::helper('bootic')->__('Storefront Banner')));
33
 
34
  $bannerFieldset->addField('banner', 'hidden', array(
44
  'note' => Mage::helper('bootic')->__('Image has to be either png, gif or jpg and be exactly 996*180px'),
45
  ));
46
 
47
+ // $form->addFieldset('preview_fieldset', array(
48
+ // 'legend' => Mage::helper('bootic')->__('Storefront Preview'),
49
+ // ));
50
 
51
  // $previewFieldset->addType('preview','Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design_Preview');
52
  //
app/code/community/Bootic/Bootic/Block/Adminhtml/Storefront/Edit/Tab/Design/Preview.php CHANGED
@@ -33,7 +33,7 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design_Preview extends V
33
  '<script type="text/javascript">
34
  var storeOptions = ' . json_encode($this->getOptions()) . ';
35
  var templates = storeOptions.templates;
36
- var color = "#" + $("storefront_color_theme").value;
37
  var previewImg = new Element("img");
38
 
39
  templates.each(function (template) {
@@ -46,10 +46,10 @@ class Bootic_Bootic_Block_Adminhtml_Storefront_Edit_Tab_Design_Preview extends V
46
  })
47
 
48
  $("storefront_preview_fieldset").setStyle({ backgroundColor: color });
49
-
50
  </script>'
51
  ;
52
 
53
  return $js;
54
  }
55
- }
33
  '<script type="text/javascript">
34
  var storeOptions = ' . json_encode($this->getOptions()) . ';
35
  var templates = storeOptions.templates;
36
+ /*var color = "#" + $("storefront_color_theme").value;
37
  var previewImg = new Element("img");
38
 
39
  templates.each(function (template) {
46
  })
47
 
48
  $("storefront_preview_fieldset").setStyle({ backgroundColor: color });
49
+ */
50
  </script>'
51
  ;
52
 
53
  return $js;
54
  }
55
+ }
app/code/community/Bootic/Bootic/Block/Adminhtml/System/Config/Button/Cron.php CHANGED
@@ -10,6 +10,7 @@ class Bootic_Bootic_Block_Adminhtml_System_Config_Button_Cron extends Mage_Admin
10
  */
11
  protected function _prepareLayout()
12
  {
 
13
  parent::_prepareLayout();
14
  if (!$this->getTemplate()) {
15
  $this->setTemplate('bootic/adminhtml/system/config/button/cron.phtml');
@@ -26,6 +27,7 @@ class Bootic_Bootic_Block_Adminhtml_System_Config_Button_Cron extends Mage_Admin
26
  */
27
  public function render(Varien_Data_Form_Element_Abstract $element)
28
  {
 
29
  $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
30
  return parent::render($element);
31
  }
@@ -38,6 +40,7 @@ class Bootic_Bootic_Block_Adminhtml_System_Config_Button_Cron extends Mage_Admin
38
  */
39
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
40
  {
 
41
  $originalData = $element->getOriginalData();
42
  $this->addData(array(
43
  'button_label' => Mage::helper('bootic')->__($originalData['button_label']),
10
  */
11
  protected function _prepareLayout()
12
  {
13
+ Mage::log('_prepareLayout');
14
  parent::_prepareLayout();
15
  if (!$this->getTemplate()) {
16
  $this->setTemplate('bootic/adminhtml/system/config/button/cron.phtml');
27
  */
28
  public function render(Varien_Data_Form_Element_Abstract $element)
29
  {
30
+ Mage::log('render');
31
  $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
32
  return parent::render($element);
33
  }
40
  */
41
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
42
  {
43
+ Mage::log('_getElementHtml');
44
  $originalData = $element->getOriginalData();
45
  $this->addData(array(
46
  'button_label' => Mage::helper('bootic')->__($originalData['button_label']),
app/code/community/Bootic/Bootic/Block/Adminhtml/System/Config/Testapiconnection.php CHANGED
@@ -15,6 +15,7 @@ class Bootic_Bootic_Block_Adminhtml_System_Config_Testapiconnection extends Mage
15
  parent::_prepareLayout();
16
 
17
  $displayCreateAccount = true;
 
18
  if (Mage::getStoreConfig('bootic/account/password') && Mage::getStoreConfig('bootic/account/email')) {
19
  $displayCreateAccount = false;
20
  }
15
  parent::_prepareLayout();
16
 
17
  $displayCreateAccount = true;
18
+ Mage::Log('bootic/account/email'.Mage::getStoreConfig('bootic/account/email'));
19
  if (Mage::getStoreConfig('bootic/account/password') && Mage::getStoreConfig('bootic/account/email')) {
20
  $displayCreateAccount = false;
21
  }
app/code/community/Bootic/Bootic/Exception.php CHANGED
@@ -11,11 +11,16 @@ class Bootic_Bootic_Exception extends Zend_Exception
11
  public function __construct($msg = '', $code = 0, Exception $previous = null, $isWarning = false)
12
  {
13
  $this->_isWarning = $isWarning;
 
 
 
 
14
  parent::__construct($msg, $code, $previous);
15
  }
16
 
17
  public function isWarning()
18
  {
 
19
  return $this->_isWarning;
20
  }
21
  }
11
  public function __construct($msg = '', $code = 0, Exception $previous = null, $isWarning = false)
12
  {
13
  $this->_isWarning = $isWarning;
14
+ if ($previous) {
15
+ Mage::logException($previous);
16
+ }
17
+ Mage::log($msg);
18
  parent::__construct($msg, $code, $previous);
19
  }
20
 
21
  public function isWarning()
22
  {
23
+ Mage::log('is warning');
24
  return $this->_isWarning;
25
  }
26
  }
app/code/community/Bootic/Bootic/Helper/Category.php CHANGED
@@ -25,19 +25,10 @@ class Bootic_Bootic_Helper_Category extends Bootic_Bootic_Helper_Abstract
25
  */
26
  public function getBooticCategories()
27
  {
28
- if (isset($this->_booticCategories)) {
29
- return $this->_booticCategories;
30
  }
31
 
32
- $booticCategoryCollection = Mage::getResourceModel('bootic/category_collection')->load();
33
-
34
- $booticCategories = array();
35
- foreach ($booticCategoryCollection as $booticCategory) {
36
- $booticCategories[$booticCategory->getId()] = Mage::getModel('bootic/category')->load($booticCategory->getId());
37
- }
38
-
39
- $this->_booticCategories = $booticCategories;
40
-
41
  return $this->_booticCategories;
42
  }
43
 
@@ -161,18 +152,16 @@ class Bootic_Bootic_Helper_Category extends Bootic_Bootic_Helper_Abstract
161
  }
162
 
163
  /**
164
- * Gets the selected root category from config
165
- *
166
  * @return Mage_Core_Model_Abstract
167
  */
168
  public function getRootCategory()
169
  {
170
  $rootCategoryId = Mage::getStoreConfig('bootic/product/root_category');
171
- if ($rootCategoryId) {
172
- return Mage::getModel('catalog/category')->load($rootCategoryId);
173
- } else {
174
  Mage::throwException('Root category is not set in system/configuration/bootic');
175
  }
 
 
176
  }
177
 
178
  /**
@@ -246,18 +235,25 @@ class Bootic_Bootic_Helper_Category extends Bootic_Bootic_Helper_Abstract
246
  /**
247
  * Gets categories from Bootic and stores them locally
248
  */
249
- public function pullBooticCategories()
250
  {
251
  $result = $this->listOrigCategories();
252
  $booticCategories = $result->getData();
253
 
254
- foreach ($booticCategories as $booticCategory) {
255
- $category = Mage::getModel('bootic/category')->load($booticCategory['id']);
256
- $category->setId($booticCategory['id']);
257
- $category->setName($booticCategory['name']);
258
- $category->setParents($booticCategory['parents']);
259
- $category->save();
 
 
 
 
260
  }
 
 
 
261
  }
262
 
263
 
@@ -279,4 +275,23 @@ class Bootic_Bootic_Helper_Category extends Bootic_Bootic_Helper_Abstract
279
 
280
  return $collection;
281
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  }
25
  */
26
  public function getBooticCategories()
27
  {
28
+ if (!isset($this->_booticCategories)) {
29
+ $this->_booticCategories = Mage::getResourceModel('bootic/category')->getAllCategories();
30
  }
31
 
 
 
 
 
 
 
 
 
 
32
  return $this->_booticCategories;
33
  }
34
 
152
  }
153
 
154
  /**
 
 
155
  * @return Mage_Core_Model_Abstract
156
  */
157
  public function getRootCategory()
158
  {
159
  $rootCategoryId = Mage::getStoreConfig('bootic/product/root_category');
160
+ if (!$rootCategoryId) {
 
 
161
  Mage::throwException('Root category is not set in system/configuration/bootic');
162
  }
163
+
164
+ return Mage::getModel('catalog/category')->load($rootCategoryId);
165
  }
166
 
167
  /**
235
  /**
236
  * Gets categories from Bootic and stores them locally
237
  */
238
+ public function pullBooticCategories($lastRemoteUpdate = null)
239
  {
240
  $result = $this->listOrigCategories();
241
  $booticCategories = $result->getData();
242
 
243
+ // foreach ($booticCategories as $booticCategory) {
244
+ // $category = Mage::getModel('bootic/category')->load($booticCategory['id']);
245
+ // $category->setId($booticCategory['id']);
246
+ // $category->setName($booticCategory['name']);
247
+ // $category->setParents($booticCategory['parents']);
248
+ // $category->save();
249
+ // }
250
+
251
+ if (!$lastRemoteUpdate) {
252
+ $lastRemoteUpdate = Mage::getModel('core/date')->gmtDate(null, 'now');
253
  }
254
+
255
+ $categoryResource = Mage::getResourceModel('bootic/category');
256
+ $categoryResource->insertCategories($booticCategories, $lastRemoteUpdate);
257
  }
258
 
259
 
275
 
276
  return $collection;
277
  }
278
+
279
+ public function syncCategories()
280
+ {
281
+ $timeZone = new DateTimeZone('GMT');
282
+
283
+ $result = $this->getBootic()->getCategoriesLastModified();
284
+ $lastRemoteUpdate = new DateTime($result->getData('last_modification_date'), $timeZone);
285
+
286
+ if ($t = Mage::getResourceModel('bootic/category')->getLocalLastUpdate()) {
287
+ $lastLocalUpdate = new DateTime($t, $timeZone);
288
+ } else {
289
+ $this->pullBooticCategories($lastRemoteUpdate);
290
+ return;
291
+ }
292
+
293
+ if ($lastLocalUpdate < $lastRemoteUpdate) {
294
+ $this->pullBooticCategories($lastRemoteUpdate);
295
+ }
296
+ }
297
  }
app/code/community/Bootic/Bootic/Helper/Orders.php CHANGED
@@ -146,6 +146,10 @@ class Bootic_Bootic_Helper_Orders extends Bootic_Bootic_Helper_Abstract
146
  */
147
  public function createOrder($order)
148
  {
 
 
 
 
149
  //create customer
150
  $customer = $this->createOrGetCustomer($order);
151
 
@@ -565,4 +569,4 @@ class Bootic_Bootic_Helper_Orders extends Bootic_Bootic_Helper_Abstract
565
  return false;
566
  }
567
  }
568
- }
146
  */
147
  public function createOrder($order)
148
  {
149
+ // We set a flag so that from our custom shipping method we know that it's a bootic order
150
+ // otherwise that shipping method is showed to front end users
151
+ Mage::register('bootic_order_creation', true);
152
+
153
  //create customer
154
  $customer = $this->createOrGetCustomer($order);
155
 
569
  return false;
570
  }
571
  }
572
+ }
app/code/community/Bootic/Bootic/Helper/Product.php CHANGED
@@ -26,6 +26,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
26
  */
27
  public function massCreateProducts(Mage_Core_Controller_Request_Http $request)
28
  {
 
29
  $ids = $request->__get('ids');
30
 
31
  $addedToQueue = array();
@@ -136,6 +137,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
136
  */
137
  public function loadByBooticId($id)
138
  {
 
139
  /* @var $collection Mage_Catalog_Model_Resource_Product_Collection */
140
  $collection = Mage::getResourceModel('catalog/product_collection')
141
  ->addAttributeToSelect('*')
@@ -167,6 +169,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
167
  */
168
  public function uploadProducts()
169
  {
 
170
  $collection = Mage::getResourceModel('catalog/product_collection')
171
  ->addAttributeToSelect('*')
172
  ->addAttributeToSort('entity_id', 'ASC')
@@ -225,6 +228,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
225
 
226
  } catch (Bootic_Bootic_Exception $e) {
227
  // If an error occured on one of the calls, we flag product as errored and log the errors
 
228
  $statusError = Mage::getModel('bootic/product_data')->getStatusError();
229
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusError);
230
 
@@ -234,7 +238,8 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
234
  } catch (Bootic_Api_Exception $e) {
235
  // Probably a network error or an API downtime
236
  // We try 5 times and then we notify Admin
237
- $statusProcessing = Mage::getModel('bootic/product_data')->getStatusProcessing();
 
238
  $productData = Mage::getModel('bootic/product_data')->load($product->getId());
239
  $productData->setBooticStatus($statusProcessing);
240
  $productData->incrementUploadFailures();
@@ -252,7 +257,8 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
252
 
253
  } catch (Exception $e) {
254
  // If anything else weird happens, we re-queue the product
255
- $statusProcessing = Mage::getModel('bootic/product_data')->getStatusProcessing();
 
256
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusProcessing);
257
 
258
  $count ++;
@@ -267,6 +273,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
267
  */
268
  public function editProducts()
269
  {
 
270
  $collection = Mage::getResourceModel('catalog/product_collection')
271
  ->addAttributeToSelect('*')
272
  ->addAttributeToSort('entity_id', 'ASC')
@@ -312,7 +319,8 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
312
  $count ++;
313
 
314
  } catch (Bootic_Bootic_Exception $e) {
315
- // If update fails or get warning, we show admin the product has errors
 
316
  $statusException = ($e->isWarning()) ? Mage::getModel('bootic/product_data')->getStatusIncomplete() : Mage::getModel('bootic/product_data')->getStatusError();
317
  $status = ($e->isWarning()) ? 'warning' : 'error';
318
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusException);
@@ -328,6 +336,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
328
  }
329
 
330
  } catch (Exception $e) {
 
331
  // If anything else weird happens, we simply disregard
332
  Mage::log('Failed editing a product on Bootic');
333
  }
@@ -343,6 +352,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
343
  */
344
  protected function _isProductUploadable(Mage_Catalog_Model_Product $product)
345
  {
 
346
  $parents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
347
 
348
  $result = true;
@@ -364,6 +374,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
364
  */
365
  public function makeSimpleProduct(Mage_Catalog_Model_Product $product)
366
  {
 
367
  $attributes = $product->getAttributes();
368
  $personalizations = array();
369
  foreach ($attributes as $attribute) {
@@ -400,6 +411,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
400
  $productData->save();
401
 
402
  } catch (Bootic_Api_Exception $e) {
 
403
  // If an error occurs during this call, product stock gets set to out of sync
404
  $productData->setIsStockSynced(false);
405
  $productData->save();
@@ -408,11 +420,12 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
408
  // If product upload call originally had warnings, we notify the admin
409
  if ($result->hasWarning()) {
410
  $warningMessages = $result->getWarningMessages();
411
-
 
412
  // We remove the first message which is not intended for Magento Admins
413
  array_shift($warningMessages);
414
  $message = implode(' ', $warningMessages);
415
-
416
  throw new Bootic_Bootic_Exception($message);
417
  }
418
  }
@@ -426,6 +439,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
426
  */
427
  public function editSimpleProduct(Mage_Catalog_Model_Product $product)
428
  {
 
429
  $attributes = $product->getAttributes();
430
  $personalizations = array();
431
  foreach ($attributes as $attribute) {
@@ -471,6 +485,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
471
  */
472
  public function makeConfigurableProduct(Mage_Catalog_Model_Product $product)
473
  {
 
474
  $productAttributes = $this->_getConfigurableProductAttributes($product, $productOptions, $matchedAttributes);
475
 
476
  $attributes = $product->getAttributes();
@@ -542,6 +557,8 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
542
  $_productData->save();
543
 
544
  } catch (Bootic_Api_Exception $e) {
 
 
545
  // If an error occurs during this call, product stock gets set to out of sync
546
  $_productData->setIsStockSynced(false);
547
  $_productData->save();
@@ -552,6 +569,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
552
  try {
553
  $this->updateProductStock($productId, $stockId, $sku, $stock, $valid);
554
  } catch (Exception $e) {
 
555
  $stockInSync = false;
556
  }
557
  }
@@ -563,11 +581,12 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
563
  // If product upload call originally had warnings, we notify the admin
564
  if ($result->hasWarning()) {
565
  $warningMessages = $result->getWarningMessages();
566
-
567
  // We remove the first message which is not intended for Magento Admins
568
  array_shift($warningMessages);
569
  $message = implode(' ', $warningMessages);
570
-
 
571
  throw new Bootic_Bootic_Exception($message);
572
  }
573
  }
@@ -581,6 +600,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
581
  */
582
  public function editConfigurableProduct(Mage_Catalog_Model_Product $product)
583
  {
 
584
  $productAttributes = $this->_getConfigurableProductAttributes($product, $productOptions, $matchedAttributes);
585
 
586
  $attributes = $product->getAttributes();
@@ -609,17 +629,21 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
609
  throw new Bootic_Bootic_Exception($result->getErrorMessage());
610
  } elseif ($result->hasWarning()) {
611
  $warningMessages = $result->getWarningMessages();
612
-
 
 
613
  // We remove the first message which is not intended for Magento Admins
614
  array_shift($warningMessages);
615
  $message = implode(' ', $warningMessages);
616
-
 
617
  throw new Bootic_Bootic_Exception($message, 0, null, true);
618
  }
619
  }
620
 
621
  protected function _getConfigurableProductAttributes(Mage_Catalog_Model_Product $product, &$productOptions, &$matchedAttributes)
622
  {
 
623
  $productOptions = Mage::helper('bootic/product_type_configurable')->getOptions($product);
624
 
625
  $matchedAttributes = array();
@@ -665,6 +689,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
665
  */
666
  public function updateProductStock($productId = null, $stockId = null, $sku = null, $stock = null, $valid = false)
667
  {
 
668
  $p['product_id'] = (int)$productId;
669
  $p['stock_id'] = $stockId;
670
  $p['sku'] = $sku;
@@ -687,6 +712,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
687
  */
688
  public function listProductAvailableAttributes()
689
  {
 
690
  $result = $this->getBootic()->listProductAvailableAttributes();
691
 
692
  return $result->getData();
@@ -701,6 +727,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
701
  */
702
  public function createProductAttribute($attributeCode)
703
  {
 
704
  if (is_null($attributeCode)) {
705
  throw new Bootic_Bootic_Exception('Attribute code cannot be empty');
706
  }
@@ -750,6 +777,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
750
  */
751
  public function addBooticAttribute(array $attribute)
752
  {
 
753
  $this->_booticAttributes[] = $attribute;
754
  return $this;
755
  }
@@ -763,6 +791,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
763
  */
764
  private function _prepareBooticProductArray(Mage_Catalog_Model_Product $_product, $product_attributes = null)
765
  {
 
766
  /** @var $product Mage_Catalog_Model_Product */
767
  $product = Mage::getModel('catalog/product')->load($_product->getId());
768
 
@@ -892,6 +921,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
892
  */
893
  public function checkProductsStatus()
894
  {
 
895
  $collection = Mage::getResourceModel('catalog/product_collection')
896
  ->addAttributeToSelect('*')
897
  ->addAttributeToSort('entity_id', 'ASC')
@@ -961,6 +991,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
961
  */
962
  public function syncProductsStocks()
963
  {
 
964
  $collection = Mage::getResourceModel('catalog/product_collection')
965
  ->addAttributeToSelect('*')
966
  ->addAttributeToSort('entity_id', 'ASC')
@@ -1000,6 +1031,7 @@ class Bootic_Bootic_Helper_Product extends Bootic_Bootic_Helper_Abstract
1000
  $this->updateProductStock($productId, $stockId, $sku, $stock, $valid);
1001
  Mage::helper('bootic/product_data')->setStockSync($product, true);
1002
  } catch (Exception $e) {
 
1003
  // Here we just do nothing to let the system retry on its own on a next cron run
1004
  }
1005
  }
26
  */
27
  public function massCreateProducts(Mage_Core_Controller_Request_Http $request)
28
  {
29
+ Mage::log('massCreateProducts');
30
  $ids = $request->__get('ids');
31
 
32
  $addedToQueue = array();
137
  */
138
  public function loadByBooticId($id)
139
  {
140
+ Mage::log('loadByBooticId');
141
  /* @var $collection Mage_Catalog_Model_Resource_Product_Collection */
142
  $collection = Mage::getResourceModel('catalog/product_collection')
143
  ->addAttributeToSelect('*')
169
  */
170
  public function uploadProducts()
171
  {
172
+ Mage::log('uploadProducts');
173
  $collection = Mage::getResourceModel('catalog/product_collection')
174
  ->addAttributeToSelect('*')
175
  ->addAttributeToSort('entity_id', 'ASC')
228
 
229
  } catch (Bootic_Bootic_Exception $e) {
230
  // If an error occured on one of the calls, we flag product as errored and log the errors
231
+ Mage::logException($e);
232
  $statusError = Mage::getModel('bootic/product_data')->getStatusError();
233
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusError);
234
 
238
  } catch (Bootic_Api_Exception $e) {
239
  // Probably a network error or an API downtime
240
  // We try 5 times and then we notify Admin
241
+ Mage::logException($e);
242
+ $statusProcessing = Mage::getModel('bootic/product_data')->getStatusProcessing();
243
  $productData = Mage::getModel('bootic/product_data')->load($product->getId());
244
  $productData->setBooticStatus($statusProcessing);
245
  $productData->incrementUploadFailures();
257
 
258
  } catch (Exception $e) {
259
  // If anything else weird happens, we re-queue the product
260
+ Mage::logException($e);
261
+ $statusProcessing = Mage::getModel('bootic/product_data')->getStatusProcessing();
262
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusProcessing);
263
 
264
  $count ++;
273
  */
274
  public function editProducts()
275
  {
276
+ Mage::log('editProducts');
277
  $collection = Mage::getResourceModel('catalog/product_collection')
278
  ->addAttributeToSelect('*')
279
  ->addAttributeToSort('entity_id', 'ASC')
319
  $count ++;
320
 
321
  } catch (Bootic_Bootic_Exception $e) {
322
+ Mage::logException($e);
323
+ // If update fails or get warning, we show admin the product has errors
324
  $statusException = ($e->isWarning()) ? Mage::getModel('bootic/product_data')->getStatusIncomplete() : Mage::getModel('bootic/product_data')->getStatusError();
325
  $status = ($e->isWarning()) ? 'warning' : 'error';
326
  Mage::helper('bootic/product_data')->updateProductStatus($product, $statusException);
336
  }
337
 
338
  } catch (Exception $e) {
339
+ Mage::logException($e);
340
  // If anything else weird happens, we simply disregard
341
  Mage::log('Failed editing a product on Bootic');
342
  }
352
  */
353
  protected function _isProductUploadable(Mage_Catalog_Model_Product $product)
354
  {
355
+ Mage::log('_isProductUploadable');
356
  $parents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
357
 
358
  $result = true;
374
  */
375
  public function makeSimpleProduct(Mage_Catalog_Model_Product $product)
376
  {
377
+ Mage::log('makeSimpleProduct');
378
  $attributes = $product->getAttributes();
379
  $personalizations = array();
380
  foreach ($attributes as $attribute) {
411
  $productData->save();
412
 
413
  } catch (Bootic_Api_Exception $e) {
414
+ Mage::logException($e);
415
  // If an error occurs during this call, product stock gets set to out of sync
416
  $productData->setIsStockSynced(false);
417
  $productData->save();
420
  // If product upload call originally had warnings, we notify the admin
421
  if ($result->hasWarning()) {
422
  $warningMessages = $result->getWarningMessages();
423
+ Mage::log($warningMessages);
424
+
425
  // We remove the first message which is not intended for Magento Admins
426
  array_shift($warningMessages);
427
  $message = implode(' ', $warningMessages);
428
+ Mage::log($message);
429
  throw new Bootic_Bootic_Exception($message);
430
  }
431
  }
439
  */
440
  public function editSimpleProduct(Mage_Catalog_Model_Product $product)
441
  {
442
+ Mage::log('editSimpleProduct');
443
  $attributes = $product->getAttributes();
444
  $personalizations = array();
445
  foreach ($attributes as $attribute) {
485
  */
486
  public function makeConfigurableProduct(Mage_Catalog_Model_Product $product)
487
  {
488
+ Mage::log('makeConfigurableProduct');
489
  $productAttributes = $this->_getConfigurableProductAttributes($product, $productOptions, $matchedAttributes);
490
 
491
  $attributes = $product->getAttributes();
557
  $_productData->save();
558
 
559
  } catch (Bootic_Api_Exception $e) {
560
+ Mage::logException($e);
561
+
562
  // If an error occurs during this call, product stock gets set to out of sync
563
  $_productData->setIsStockSynced(false);
564
  $_productData->save();
569
  try {
570
  $this->updateProductStock($productId, $stockId, $sku, $stock, $valid);
571
  } catch (Exception $e) {
572
+ Mage::logException($e);
573
  $stockInSync = false;
574
  }
575
  }
581
  // If product upload call originally had warnings, we notify the admin
582
  if ($result->hasWarning()) {
583
  $warningMessages = $result->getWarningMessages();
584
+ Mage::log($warningMessages);
585
  // We remove the first message which is not intended for Magento Admins
586
  array_shift($warningMessages);
587
  $message = implode(' ', $warningMessages);
588
+ Mage::log(message);
589
+
590
  throw new Bootic_Bootic_Exception($message);
591
  }
592
  }
600
  */
601
  public function editConfigurableProduct(Mage_Catalog_Model_Product $product)
602
  {
603
+ Mage::log('editConfigurableProduct');
604
  $productAttributes = $this->_getConfigurableProductAttributes($product, $productOptions, $matchedAttributes);
605
 
606
  $attributes = $product->getAttributes();
629
  throw new Bootic_Bootic_Exception($result->getErrorMessage());
630
  } elseif ($result->hasWarning()) {
631
  $warningMessages = $result->getWarningMessages();
632
+
633
+ Mage::log($warningMessages);
634
+
635
  // We remove the first message which is not intended for Magento Admins
636
  array_shift($warningMessages);
637
  $message = implode(' ', $warningMessages);
638
+ Mage::log($message);
639
+
640
  throw new Bootic_Bootic_Exception($message, 0, null, true);
641
  }
642
  }
643
 
644
  protected function _getConfigurableProductAttributes(Mage_Catalog_Model_Product $product, &$productOptions, &$matchedAttributes)
645
  {
646
+ Mage::log('_getConfigurableProductAttributes');
647
  $productOptions = Mage::helper('bootic/product_type_configurable')->getOptions($product);
648
 
649
  $matchedAttributes = array();
689
  */
690
  public function updateProductStock($productId = null, $stockId = null, $sku = null, $stock = null, $valid = false)
691
  {
692
+ Mage::log('updateProductStock');
693
  $p['product_id'] = (int)$productId;
694
  $p['stock_id'] = $stockId;
695
  $p['sku'] = $sku;
712
  */
713
  public function listProductAvailableAttributes()
714
  {
715
+ Mage::log('listProductAvailableAttributes');
716
  $result = $this->getBootic()->listProductAvailableAttributes();
717
 
718
  return $result->getData();
727
  */
728
  public function createProductAttribute($attributeCode)
729
  {
730
+ Mage::log('createProductAttribute');
731
  if (is_null($attributeCode)) {
732
  throw new Bootic_Bootic_Exception('Attribute code cannot be empty');
733
  }
777
  */
778
  public function addBooticAttribute(array $attribute)
779
  {
780
+ Mage::log('addBooticAttribute');
781
  $this->_booticAttributes[] = $attribute;
782
  return $this;
783
  }
791
  */
792
  private function _prepareBooticProductArray(Mage_Catalog_Model_Product $_product, $product_attributes = null)
793
  {
794
+ Mage::log('_prepareBooticProductArray');
795
  /** @var $product Mage_Catalog_Model_Product */
796
  $product = Mage::getModel('catalog/product')->load($_product->getId());
797
 
921
  */
922
  public function checkProductsStatus()
923
  {
924
+ Mage::log('checkProductsStatus');
925
  $collection = Mage::getResourceModel('catalog/product_collection')
926
  ->addAttributeToSelect('*')
927
  ->addAttributeToSort('entity_id', 'ASC')
991
  */
992
  public function syncProductsStocks()
993
  {
994
+ Mage::log('syncProductsStocks');
995
  $collection = Mage::getResourceModel('catalog/product_collection')
996
  ->addAttributeToSelect('*')
997
  ->addAttributeToSort('entity_id', 'ASC')
1031
  $this->updateProductStock($productId, $stockId, $sku, $stock, $valid);
1032
  Mage::helper('bootic/product_data')->setStockSync($product, true);
1033
  } catch (Exception $e) {
1034
+ Mage::logException($e);
1035
  // Here we just do nothing to let the system retry on its own on a next cron run
1036
  }
1037
  }
app/code/community/Bootic/Bootic/Model/Cron.php CHANGED
@@ -40,4 +40,10 @@ class Bootic_Bootic_Model_Cron extends Mage_Core_Model_Abstract
40
  Mage::log('syncing orders');
41
  Mage::helper('bootic/orders')->syncOrders();
42
  }
 
 
 
 
 
 
43
  }
40
  Mage::log('syncing orders');
41
  Mage::helper('bootic/orders')->syncOrders();
42
  }
43
+
44
+ public function syncCategories()
45
+ {
46
+ Mage::log('syncing categories');
47
+ Mage::helper('bootic/category')->syncCategories();
48
+ }
49
  }
app/code/community/Bootic/Bootic/Model/Mysql4/Category.php CHANGED
@@ -114,7 +114,7 @@ class Bootic_Bootic_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstrac
114
  * @param int $id
115
  * @return array
116
  */
117
- public function lookupParentIds($id)
118
  {
119
  $adapter = $this->_getReadAdapter();
120
 
@@ -135,7 +135,7 @@ class Bootic_Bootic_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstrac
135
  * @param int $id
136
  * @return array
137
  */
138
- public function lookupChildrenIds($id)
139
  {
140
  $adapter = $this->_getReadAdapter();
141
 
@@ -149,4 +149,87 @@ class Bootic_Bootic_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstrac
149
 
150
  return $adapter->fetchCol($select, $binds);
151
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
114
  * @param int $id
115
  * @return array
116
  */
117
+ protected function lookupParentIds($id)
118
  {
119
  $adapter = $this->_getReadAdapter();
120
 
135
  * @param int $id
136
  * @return array
137
  */
138
+ protected function lookupChildrenIds($id)
139
  {
140
  $adapter = $this->_getReadAdapter();
141
 
149
 
150
  return $adapter->fetchCol($select, $binds);
151
  }
152
+
153
+ public function insertCategories(array $categories, DateTime $lastRemoteUpdate)
154
+ {
155
+ // We clear our 2 tables
156
+ $this->_getWriteAdapter()->delete($this->getMainTable());
157
+ $this->_getWriteAdapter()->delete($this->getTable('bootic/category_parent'));
158
+
159
+ $insertCategories = array();
160
+ $insertCategoryParents = array();
161
+ foreach ($categories as $category) {
162
+ $insertCategories[] = array(
163
+ 'category_id' => $category['id'],
164
+ 'name' => $category['name'],
165
+ 'update_time' => $lastRemoteUpdate->format('Y-m-d H:i:s')
166
+ );
167
+
168
+ if (count($category['parents']) > 0) {
169
+ foreach ($category['parents'] as $key => $parent) {
170
+ $insertCategoryParents[] = array(
171
+ 'category_id' => $category['id'],
172
+ 'parent_id' => $parent
173
+ );
174
+ }
175
+ }
176
+ }
177
+
178
+ $this->_getWriteAdapter()->insertMultiple($this->getMainTable(), $insertCategories);
179
+ $this->_getWriteAdapter()->insertMultiple($this->getTable('bootic/category_parent'), $insertCategoryParents);
180
+ }
181
+
182
+ public function getAllCategories()
183
+ {
184
+ $read = $this->_getReadAdapter();
185
+
186
+ $results = $read->fetchAll("SELECT c.*, p.parent_id FROM bootic_category c LEFT JOIN bootic_category_parent p ON p.category_id = c.category_id");
187
+
188
+ $categories = array();
189
+ foreach ($results as $result) {
190
+ if (array_key_exists($result['category_id'], $categories)) {
191
+ $categories[$result['category_id']]['parents'][] = $result['parent_id'];
192
+ } else {
193
+ $categories[$result['category_id']] = array(
194
+ 'category_id' => $result['category_id'],
195
+ 'name' => $result['name'],
196
+ 'parents' => ($result['parent_id'] !== null) ? array($result['parent_id']) : array(),
197
+ 'children' => array()
198
+ );
199
+ }
200
+ }
201
+
202
+ // We populate the children
203
+ foreach ($categories as $category) {
204
+ if (count($category['parents']) > 0) {
205
+ foreach ($category['parents'] as $parent) {
206
+ if (array_key_exists($parent, $categories)) {
207
+ $categories[$parent]['children'][] = $category['category_id'];
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ $booticCategories = array();
214
+ foreach ($categories as $category) {
215
+ $c = Mage::getModel('bootic/category');
216
+
217
+ $c->setCategoryId($category['category_id']);
218
+ $c->setName($category['name']);
219
+ $c->setParents($category['parents']);
220
+ $c->setChildren($category['children']);
221
+
222
+ $booticCategories[$category['category_id']] = $c;
223
+ }
224
+
225
+ return $booticCategories;
226
+ }
227
+
228
+ public function getLocalLastUpdate()
229
+ {
230
+ return $this
231
+ ->_getReadAdapter()
232
+ ->fetchOne("SELECT c.update_time FROM bootic_category c ORDER BY c.update_time DESC")
233
+ ;
234
+ }
235
  }
app/code/community/Bootic/Bootic/Model/Shipping/Flatrate.php CHANGED
@@ -9,20 +9,22 @@ class Bootic_Bootic_Model_Shipping_Flatrate extends Mage_Shipping_Model_Carrier_
9
 
10
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
11
  {
12
-
13
- $result = Mage::getModel('shipping/rate_result');
14
-
15
- $method = Mage::getModel('shipping/rate_result_method');
16
- $method->setCarrier($this->_code);
17
- $method->setCarrierTitle($this->getConfigData('title'));
18
- $method->setMethod('flat_shipping');
19
- $method->setMethodTitle($this->getConfigData('name'));
20
- $method->setPrice(0);
21
- $method->setCost(0);
22
-
23
- $result->append($method);
24
-
25
- return $result;
 
 
26
  }
27
 
28
  public function getAllowedMethods()
@@ -34,4 +36,4 @@ class Bootic_Bootic_Model_Shipping_Flatrate extends Mage_Shipping_Model_Carrier_
34
  {
35
  return false;
36
  }
37
- }
9
 
10
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
11
  {
12
+ if (Mage::registry('bootic_order_creation') ) {
13
+
14
+ $result = Mage::getModel('shipping/rate_result');
15
+
16
+ $method = Mage::getModel('shipping/rate_result_method');
17
+ $method->setCarrier($this->_code);
18
+ $method->setCarrierTitle($this->getConfigData('title'));
19
+ $method->setMethod('flat_shipping');
20
+ $method->setMethodTitle($this->getConfigData('name'));
21
+ $method->setPrice(0);
22
+ $method->setCost(0);
23
+
24
+ $result->append($method);
25
+
26
+ return $result;
27
+ }
28
  }
29
 
30
  public function getAllowedMethods()
36
  {
37
  return false;
38
  }
39
+ }
app/code/community/Bootic/Bootic/controllers/Adminhtml/Catalog/CategoryController.php CHANGED
@@ -12,14 +12,20 @@ class Bootic_Bootic_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_
12
  } catch (Exception $e) {
13
  Mage::getSingleton('adminhtml/session')
14
  ->addError(Mage::helper('bootic')->__('Please select a Root Category and save the configuration.'))
15
- ->addData(array('bootic_category_redirect' => 'bootic/adminhtml_catalog_category/index'));
 
16
 
17
  $this->_redirect('adminhtml/system_config/edit', array('section' => 'bootic'));
18
 
19
  return;
20
  }
21
 
22
- Mage::helper('bootic/category')->pullBooticCategories();
 
 
 
 
 
23
 
24
  $collection = Mage::getResourceModel('bootic/category_mapping_collection')->load();
25
 
@@ -30,11 +36,17 @@ class Bootic_Bootic_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_
30
 
31
  Mage::register('category_mapping', $mapping);
32
 
33
- $this->_title($this->__('Bootic Category Mapping'));
 
 
 
 
 
34
  $this
35
  ->loadLayout()
36
  ->_setActiveMenu('bootic/bootic')
37
- ->renderLayout();
 
38
  }
39
 
40
  public function saveAction()
12
  } catch (Exception $e) {
13
  Mage::getSingleton('adminhtml/session')
14
  ->addError(Mage::helper('bootic')->__('Please select a Root Category and save the configuration.'))
15
+ ->addData(array('bootic_category_redirect' => 'bootic/adminhtml_catalog_category/index'))
16
+ ;
17
 
18
  $this->_redirect('adminhtml/system_config/edit', array('section' => 'bootic'));
19
 
20
  return;
21
  }
22
 
23
+ $categoryCollection = Mage::getResourceModel('bootic/category_collection')->load();
24
+ // We only fetch categories from Bootic if necessary - if they are already in place,
25
+ // we let cron maintain then in sync
26
+ if ($categoryCollection->count() == 0) {
27
+ Mage::helper('bootic/category')->pullBooticCategories();
28
+ }
29
 
30
  $collection = Mage::getResourceModel('bootic/category_mapping_collection')->load();
31
 
36
 
37
  Mage::register('category_mapping', $mapping);
38
 
39
+ if ($email = Mage::getStoreConfig('bootic/account/email')) {
40
+ $this->_title($this->__('Bootic Category Mapping (email: '.$email. ')'));
41
+ } else {
42
+ $this->_title($this->__('Bootic Category Mapping'));
43
+ }
44
+
45
  $this
46
  ->loadLayout()
47
  ->_setActiveMenu('bootic/bootic')
48
+ ->renderLayout()
49
+ ;
50
  }
51
 
52
  public function saveAction()
app/code/community/Bootic/Bootic/controllers/Adminhtml/CatalogController.php CHANGED
@@ -38,11 +38,16 @@ class Bootic_Bootic_Adminhtml_CatalogController extends Bootic_Bootic_Adminhtml_
38
  }
39
  }
40
 
41
- $this->_title($this->__('Bootic Catalog'));
 
 
 
 
 
42
 
43
  $this
44
  ->loadLayout()
45
  ->_setActiveMenu('bootic/bootic')
46
  ->renderLayout();
47
  }
48
- }
38
  }
39
  }
40
 
41
+ $email = Mage::getStoreConfig('bootic/account/email');
42
+ if ($email) {
43
+ $this->_title($this->__('Bootic Catalog (email: '.$email.')'));
44
+ } else {
45
+ $this->_title($this->__('Bootic Catalog'));
46
+ }
47
 
48
  $this
49
  ->loadLayout()
50
  ->_setActiveMenu('bootic/bootic')
51
  ->renderLayout();
52
  }
53
+ }
app/code/community/Bootic/Bootic/controllers/Adminhtml/ConnectController.php CHANGED
@@ -25,7 +25,12 @@ class Bootic_Bootic_Adminhtml_ConnectController extends Bootic_Bootic_Adminhtml_
25
 
26
  public function indexAction()
27
  {
28
- $this->_title($this->__('Bootic Connect'));
 
 
 
 
 
29
  $this
30
  ->loadLayout()
31
  ->_setActiveMenu('bootic/bootic')
25
 
26
  public function indexAction()
27
  {
28
+ $email = Mage::getStoreConfig('bootic/account/email');
29
+ if ($email) {
30
+ $this->_title($this->__('Bootic Connect (email: '.$email.')'));
31
+ } else {
32
+ $this->_title($this->__('Bootic Connect'));
33
+ }
34
  $this
35
  ->loadLayout()
36
  ->_setActiveMenu('bootic/bootic')
app/code/community/Bootic/Bootic/controllers/Adminhtml/StorefrontController.php CHANGED
@@ -24,7 +24,12 @@ class Bootic_Bootic_Adminhtml_StorefrontController extends Bootic_Bootic_Adminht
24
  {
25
  protected function _init()
26
  {
27
- $this->_title($this->__('Bootic Storefront'));
 
 
 
 
 
28
 
29
  $this
30
  ->loadLayout()
@@ -193,4 +198,4 @@ class Bootic_Bootic_Adminhtml_StorefrontController extends Bootic_Bootic_Adminht
193
 
194
  $this->_redirect('*/*/');
195
  }
196
- }
24
  {
25
  protected function _init()
26
  {
27
+ $email = Mage::getStoreConfig('bootic/account/email');
28
+ if ($email) {
29
+ $this->_title($this->__('Bootic Storefront (email: '.$email.')'));
30
+ } else {
31
+ $this->_title($this->__('Bootic Storefront'));
32
+ }
33
 
34
  $this
35
  ->loadLayout()
198
 
199
  $this->_redirect('*/*/');
200
  }
201
+ }
app/code/community/Bootic/Bootic/controllers/Adminhtml/System/CronController.php CHANGED
@@ -4,6 +4,7 @@ class Bootic_Bootic_Adminhtml_System_CronController extends Mage_Adminhtml_Contr
4
  {
5
  public function runProcessOrdersAction()
6
  {
 
7
  try {
8
  $orders = $this->getCronObserver()->processOrders();
9
  $response = array(
@@ -26,6 +27,7 @@ class Bootic_Bootic_Adminhtml_System_CronController extends Mage_Adminhtml_Contr
26
  */
27
  public function getCronObserver()
28
  {
 
29
  return Mage::getModel('bootic/OrdersCronObserver');
30
  }
31
  }
4
  {
5
  public function runProcessOrdersAction()
6
  {
7
+ Mage::log('runProcessOrdersAction');
8
  try {
9
  $orders = $this->getCronObserver()->processOrders();
10
  $response = array(
27
  */
28
  public function getCronObserver()
29
  {
30
+ Mage::log('getCronObserver');
31
  return Mage::getModel('bootic/OrdersCronObserver');
32
  }
33
  }
app/code/community/Bootic/Bootic/controllers/IndexController.php CHANGED
@@ -112,7 +112,12 @@ class Bootic_Bootic_IndexController extends Mage_Core_Controller_Front_Action
112
  public function cronAction()
113
  {
114
  try {
115
- echo Mage::helper('bootic/product')->editProducts();
 
 
 
 
 
116
  } catch (Exception $e) {
117
  var_dump($e);
118
  }
@@ -206,4 +211,22 @@ class Bootic_Bootic_IndexController extends Mage_Core_Controller_Front_Action
206
  Mage::helper('bootic/lists')->getCountries();
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
112
  public function cronAction()
113
  {
114
  try {
115
+ Mage::helper('bootic/product')->uploadProducts();
116
+ Mage::helper('bootic/product')->editProducts();
117
+ Mage::helper('bootic/product')->checkProductsStatus();
118
+ Mage::helper('bootic/product')->syncProductsStocks();
119
+ Mage::helper('bootic/orders')->processPendingOrders();
120
+ Mage::helper('bootic/orders')->syncOrders();
121
  } catch (Exception $e) {
122
  var_dump($e);
123
  }
211
  Mage::helper('bootic/lists')->getCountries();
212
  }
213
 
214
+ public function testTestAction()
215
+ {
216
+ // $result = Mage::helper('bootic/category')->listOrigCategories();
217
+ // $booticCategories = $result->getData();
218
+
219
+
220
+
221
+ $categoryResource = Mage::getResourceModel('bootic/category');
222
+ // $categoryResource->insertCategories($booticCategories);
223
+ $result = $categoryResource->getLastUpdate();
224
+
225
+ }
226
+
227
+ public function syncCategoriesAction()
228
+ {
229
+ Mage::helper('bootic/category')->syncCategories();
230
+ }
231
+
232
  }
app/code/community/Bootic/Bootic/etc/config.xml CHANGED
@@ -244,6 +244,14 @@
244
  <model>bootic/cron::syncOrders</model>
245
  </run>
246
  </bootic_bootic_sync_orders>
 
 
 
 
 
 
 
 
247
  </jobs>
248
  </crontab>
249
  <default>
244
  <model>bootic/cron::syncOrders</model>
245
  </run>
246
  </bootic_bootic_sync_orders>
247
+ <bootic_bootic_sync_categories>
248
+ <schedule>
249
+ <cron_expr>0 0 * * *</cron_expr>
250
+ </schedule>
251
+ <run>
252
+ <model>bootic/cron::syncCategories</model>
253
+ </run>
254
+ </bootic_bootic_sync_categories>
255
  </jobs>
256
  </crontab>
257
  <default>
app/design/adminhtml/default/default/layout/bootic.xml CHANGED
@@ -66,4 +66,4 @@
66
  </reference>
67
  </bootic_adminhtml_system_config_account_index>
68
 
69
- </layout>
66
  </reference>
67
  </bootic_adminhtml_system_config_account_index>
68
 
69
+ </layout>
app/design/adminhtml/default/default/template/bootic/bootic.phtml CHANGED
@@ -7,7 +7,7 @@
7
  <div class="content-header">
8
  <table cellspacing="0" class="grid-header">
9
  <tr>
10
- <td><h3><?php echo $this->__('Bootic - Manage your products') ?></h3></td>
11
  <td class="a-right">
12
  </td>
13
  </tr>
@@ -15,4 +15,4 @@
15
  </div>
16
 
17
  <?php echo $this->getChildHtml('bootic_adminhtml_catalog_tabs'); ?>
18
- <div id="bootic_catalog_tab_content"></div>
7
  <div class="content-header">
8
  <table cellspacing="0" class="grid-header">
9
  <tr>
10
+ <td><h3><?php echo $this->__('Bootic - Manage your products (email: '.Mage::getStoreConfig('bootic/account/email').')') ?></h3></td>
11
  <td class="a-right">
12
  </td>
13
  </tr>
15
  </div>
16
 
17
  <?php echo $this->getChildHtml('bootic_adminhtml_catalog_tabs'); ?>
18
+ <div id="bootic_catalog_tab_content"></div>
app/design/adminhtml/default/default/template/bootic/storefront/banners.phtml CHANGED
@@ -30,7 +30,7 @@ $booticClient = Mage::helper('bootic')->getBootic();
30
  this.addClassName('selected');
31
  $('storefront_banner').value = this.identify();
32
 
33
- updatePreviewBanner(this);
34
  });
35
 
36
  function updatePreviewBanner(banner) {
@@ -38,4 +38,4 @@ $booticClient = Mage::helper('bootic')->getBootic();
38
  $('bannerPreview').src = img.src;
39
  }
40
 
41
- </script>
30
  this.addClassName('selected');
31
  $('storefront_banner').value = this.identify();
32
 
33
+ // updatePreviewBanner(this);
34
  });
35
 
36
  function updatePreviewBanner(banner) {
38
  $('bannerPreview').src = img.src;
39
  }
40
 
41
+ </script>
app/design/adminhtml/default/default/template/bootic/storefront/preview.phtml CHANGED
@@ -11,15 +11,15 @@
11
  <script type="text/javascript">
12
  document.observe("dom:loaded", function() {
13
  var storeOptions = <?php echo json_encode($opts) ?>;
14
- console.log(storeOptions);
15
 
16
  var templates = storeOptions.templates;
17
- var color = "#" + $('storefront_color_theme').value;
18
  var bannerSrc = $$('.banners-container .selected img')[0].src;
19
 
20
  var template = new Element('img');
21
  template.setStyle({ position: 'absolute' });
22
 
 
23
  var banner = new Element('img');
24
  banner.src = bannerSrc;
25
  banner.setStyle({ position: 'absolute', width: '500px', top: '55px'});
@@ -44,7 +44,6 @@
44
  });
45
  }
46
  });
47
-
48
  // Now we track change event on template
49
  // for color see Bootic_Bootic_Block_Adminhtml_Storefront_Edit
50
  // for banner see banners.phtml
@@ -57,6 +56,7 @@
57
  }
58
  });
59
  });
 
60
 
61
  });
62
- </script>
11
  <script type="text/javascript">
12
  document.observe("dom:loaded", function() {
13
  var storeOptions = <?php echo json_encode($opts) ?>;
 
14
 
15
  var templates = storeOptions.templates;
16
+ // var color = "#" + $('storefront_color_theme').value;
17
  var bannerSrc = $$('.banners-container .selected img')[0].src;
18
 
19
  var template = new Element('img');
20
  template.setStyle({ position: 'absolute' });
21
 
22
+ /*
23
  var banner = new Element('img');
24
  banner.src = bannerSrc;
25
  banner.setStyle({ position: 'absolute', width: '500px', top: '55px'});
44
  });
45
  }
46
  });
 
47
  // Now we track change event on template
48
  // for color see Bootic_Bootic_Block_Adminhtml_Storefront_Edit
49
  // for banner see banners.phtml
56
  }
57
  });
58
  });
59
+ */
60
 
61
  });
62
+ </script>
lib/Bootic/Api/Client.php CHANGED
@@ -28,6 +28,7 @@ class Bootic_Api_Client
28
  */
29
  public function __construct(Zend_Rest_Client $restClient = null)
30
  {
 
31
  if (null !== $restClient) {
32
  $this->setRestClient($restClient);
33
  }
@@ -81,6 +82,7 @@ class Bootic_Api_Client
81
  */
82
  public function authenticateByEmailAndPassword($email, $password)
83
  {
 
84
  return $this->_request('/account/login', array(
85
  'email' => $email,
86
  'password' => $password,
@@ -95,6 +97,7 @@ class Bootic_Api_Client
95
  */
96
  public function authenticateByApiKey($apiKey)
97
  {
 
98
  return $this->_request('/account/login', array(
99
  'api_key' => $apiKey
100
  ));
@@ -105,6 +108,7 @@ class Bootic_Api_Client
105
  */
106
  public function getInfo()
107
  {
 
108
  $result = $this->_request('/common/info');
109
 
110
  return $result;
@@ -116,6 +120,7 @@ class Bootic_Api_Client
116
  */
117
  public function getCommonList($type)
118
  {
 
119
  return $this->_request('/common/list', array('name' => $type));
120
  }
121
  /**
@@ -126,6 +131,7 @@ class Bootic_Api_Client
126
  */
127
  public function createAccount($email, $password)
128
  {
 
129
  $result = $this->_request('account/create', array(
130
  'email' => $email,
131
  'password' => $password
@@ -144,6 +150,7 @@ class Bootic_Api_Client
144
  */
145
  public function createKey($apiKeyName, $apiKeyDescription)
146
  {
 
147
  $result = $this->_request('/account/create_key', array(
148
  'api_key_name' => $apiKeyName,
149
  'api_key_description' => $apiKeyDescription
@@ -159,6 +166,7 @@ class Bootic_Api_Client
159
  */
160
  public function getProfile()
161
  {
 
162
  $result = $this->_request('/account/get_profile');
163
 
164
  return $result;
@@ -172,6 +180,9 @@ class Bootic_Api_Client
172
  */
173
  public function editProfile(array $profile)
174
  {
 
 
 
175
  $result = $this->_request('/account/edit_profile', $profile);
176
 
177
  return $result;
@@ -185,6 +196,7 @@ class Bootic_Api_Client
185
  */
186
  public function editProfilePicture(array $data)
187
  {
 
188
  $result = $this->_request('/account/edit_profile_image', $data);
189
 
190
  return $result;
@@ -198,6 +210,7 @@ class Bootic_Api_Client
198
  */
199
  public function getOrderList(array $params = array())
200
  {
 
201
  $result = $this->_request('/transaction/list_orders', $params);
202
  if ($result->getData('record_count') > 0) {
203
  //load additional data
@@ -223,6 +236,7 @@ class Bootic_Api_Client
223
  */
224
  public function updateTransactionStatus($id, array $data)
225
  {
 
226
  $data['id'] = $id;
227
  $result = $this->_request('/transaction/update_status', $data);
228
  return $result;
@@ -234,6 +248,7 @@ class Bootic_Api_Client
234
  */
235
  public function getSalesList(array $params = array())
236
  {
 
237
  $result = $this->_request('/transaction/list_sales', $params);
238
  return $result;
239
  }
@@ -245,6 +260,7 @@ class Bootic_Api_Client
245
  */
246
  public function getStoreFrontList()
247
  {
 
248
  $result = $this->_request('/storefront/list');
249
 
250
  return $result;
@@ -258,6 +274,7 @@ class Bootic_Api_Client
258
  */
259
  public function createStorefront(array $data)
260
  {
 
261
  $result = $this->_request('/storefront/create', $data);
262
 
263
  return $result;
@@ -271,6 +288,7 @@ class Bootic_Api_Client
271
  */
272
  public function updateStorefront(array $data)
273
  {
 
274
  $result = $this->_request('/storefront/update', $data);
275
 
276
  return $result;
@@ -284,6 +302,7 @@ class Bootic_Api_Client
284
  */
285
  public function getAvailableOptionsForStorefront($shop_id)
286
  {
 
287
  $result = $this->_request('/storefront/get_available_options', array(
288
  'shop_id' => $shop_id
289
  ));
@@ -299,6 +318,7 @@ class Bootic_Api_Client
299
  */
300
  public function addStorefrontBanner(array $data)
301
  {
 
302
  $result = $this->_request('/storefront/add_banner', $data);
303
 
304
  return $result;
@@ -312,6 +332,7 @@ class Bootic_Api_Client
312
  */
313
  public function addProduct(array $data)
314
  {
 
315
  $result = $this->_request('product/add_product', $data);
316
 
317
  return $result;
@@ -325,6 +346,7 @@ class Bootic_Api_Client
325
  */
326
  public function editProduct(array $data)
327
  {
 
328
  $result = $this->_request('product/edit_product', $data);
329
 
330
  return $result;
@@ -338,6 +360,7 @@ class Bootic_Api_Client
338
  */
339
  public function updateProductStock(array $data)
340
  {
 
341
  $result = $this->_request('product/update_product_stock', $data);
342
 
343
  return $result;
@@ -351,6 +374,7 @@ class Bootic_Api_Client
351
  */
352
  public function getProductStock(array $data)
353
  {
 
354
  $result = $this->_request('product/get_product_stock', $data);
355
 
356
  return $result;
@@ -364,6 +388,7 @@ class Bootic_Api_Client
364
  */
365
  public function getProductInfo(array $data)
366
  {
 
367
  $result = $this->_request('/product/get_product_info', $data);
368
 
369
  return $result;
@@ -377,6 +402,7 @@ class Bootic_Api_Client
377
  */
378
  public function createProductAttribute(array $data)
379
  {
 
380
  $result = $this->_request('product/create_attribute', $data);
381
 
382
  return $result;
@@ -389,6 +415,7 @@ class Bootic_Api_Client
389
  */
390
  public function listProductAvailableAttributes()
391
  {
 
392
  $result = $this->_request('product/list_available_attributes');
393
 
394
  return $result;
@@ -401,6 +428,7 @@ class Bootic_Api_Client
401
  */
402
  public function listCategories()
403
  {
 
404
  $result = $this->_request('category/list');
405
 
406
  return $result;
@@ -413,6 +441,7 @@ class Bootic_Api_Client
413
  */
414
  public function getAccountMessages()
415
  {
 
416
  $result = $this->_request('account/message');
417
 
418
  return $result;
@@ -426,6 +455,7 @@ class Bootic_Api_Client
426
  */
427
  public function markMessageAsRead(array $data)
428
  {
 
429
  $result = $this->_request('message/mark_as_read', $data);
430
 
431
  return $result;
@@ -434,11 +464,20 @@ class Bootic_Api_Client
434
 
435
  public function getOrderDetails($orderId)
436
  {
 
437
  $result = $this->_request('/transaction/get_order_details', array('id' => $orderId));
438
 
439
  return $result;
440
  }
441
 
 
 
 
 
 
 
 
 
442
  /**
443
  * Issues the request, always with POST method
444
  *
@@ -481,6 +520,7 @@ class Bootic_Api_Client
481
  */
482
  public function setRestClient($restClient)
483
  {
 
484
  $this->_restClient = $restClient;
485
  $this->_restClient->setUri(Zend_Uri_Http::fromString($this->_defaultUri));
486
 
@@ -492,6 +532,7 @@ class Bootic_Api_Client
492
  */
493
  public function getRestClient()
494
  {
 
495
  if (null == $this->_restClient) {
496
  $restClient = new Zend_Rest_Client();
497
  $this->setRestClient($restClient);
@@ -506,6 +547,7 @@ class Bootic_Api_Client
506
  */
507
  public function setCookieJar($cookieJar)
508
  {
 
509
  $this->_cookieJar = $cookieJar;
510
 
511
  return $this;
@@ -516,6 +558,7 @@ class Bootic_Api_Client
516
  */
517
  public function getCookieJar()
518
  {
 
519
  return $this->_cookieJar;
520
  }
521
 
@@ -525,6 +568,7 @@ class Bootic_Api_Client
525
  */
526
  public function addUri($key, $value)
527
  {
 
528
  $this->_uris[$key] = $value;
529
  }
530
 
@@ -534,6 +578,7 @@ class Bootic_Api_Client
534
  */
535
  public function hasUri($key)
536
  {
 
537
  return array_key_exists($key, $this->_uris);
538
  }
539
 
@@ -546,6 +591,7 @@ class Bootic_Api_Client
546
  */
547
  public function getUri($key, $asString = false)
548
  {
 
549
  if ($this->hasUri($key)) {
550
  if ($asString) {
551
  return (string) $this->_uris[$key];
28
  */
29
  public function __construct(Zend_Rest_Client $restClient = null)
30
  {
31
+ Mage::log("construct");
32
  if (null !== $restClient) {
33
  $this->setRestClient($restClient);
34
  }
82
  */
83
  public function authenticateByEmailAndPassword($email, $password)
84
  {
85
+ Mage::log("authenticateByEmailAndPassword");
86
  return $this->_request('/account/login', array(
87
  'email' => $email,
88
  'password' => $password,
97
  */
98
  public function authenticateByApiKey($apiKey)
99
  {
100
+ Mage::log("authenticateByApiKey");
101
  return $this->_request('/account/login', array(
102
  'api_key' => $apiKey
103
  ));
108
  */
109
  public function getInfo()
110
  {
111
+ Mage::log("getInfo");
112
  $result = $this->_request('/common/info');
113
 
114
  return $result;
120
  */
121
  public function getCommonList($type)
122
  {
123
+ Mage::log("getCommonList");
124
  return $this->_request('/common/list', array('name' => $type));
125
  }
126
  /**
131
  */
132
  public function createAccount($email, $password)
133
  {
134
+ Mage::log("createAccount");
135
  $result = $this->_request('account/create', array(
136
  'email' => $email,
137
  'password' => $password
150
  */
151
  public function createKey($apiKeyName, $apiKeyDescription)
152
  {
153
+ Mage::log("createKey");
154
  $result = $this->_request('/account/create_key', array(
155
  'api_key_name' => $apiKeyName,
156
  'api_key_description' => $apiKeyDescription
166
  */
167
  public function getProfile()
168
  {
169
+ Mage::log("getProfile");
170
  $result = $this->_request('/account/get_profile');
171
 
172
  return $result;
180
  */
181
  public function editProfile(array $profile)
182
  {
183
+ Mage::log("editProfile");
184
+ Mage::log("profile = [$profile]");
185
+ Mage::log($profile);
186
  $result = $this->_request('/account/edit_profile', $profile);
187
 
188
  return $result;
196
  */
197
  public function editProfilePicture(array $data)
198
  {
199
+ Mage::log("editProfilePicture");
200
  $result = $this->_request('/account/edit_profile_image', $data);
201
 
202
  return $result;
210
  */
211
  public function getOrderList(array $params = array())
212
  {
213
+ Mage::log("getOrderList");
214
  $result = $this->_request('/transaction/list_orders', $params);
215
  if ($result->getData('record_count') > 0) {
216
  //load additional data
236
  */
237
  public function updateTransactionStatus($id, array $data)
238
  {
239
+ Mage::log("updateTransactionStatus");
240
  $data['id'] = $id;
241
  $result = $this->_request('/transaction/update_status', $data);
242
  return $result;
248
  */
249
  public function getSalesList(array $params = array())
250
  {
251
+ Mage::log("getSalesList");
252
  $result = $this->_request('/transaction/list_sales', $params);
253
  return $result;
254
  }
260
  */
261
  public function getStoreFrontList()
262
  {
263
+ Mage::log("getStoreFrontList");
264
  $result = $this->_request('/storefront/list');
265
 
266
  return $result;
274
  */
275
  public function createStorefront(array $data)
276
  {
277
+ Mage::log("createStorefront");
278
  $result = $this->_request('/storefront/create', $data);
279
 
280
  return $result;
288
  */
289
  public function updateStorefront(array $data)
290
  {
291
+ Mage::log("updateStorefront");
292
  $result = $this->_request('/storefront/update', $data);
293
 
294
  return $result;
302
  */
303
  public function getAvailableOptionsForStorefront($shop_id)
304
  {
305
+ Mage::log("getAvailableOptionsForStorefront");
306
  $result = $this->_request('/storefront/get_available_options', array(
307
  'shop_id' => $shop_id
308
  ));
318
  */
319
  public function addStorefrontBanner(array $data)
320
  {
321
+ Mage::log("addStorefrontBanner");
322
  $result = $this->_request('/storefront/add_banner', $data);
323
 
324
  return $result;
332
  */
333
  public function addProduct(array $data)
334
  {
335
+ Mage::log("addProduct");
336
  $result = $this->_request('product/add_product', $data);
337
 
338
  return $result;
346
  */
347
  public function editProduct(array $data)
348
  {
349
+ Mage::log("editProduct");
350
  $result = $this->_request('product/edit_product', $data);
351
 
352
  return $result;
360
  */
361
  public function updateProductStock(array $data)
362
  {
363
+ Mage::log("updateProductStock");
364
  $result = $this->_request('product/update_product_stock', $data);
365
 
366
  return $result;
374
  */
375
  public function getProductStock(array $data)
376
  {
377
+ Mage::log("getProductStock");
378
  $result = $this->_request('product/get_product_stock', $data);
379
 
380
  return $result;
388
  */
389
  public function getProductInfo(array $data)
390
  {
391
+ Mage::log("getProductInfo");
392
  $result = $this->_request('/product/get_product_info', $data);
393
 
394
  return $result;
402
  */
403
  public function createProductAttribute(array $data)
404
  {
405
+ Mage::log("createProductAttribute");
406
  $result = $this->_request('product/create_attribute', $data);
407
 
408
  return $result;
415
  */
416
  public function listProductAvailableAttributes()
417
  {
418
+ Mage::log("listProductAvailableAttributes");
419
  $result = $this->_request('product/list_available_attributes');
420
 
421
  return $result;
428
  */
429
  public function listCategories()
430
  {
431
+ Mage::log("listCategories");
432
  $result = $this->_request('category/list');
433
 
434
  return $result;
441
  */
442
  public function getAccountMessages()
443
  {
444
+ Mage::log("getAccountMessages");
445
  $result = $this->_request('account/message');
446
 
447
  return $result;
455
  */
456
  public function markMessageAsRead(array $data)
457
  {
458
+ Mage::log("markMessageAsRead");
459
  $result = $this->_request('message/mark_as_read', $data);
460
 
461
  return $result;
464
 
465
  public function getOrderDetails($orderId)
466
  {
467
+ Mage::log("getOrderDetails");
468
  $result = $this->_request('/transaction/get_order_details', array('id' => $orderId));
469
 
470
  return $result;
471
  }
472
 
473
+ public function getCategoriesLastModified()
474
+ {
475
+ Mage::log("getCategoriesLastModified");
476
+ $result = $this->_request('/category/modified');
477
+
478
+ return $result;
479
+ }
480
+
481
  /**
482
  * Issues the request, always with POST method
483
  *
520
  */
521
  public function setRestClient($restClient)
522
  {
523
+ Mage::log("setRestClient");
524
  $this->_restClient = $restClient;
525
  $this->_restClient->setUri(Zend_Uri_Http::fromString($this->_defaultUri));
526
 
532
  */
533
  public function getRestClient()
534
  {
535
+ Mage::log("getRestClient");
536
  if (null == $this->_restClient) {
537
  $restClient = new Zend_Rest_Client();
538
  $this->setRestClient($restClient);
547
  */
548
  public function setCookieJar($cookieJar)
549
  {
550
+ Mage::log("setCookieJar");
551
  $this->_cookieJar = $cookieJar;
552
 
553
  return $this;
558
  */
559
  public function getCookieJar()
560
  {
561
+ Mage::log("getCookieJar");
562
  return $this->_cookieJar;
563
  }
564
 
568
  */
569
  public function addUri($key, $value)
570
  {
571
+ Mage::log("addUri");
572
  $this->_uris[$key] = $value;
573
  }
574
 
578
  */
579
  public function hasUri($key)
580
  {
581
+ Mage::log("hasUri");
582
  return array_key_exists($key, $this->_uris);
583
  }
584
 
591
  */
592
  public function getUri($key, $asString = false)
593
  {
594
+ Mage::log("getUri");
595
  if ($this->hasUri($key)) {
596
  if ($asString) {
597
  return (string) $this->_uris[$key];
lib/Bootic/Api/Result.php CHANGED
@@ -84,7 +84,10 @@ class Bootic_Api_Result
84
  }
85
  $this->setHasWarning($hasWarning);
86
 
87
- $this->setData(null, $data['data']);
 
 
 
88
  }
89
 
90
  /**
@@ -208,4 +211,4 @@ class Bootic_Api_Result
208
  {
209
  return array_key_exists($name, $this->_data);
210
  }
211
- }
84
  }
85
  $this->setHasWarning($hasWarning);
86
 
87
+ Mage::log($data);
88
+ if (isset($data['data'])) {
89
+ $this->setData(null, $data['data']);
90
+ }
91
  }
92
 
93
  /**
211
  {
212
  return array_key_exists($name, $this->_data);
213
  }
214
+ }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bootic</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>Berkeley Software Distribution License (BSDL)</license>
7
  <channel>community</channel>
@@ -17,11 +17,11 @@ Automatically synchronize orders placed on Bootic.com into your Magento store. A
17
  Automatically update any change to your product information from your Magento store to your Bootic storefront.&#xD;
18
  &#xD;
19
  With Bootic for Magento, create a new channel for selling your products without adding any overhead to your store management.</description>
20
- <notes>Updated database schema for new Bootic category tree</notes>
21
- <authors><author><name>Stephane Tougard</name><user>bootic</user><email>magento@bootic.com</email></author></authors>
22
- <date>2013-01-03</date>
23
- <time>17:31:10</time>
24
- <contents><target name="magecommunity"><dir name="Bootic"><dir name="Bootic"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><file name="Category.php" hash="61e515ee3ab1114b42e0469a621ebfb5"/><dir name="Tab"><file name="General.php" hash="659bd4392cad0c83b914c3a56a3caba2"/></dir><file name="Tabs.php" hash="ad9b5ae88bcad6c62c5218305e287592"/></dir><file name="Catalog.php" hash="75a07745c1c30434ea317aa818925864"/><dir name="Connect"><dir name="Profile"><file name="Form.php" hash="13fabf5e01c3bca00de40dcd5d539ac6"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name="Profile.php" hash="53c9d21a74afcda2b3e01b248fcf46ce"/></dir><dir name="Log"><file name="Error.php" hash="2e6dadac4c46fa269a11974c63a205e7"/><file name="Grid.php" hash="ca0f774aa0c303f5c1ff5ea2a4ce2c20"/></dir><file name="Log.php" hash="4e5e1775d3d67c3d2d4a72abd76240e3"/><file name="Product.php" hash="b6846a5fe9f6b3f7073838039a501854"/><dir name="Storefront"><file name="Banner.php" hash="e12622feb541bcecb07343299f2f2edf"/><dir name="Create"><file name="Form.php" hash="aa8296efce9f909b58d03e70b60852d0"/></dir><file name="Create.php" hash="5ba25ea32fd4353ae6a7ac6686aade7b"/><dir name="Edit"><file name="Form.php" hash="a3016d71e63337bdf6a2101376c09fe6"/><dir name="Tab"><dir name="Design"><file name="Preview.php" hash="b9edb2c70a2266959721065872274f3a"/></dir><file name="Design.php" hash="c666ff3a2987ebe7fa933ef8a40c0668"/><file name="General.php" hash="9f2667b3f6304077526a2d2b9498ca92"/><file name="Settings.php" hash="6dfcebbbde9dc81aaf9679ab428eaa28"/><file name="Social.php" hash="e08a86710f2c92ba4ab47c98e67e4244"/></dir><file name="Tabs.php" hash="3b2b2b8d9a3c6e8acb2b0b40560cde78"/></dir><file name="Edit.php" hash="7f3830d12da3cac1fff52f760bf23526"/><file name="Preview.php" hash="887ef63c7fb5694dd63960fc197a91d3"/></dir><dir name="System"><dir name="Config"><dir name="Account"><dir name="Create"><file name="Form.php" hash="d4d6bbb2b6834400187b5dbf9f7d5424"/></dir><file name="Create.php" hash="c0f3159d6d5c3da1b4c7c6574b24bfed"/></dir><dir name="Button"><file name="Cron.php" hash="599c7cbf533a2809cb0e8b4c330d068b"/></dir><file name="Createaccount.php" hash="3192790d6089cbdf2c5b542ae49fd48e"/><file name="Tabs.php" hash="a5cb3c71b707f8ed002a1d33b7e1f9b2"/><file name="Testapiconnection.php" hash="b1cd2c239ed264355ddbf724661d54e8"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><dir name="Log"><file name="Message.php" hash="ce36a8329355d7dfeaaa10e401bb7aba"/></dir></dir></dir></dir></dir><file name=".DS_Store" hash="86b5d0dc5126cf670280b5f5be2b8986"/></dir><dir name="Payment"><file name="Form.php" hash="bb94bee836626fa1636997f308a59f3f"/><file name="Info.php" hash="e878b75b994f9a6c97826e6acca70ca2"/></dir><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/></dir><file name="Exception.php" hash="85fa2711bf13af12eab9162e927f4bd1"/><dir name="Helper"><file name="Abstract.php" hash="d48714ad954c69a1f13f8d835dbcbdad"/><file name="Account.php" hash="dab88db126c74e21039d2765fba289d2"/><file name="Api.php" hash="cce30bd36caee36bab0d18510a0ddc16"/><file name="Category.php" hash="0aac5e04199fa1fc06adcd55a4d1e03f"/><file name="Connect.php" hash="0e33dccb82732343518f6bea1ea83135"/><file name="Data.php" hash="a44a46a29fad09ce994c61b183c5730a"/><file name="Lists.php" hash="cedbf515e0ebe42b1408d8aa73d5e0ba"/><file name="Log.php" hash="4bf257fb8d16c7f25497331469022697"/><file name="Message.php" hash="dc9fb0d515d896972d0039dc736d9154"/><file name="Orders.php" hash="3c7c90992f46479d27140c15072ad695"/><dir name="Product"><file name="Data.php" hash="57a58c08a8e097077d66f4cbd20bf7cd"/><file name="Inventory.php" hash="9e94729f86617dd8b413d2ecfeb99448"/><dir name="Type"><file name="Configurable.php" hash="bc76e8e796578163416b32308dec5407"/></dir></dir><file name="Product.php" hash="08de3b6229ee848eaa343f27d6bdcf95"/><file name="Storefront.php" hash="902b7ce9f6bc72c52c921fb0b2197377"/></dir><dir name="Model"><dir name="Category"><file name="Mapping.php" hash="d90be7d27649c5388566d3bddca38c57"/></dir><file name="Category.php" hash="0308ca6b03e2340693077407cc0fc122"/><file name="Cron.php" hash="11758c445d08649c600a9f57d92cc207"/><file name="Log.php" hash="77f49a02f8c9cf71aa8ec84a1acf55a9"/><dir name="Message"><file name="Observer.php" hash="1f543cba2b2771915d225fdad36699d4"/></dir><file name="Message.php" hash="5eb2da8d19c607222c3d6297a7dbb23d"/><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="a2afe60249de587c18e2d2f4ac2d7a78"/><dir name="Mapping"><file name="Collection.php" hash="614dda5dadab20f3b7725e2d5b556e6a"/></dir><file name="Mapping.php" hash="887d7cf4576ffd2c4b40dcf80e6c7021"/></dir><file name="Category.php" hash="9184a297db32337680b6ca54b4e73b74"/><dir name="Log"><file name="Collection.php" hash="d43c896a4c6de8e2280938373739e6e7"/></dir><file name="Log.php" hash="aa05f1803941172a8df3bcf5b4310016"/><file name="Message.php" hash="3f300ab7f6e5133487622562f9db55be"/><dir name="Order"><file name="Data.php" hash="c4e49baba9627bbbdb1b8d69012ac07f"/></dir><dir name="Product"><dir name="Data"><file name="Collection.php" hash="9176b66372bbbe51bb597d4ee2b86f35"/></dir><file name="Data.php" hash="a1365dedd73e0cc3d32d17ee3e0643ff"/></dir></dir><dir name="Order"><file name="Data.php" hash="1a5a72b9ef87f1d5323369535d8e0933"/><file name="Observer.php" hash="73e779f2b27d5ee623bab6bbd55a43ba"/></dir><file name="Payment.php" hash="d021f0560f01b89a37ba2c4d4de26804"/><dir name="Product"><file name="Data.php" hash="c92c28a67e616dc63c4aaccb5bdb5231"/><file name="Observer.php" hash="72b57ae0b34bc195c9b26e0427a9c632"/></dir><file name="Profile.php" hash="4a2067406d93a10aba308f52fc012ca3"/><dir name="Session"><file name="Observer.php" hash="f46c8ac3ce3c987c5ec79f4b9a90d159"/></dir><dir name="Shipping"><file name="Flatrate.php" hash="c383f093244cd04e0ca27583fd0527d1"/></dir><dir name="Stock"><file name="Observer.php" hash="5ff1fe7c76ffbdc5d07173cea2dc03e2"/></dir><file name="Storefront.php" hash="10b6a555b86331d03d4836887065a4ae"/><dir name="System"><dir name="Config"><file name="Commission.php" hash="ee9df0d2091afb9efac78c5eeb6c2c8d"/><file name="Connection.php" hash="7b1fdab2f86c4bd158e7f587b0332e42"/><file name="Observer.php" hash="5669f88c72bb8ff10cb84fd43133b268"/><dir name="Source"><file name="Attribute.php" hash="0d02faa3c926ef506c147b64e494313b"/><file name="Image.php" hash="90c2bb6ff6b860a9abc9a2b181fa8ec0"/><file name="Store.php" hash="15e70a19b7acd1890d45fed5d837cb02"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AbstractController.php" hash="b89a3229d94b02889a4a5cfa9b37d141"/><dir name="Catalog"><file name="CategoryController.php" hash="f31b36b88b88f020e90b4c43ff74a94b"/><file name="ProductController.php" hash="16527d9cd2c76e6f34249d66e7efd131"/></dir><file name="CatalogController.php" hash="7e50ea47a0c0afcba1598c3ef0fb5d02"/><file name="ConnectController.php" hash="e001299d152d1cd5fdec3650de8eeec9"/><file name="StorefrontController.php" hash="7a1e4ae9485cce71670bfcdcab5e7cb5"/><dir name="System"><dir name="Config"><file name="AccountController.php" hash="7296e50848f908ee4f4ce37e5c2552fe"/><file name="TestapiconnectionController.php" hash="1e712c1c029d289e269a74d10bd9c74e"/></dir><file name="CronController.php" hash="a6b58f29920488dca0062d71a4058b0f"/></dir></dir><file name="IndexController.php" hash="eeabb3471a6e5b8327f32165002800ed"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2f0649aae5e258fbd195b6a61871359"/><file name="config.xml" hash="752f521749dd8c87ca323cd6b5ebd872"/><file name="system.xml" hash="5d1f1f14ba871a69c1d1f5597c4a41f9"/></dir><dir name="sql"><dir name="bootic_setup"><file name="mysql4-install-1.0.0.php" hash="88f4a6dbf3bf7144992ef9d24ed7deac"/><file name="mysql4-upgrade-1.0.0-1.0.2.php" hash="d6c0f1b560661e68a1ffb897bd32d8db"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="176ff25ca3c96ca91ea2ceb80dd7304b"/></dir><file name=".DS_Store" hash="665e7b0adb116db6663e012e46df97a0"/></dir></target><target name="magelib"><dir name="Bootic"><dir name="Api"><file name="Client.php" hash="ff0db90404a62cdbbcb7130628496ef0"/><dir name="Exception"><file name="UnsupportedDataType.php" hash="aaa6d6d08d34f10ca99766135b7a8942"/></dir><file name="Exception.php" hash="7482fb7536873fbd95a87dd5c34fcdfb"/><file name="Result.php" hash="acbda91e9d44f6a3e6145f02ff0db7c4"/></dir><dir name="File"><file name="Uploader.php" hash="51d7167bd4f68b143d0a1349acbf4c0b"/></dir><dir name="Tests"><dir name="Fixtures"><file name="account_create.json" hash="a66b8d81d7d837fcd5e6663477207113"/><file name="order_list.json" hash="73676f4c34d8d1fe0dccd887bc17d457"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bootic_Bootic.xml" hash="1bf446ba0b56654285cdda9e3eb9caa5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bootic.xml" hash="894aef183d5db57b26451ffdda0a7b63"/></dir><dir name="template"><dir name="bootic"><dir name="adminhtml"><dir name="system"><dir name="config"><dir name="button"><file name="cron.phtml" hash="8bc3c44ee69082c8bc16f964546246f9"/></dir><file name="createaccount.phtml" hash="89cbf36935071304deb3046f780c132f"/><file name="testapiconnection.phtml" hash="61be68e23ebdc238818a3e14a87aa0f0"/></dir></dir></dir><file name="bootic.phtml" hash="482f4ca6e0d96f0266a63e697ccd7857"/><dir name="catalog"><file name="category.phtml" hash="a51881b295fd898c4404c9a8506a6a59"/><dir name="tab"><file name="general.phtml" hash="3dd8fef0fd39457f70bfda2a94edecba"/></dir></dir><dir name="log"><file name="error.phtml" hash="76097855fd05302da368d17966db3942"/></dir><file name="products.phtml" hash="9af8e0740e281d494e402c413380cb1e"/><dir name="storefront"><file name="banners.phtml" hash="996f628a818a718cdc8b2d8bfcfe9810"/><file name="preview.phtml" hash="7d115f25724734f12ffa212328f7e6f3"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="bootic"><dir name="prototype-color-picker"><dir name="css"><file name="prototype_colorpicker.css" hash="1e2474f995501728e7cb3a5f74690523"/></dir><dir name="images"><file name="blank.gif" hash="56398e76be6355ad5999b262208a17c9"/><file name="colorpicker_background.png" hash="a79f1a2a81bfe3ed1c2ca4c41b8e1fbf"/><file name="colorpicker_extra.png" hash="920c87d67408ee59529aa1789836a0eb"/><file name="colorpicker_extra_background.png" hash="ae834a141fb00963c5056f015c99db71"/><file name="colorpicker_hex.png" hash="16d6870c36e379c06fb26ebd2e16bf44"/><file name="colorpicker_hsb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_hsb_h.png" hash="d47409a203bedc76b26dc60b71a69f6b"/><file name="colorpicker_hsb_s.png" hash="5ff5e43ab6b7b41b6123bfab692a9b19"/><file name="colorpicker_indic.gif" hash="f485d07540a89502e36dc1a55cec05d0"/><file name="colorpicker_overlay.png" hash="c7a33805ffda0d32bd2a9904c8b02750"/><file name="colorpicker_rgb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_rgb_g.png" hash="dc17f953a6febbe174e92b54690586c3"/><file name="colorpicker_rgb_r.png" hash="87eeb205d093b713b68a341771f4ee27"/><file name="colorpicker_select.gif" hash="cec464162af0cce10348e7bb7701ef86"/><file name="colorpicker_submit.png" hash="e887e023931707d8b63e390bfad1f39b"/><file name="custom_background.png" hash="06c91f7ae1561ccd8f1c79119529600d"/><file name="custom_hex.png" hash="e27aaa92b15d9392d909f8b94e797524"/><file name="custom_hsb_b.png" hash="b45588ca2fe9ba46673862300fcd3083"/><file name="custom_hsb_h.png" hash="4a1afa5636421aae4c44471d2273496d"/><file name="custom_hsb_s.png" hash="83aa97407fb76615a7db5ed721681148"/><file name="custom_indic.gif" hash="04660eb352eb259581a36a0fe8da2d4d"/><file name="custom_rgb_b.png" hash="f6e50cd567bd3059742d45ab224a413b"/><file name="custom_rgb_g.png" hash="b1e286e06692b3640862a3d07f636a80"/><file name="custom_rgb_r.png" hash="8ae4b3ef109ee66ec1022632470ddd0f"/><file name="custom_submit.png" hash="35423f0f2538e507dec193b52f8d0327"/><file name="select.png" hash="7b086953a8c62d2685a65644979d5d04"/><file name="select2.png" hash="c8d194d92dbad98615b2a9140b34ab48"/><file name="slider.png" hash="3a50b8078dea50b9811603a85ecef836"/></dir><file name="index.html" hash="c9c853215e6be66882221be357c84c16"/><dir name="js"><file name="prototype.1.6.js" hash="965fe52b851d8ff3c2b915ada9fb273f"/><file name="prototype_colorpicker.js" hash="90a7fd9030d010fac223f95953dc7b59"/></dir><file name=".DS_Store" hash="cf29419b5633cc71cfcb916356c6da81"/></dir></dir></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.2.0</min><max>5.4.10</max></php></required></dependencies>
27
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bootic</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>Berkeley Software Distribution License (BSDL)</license>
7
  <channel>community</channel>
17
  Automatically update any change to your product information from your Magento store to your Bootic storefront.&#xD;
18
  &#xD;
19
  With Bootic for Magento, create a new channel for selling your products without adding any overhead to your store management.</description>
20
+ <notes>Fixed some minor bugs and improved performance</notes>
21
+ <authors><author><name>Pierre Vigier</name><user>bootic</user><email>magento@bootic.com</email></author></authors>
22
+ <date>2013-03-12</date>
23
+ <time>23:48:45</time>
24
+ <contents><target name="magecommunity"><dir name="Bootic"><dir name="Bootic"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><file name="Category.php" hash="b7aceadd40ea7fd556782ea80bb836f8"/><dir name="Tab"><file name="General.php" hash="659bd4392cad0c83b914c3a56a3caba2"/></dir><file name="Tabs.php" hash="ad9b5ae88bcad6c62c5218305e287592"/></dir><file name="Catalog.php" hash="75a07745c1c30434ea317aa818925864"/><dir name="Connect"><dir name="Profile"><file name="Form.php" hash="13fabf5e01c3bca00de40dcd5d539ac6"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name="Profile.php" hash="f7ce30351fddda454221136828aba4af"/></dir><dir name="Log"><file name="Error.php" hash="2e6dadac4c46fa269a11974c63a205e7"/><file name="Grid.php" hash="ca0f774aa0c303f5c1ff5ea2a4ce2c20"/></dir><file name="Log.php" hash="4e5e1775d3d67c3d2d4a72abd76240e3"/><file name="Product.php" hash="e4e9e6612ba8ec3029c5ba05ff820898"/><dir name="Storefront"><file name="Banner.php" hash="e12622feb541bcecb07343299f2f2edf"/><dir name="Create"><file name="Form.php" hash="0b678fc55cc65c5305dbec435a270a1c"/></dir><file name="Create.php" hash="5ba25ea32fd4353ae6a7ac6686aade7b"/><dir name="Edit"><file name="Form.php" hash="a3016d71e63337bdf6a2101376c09fe6"/><dir name="Tab"><dir name="Design"><file name="Preview.php" hash="9b9dc48c084a11ba04fd6dd5b18f51db"/></dir><file name="Design.php" hash="6c1eaa59d2e8010a3b98109c0fbb1192"/><file name="General.php" hash="9f2667b3f6304077526a2d2b9498ca92"/><file name="Settings.php" hash="6dfcebbbde9dc81aaf9679ab428eaa28"/><file name="Social.php" hash="e08a86710f2c92ba4ab47c98e67e4244"/></dir><file name="Tabs.php" hash="3b2b2b8d9a3c6e8acb2b0b40560cde78"/></dir><file name="Edit.php" hash="bf60ded0738512ddebb787e6bff564f2"/><file name="Preview.php" hash="887ef63c7fb5694dd63960fc197a91d3"/></dir><dir name="System"><dir name="Config"><dir name="Account"><dir name="Create"><file name="Form.php" hash="d4d6bbb2b6834400187b5dbf9f7d5424"/></dir><file name="Create.php" hash="c0f3159d6d5c3da1b4c7c6574b24bfed"/></dir><dir name="Button"><file name="Cron.php" hash="243be1baeb73351b77e62c8214e42a66"/></dir><file name="Createaccount.php" hash="3192790d6089cbdf2c5b542ae49fd48e"/><file name="Tabs.php" hash="a5cb3c71b707f8ed002a1d33b7e1f9b2"/><file name="Testapiconnection.php" hash="e7dc6c9e2ae6e7f5170a05af622123ac"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><dir name="Log"><file name="Message.php" hash="ce36a8329355d7dfeaaa10e401bb7aba"/></dir></dir></dir></dir></dir><file name=".DS_Store" hash="86b5d0dc5126cf670280b5f5be2b8986"/></dir><dir name="Payment"><file name="Form.php" hash="bb94bee836626fa1636997f308a59f3f"/><file name="Info.php" hash="e878b75b994f9a6c97826e6acca70ca2"/></dir><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/></dir><file name="Exception.php" hash="14bc1e0b8bd6cd4533f8d50d2f3fd727"/><dir name="Helper"><file name="Abstract.php" hash="d48714ad954c69a1f13f8d835dbcbdad"/><file name="Account.php" hash="dab88db126c74e21039d2765fba289d2"/><file name="Api.php" hash="cce30bd36caee36bab0d18510a0ddc16"/><file name="Category.php" hash="428b915745c5b540b0ce47f94fc936e0"/><file name="Connect.php" hash="0e33dccb82732343518f6bea1ea83135"/><file name="Data.php" hash="a44a46a29fad09ce994c61b183c5730a"/><file name="Lists.php" hash="cedbf515e0ebe42b1408d8aa73d5e0ba"/><file name="Log.php" hash="4bf257fb8d16c7f25497331469022697"/><file name="Message.php" hash="dc9fb0d515d896972d0039dc736d9154"/><file name="Orders.php" hash="731e12aea70d189be111d75e26b54ebe"/><dir name="Product"><file name="Data.php" hash="57a58c08a8e097077d66f4cbd20bf7cd"/><file name="Inventory.php" hash="9e94729f86617dd8b413d2ecfeb99448"/><dir name="Type"><file name="Configurable.php" hash="bc76e8e796578163416b32308dec5407"/></dir></dir><file name="Product.php" hash="bc6f947886f75ea701be84d1080c8f06"/><file name="Storefront.php" hash="902b7ce9f6bc72c52c921fb0b2197377"/></dir><dir name="Model"><dir name="Category"><file name="Mapping.php" hash="d90be7d27649c5388566d3bddca38c57"/></dir><file name="Category.php" hash="0308ca6b03e2340693077407cc0fc122"/><file name="Cron.php" hash="aa02c12fa0c954610074e4f724172600"/><file name="Log.php" hash="77f49a02f8c9cf71aa8ec84a1acf55a9"/><dir name="Message"><file name="Observer.php" hash="1f543cba2b2771915d225fdad36699d4"/></dir><file name="Message.php" hash="5eb2da8d19c607222c3d6297a7dbb23d"/><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="a2afe60249de587c18e2d2f4ac2d7a78"/><dir name="Mapping"><file name="Collection.php" hash="614dda5dadab20f3b7725e2d5b556e6a"/></dir><file name="Mapping.php" hash="887d7cf4576ffd2c4b40dcf80e6c7021"/></dir><file name="Category.php" hash="e86e793c763c94a43c45ab9d851be56d"/><dir name="Log"><file name="Collection.php" hash="d43c896a4c6de8e2280938373739e6e7"/></dir><file name="Log.php" hash="aa05f1803941172a8df3bcf5b4310016"/><file name="Message.php" hash="3f300ab7f6e5133487622562f9db55be"/><dir name="Order"><file name="Data.php" hash="c4e49baba9627bbbdb1b8d69012ac07f"/></dir><dir name="Product"><dir name="Data"><file name="Collection.php" hash="9176b66372bbbe51bb597d4ee2b86f35"/></dir><file name="Data.php" hash="a1365dedd73e0cc3d32d17ee3e0643ff"/></dir></dir><dir name="Order"><file name="Data.php" hash="1a5a72b9ef87f1d5323369535d8e0933"/><file name="Observer.php" hash="73e779f2b27d5ee623bab6bbd55a43ba"/></dir><file name="Payment.php" hash="d021f0560f01b89a37ba2c4d4de26804"/><dir name="Product"><file name="Data.php" hash="c92c28a67e616dc63c4aaccb5bdb5231"/><file name="Observer.php" hash="72b57ae0b34bc195c9b26e0427a9c632"/></dir><file name="Profile.php" hash="4a2067406d93a10aba308f52fc012ca3"/><dir name="Session"><file name="Observer.php" hash="f46c8ac3ce3c987c5ec79f4b9a90d159"/></dir><dir name="Shipping"><file name="Flatrate.php" hash="de6b93bbc2e39d2ced36272a6e0952eb"/></dir><dir name="Stock"><file name="Observer.php" hash="5ff1fe7c76ffbdc5d07173cea2dc03e2"/></dir><file name="Storefront.php" hash="10b6a555b86331d03d4836887065a4ae"/><dir name="System"><dir name="Config"><file name="Commission.php" hash="ee9df0d2091afb9efac78c5eeb6c2c8d"/><file name="Connection.php" hash="7b1fdab2f86c4bd158e7f587b0332e42"/><file name="Observer.php" hash="5669f88c72bb8ff10cb84fd43133b268"/><dir name="Source"><file name="Attribute.php" hash="0d02faa3c926ef506c147b64e494313b"/><file name="Image.php" hash="90c2bb6ff6b860a9abc9a2b181fa8ec0"/><file name="Store.php" hash="15e70a19b7acd1890d45fed5d837cb02"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AbstractController.php" hash="b89a3229d94b02889a4a5cfa9b37d141"/><dir name="Catalog"><file name="CategoryController.php" hash="bdf5f532a1bffd9d29adcd514fb815b0"/><file name="ProductController.php" hash="16527d9cd2c76e6f34249d66e7efd131"/></dir><file name="CatalogController.php" hash="c0b50d58a1e942ab0eebaa54bf03bc8a"/><file name="ConnectController.php" hash="ea8c3874ec5976dd544fc2a2d5c3d21a"/><file name="StorefrontController.php" hash="48c41be8c3cec3dc6abfe60461b809a3"/><dir name="System"><dir name="Config"><file name="AccountController.php" hash="7296e50848f908ee4f4ce37e5c2552fe"/><file name="TestapiconnectionController.php" hash="1e712c1c029d289e269a74d10bd9c74e"/></dir><file name="CronController.php" hash="76ffc588808e14bfc09d9eeeff2c344f"/></dir></dir><file name="IndexController.php" hash="c0a0c8a749525c0dd076853ef731770d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2f0649aae5e258fbd195b6a61871359"/><file name="config.xml" hash="3292a063a6fb94f02cb19d8822b2fe70"/><file name="system.xml" hash="5d1f1f14ba871a69c1d1f5597c4a41f9"/></dir><dir name="sql"><dir name="bootic_setup"><file name="mysql4-install-1.0.0.php" hash="88f4a6dbf3bf7144992ef9d24ed7deac"/><file name="mysql4-upgrade-1.0.0-1.0.2.php" hash="d6c0f1b560661e68a1ffb897bd32d8db"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="176ff25ca3c96ca91ea2ceb80dd7304b"/></dir><file name=".DS_Store" hash="665e7b0adb116db6663e012e46df97a0"/></dir></target><target name="magelib"><dir name="Bootic"><dir name="Api"><file name="Client.php" hash="e159c0a627cfd13fb18b4d27a4466e47"/><dir name="Exception"><file name="UnsupportedDataType.php" hash="aaa6d6d08d34f10ca99766135b7a8942"/></dir><file name="Exception.php" hash="7482fb7536873fbd95a87dd5c34fcdfb"/><file name="Result.php" hash="ff63e9bdaff26a261bc2c90ab2b2fb8e"/></dir><dir name="File"><file name="Uploader.php" hash="51d7167bd4f68b143d0a1349acbf4c0b"/></dir><dir name="Tests"><dir name="Fixtures"><file name="account_create.json" hash="a66b8d81d7d837fcd5e6663477207113"/><file name="order_list.json" hash="73676f4c34d8d1fe0dccd887bc17d457"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bootic_Bootic.xml" hash="1bf446ba0b56654285cdda9e3eb9caa5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bootic.xml" hash="e21cf9e69ef47fd3a3953bad6c7f69c5"/></dir><dir name="template"><dir name="bootic"><dir name="adminhtml"><dir name="system"><dir name="config"><dir name="button"><file name="cron.phtml" hash="8bc3c44ee69082c8bc16f964546246f9"/></dir><file name="createaccount.phtml" hash="89cbf36935071304deb3046f780c132f"/><file name="testapiconnection.phtml" hash="61be68e23ebdc238818a3e14a87aa0f0"/></dir></dir></dir><file name="bootic.phtml" hash="7d86f132199944bfc3e4f7bbdb54b529"/><dir name="catalog"><file name="category.phtml" hash="a51881b295fd898c4404c9a8506a6a59"/><dir name="tab"><file name="general.phtml" hash="3dd8fef0fd39457f70bfda2a94edecba"/></dir></dir><dir name="log"><file name="error.phtml" hash="76097855fd05302da368d17966db3942"/></dir><file name="products.phtml" hash="9af8e0740e281d494e402c413380cb1e"/><dir name="storefront"><file name="banners.phtml" hash="de766567ba0ea95c78460704ae64fb3b"/><file name="preview.phtml" hash="17987a27ea3110afa993abbc9d72ff69"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="bootic"><dir name="prototype-color-picker"><dir name="css"><file name="prototype_colorpicker.css" hash="1e2474f995501728e7cb3a5f74690523"/></dir><dir name="images"><file name="blank.gif" hash="56398e76be6355ad5999b262208a17c9"/><file name="colorpicker_background.png" hash="a79f1a2a81bfe3ed1c2ca4c41b8e1fbf"/><file name="colorpicker_extra.png" hash="920c87d67408ee59529aa1789836a0eb"/><file name="colorpicker_extra_background.png" hash="ae834a141fb00963c5056f015c99db71"/><file name="colorpicker_hex.png" hash="16d6870c36e379c06fb26ebd2e16bf44"/><file name="colorpicker_hsb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_hsb_h.png" hash="d47409a203bedc76b26dc60b71a69f6b"/><file name="colorpicker_hsb_s.png" hash="5ff5e43ab6b7b41b6123bfab692a9b19"/><file name="colorpicker_indic.gif" hash="f485d07540a89502e36dc1a55cec05d0"/><file name="colorpicker_overlay.png" hash="c7a33805ffda0d32bd2a9904c8b02750"/><file name="colorpicker_rgb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_rgb_g.png" hash="dc17f953a6febbe174e92b54690586c3"/><file name="colorpicker_rgb_r.png" hash="87eeb205d093b713b68a341771f4ee27"/><file name="colorpicker_select.gif" hash="cec464162af0cce10348e7bb7701ef86"/><file name="colorpicker_submit.png" hash="e887e023931707d8b63e390bfad1f39b"/><file name="custom_background.png" hash="06c91f7ae1561ccd8f1c79119529600d"/><file name="custom_hex.png" hash="e27aaa92b15d9392d909f8b94e797524"/><file name="custom_hsb_b.png" hash="b45588ca2fe9ba46673862300fcd3083"/><file name="custom_hsb_h.png" hash="4a1afa5636421aae4c44471d2273496d"/><file name="custom_hsb_s.png" hash="83aa97407fb76615a7db5ed721681148"/><file name="custom_indic.gif" hash="04660eb352eb259581a36a0fe8da2d4d"/><file name="custom_rgb_b.png" hash="f6e50cd567bd3059742d45ab224a413b"/><file name="custom_rgb_g.png" hash="b1e286e06692b3640862a3d07f636a80"/><file name="custom_rgb_r.png" hash="8ae4b3ef109ee66ec1022632470ddd0f"/><file name="custom_submit.png" hash="35423f0f2538e507dec193b52f8d0327"/><file name="select.png" hash="7b086953a8c62d2685a65644979d5d04"/><file name="select2.png" hash="c8d194d92dbad98615b2a9140b34ab48"/><file name="slider.png" hash="3a50b8078dea50b9811603a85ecef836"/></dir><file name="index.html" hash="c9c853215e6be66882221be357c84c16"/><dir name="js"><file name="prototype.1.6.js" hash="965fe52b851d8ff3c2b915ada9fb273f"/><file name="prototype_colorpicker.js" hash="90a7fd9030d010fac223f95953dc7b59"/></dir><file name=".DS_Store" hash="cf29419b5633cc71cfcb916356c6da81"/></dir></dir></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.2.0</min><max>5.4.10</max></php></required></dependencies>
27
  </package>