socialcommerce_suite_by_turnto - Version 2.2.0

Version Notes

TurnTo Admin Extension

2.0 Adds support for Single Sign On
2.1 Re-wrote catalog feed generator
2.1.6 - Better catalog support in catalog feed generator.
2.2.0 - Support for sku average rating feed

Download this release

Release Info

Developer TurnTo Networks
Extension socialcommerce_suite_by_turnto
Version 2.2.0
Comparing to
See all releases


Code changes from version 2.1.6 to 2.2.0

Files changed (37) hide show
  1. app/code/community/Turnto/Admin/Block/Adminhtml/System/Config/Feed.php +38 -0
  2. app/code/community/Turnto/Admin/Block/CatalogFeed.php +10 -10
  3. app/code/community/Turnto/Admin/Block/HistoricalFeed.php +10 -10
  4. app/code/community/Turnto/Admin/Block/Overview.php +10 -10
  5. app/code/community/Turnto/Admin/Block/RatingsFeed.php +11 -0
  6. app/code/community/Turnto/Admin/Block/Review/Helper.php +89 -0
  7. app/code/community/Turnto/Admin/Block/ShowTabsAdminBlock.php +48 -41
  8. app/code/community/Turnto/Admin/Helper/Data.php +125 -5
  9. app/code/community/Turnto/Admin/Model/Observer.php +16 -0
  10. app/code/community/Turnto/Admin/Model/Rating.php +9 -0
  11. app/code/community/Turnto/Admin/Model/Resource/Rating.php +9 -0
  12. app/code/community/Turnto/Admin/Model/Resource/Rating/Collection.php +9 -0
  13. app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php +259 -249
  14. app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php.bkup +227 -0
  15. app/code/community/Turnto/Admin/controllers/IndexController.php +138 -137
  16. app/code/community/Turnto/Admin/controllers/VersionController.php +7 -7
  17. app/code/community/Turnto/Admin/etc/config.xml +152 -86
  18. app/code/community/Turnto/Admin/etc/system.xml +87 -0
  19. app/code/community/Turnto/Admin/sql/turnto_admin_setup/mysql4-install-2.2.0.php +44 -0
  20. app/code/community/Turnto/Login/Block/Login.php +11 -11
  21. app/code/community/Turnto/Login/Block/Reg.php +11 -11
  22. app/code/community/Turnto/Login/Helper/Data.php +6 -6
  23. app/code/community/Turnto/Login/controllers/IndexController.php +243 -243
  24. app/code/community/Turnto/Login/etc/config.xml +41 -41
  25. app/design/adminhtml/default/default/template/turnto/adminhtml/system/config/feed.phtml +12 -0
  26. app/design/adminhtml/default/default/template/turnto/catalog_feed_tab.phtml +72 -72
  27. app/design/adminhtml/default/default/template/turnto/historical_feed_tab.phtml +49 -49
  28. app/design/adminhtml/default/default/template/turnto/overview.phtml +37 -37
  29. app/design/adminhtml/default/default/template/turnto/product_ratings_feed_tab.phtml +47 -0
  30. app/design/frontend/default/default/layout/turnto_login.xml +80 -80
  31. app/design/frontend/default/default/template/turnto/login/login.phtml +8 -8
  32. app/design/frontend/default/default/template/turnto/login/login_form.phtml +116 -116
  33. app/design/frontend/default/default/template/turnto/login/reg.phtml +8 -8
  34. app/design/frontend/default/default/template/turnto/login/reg_form.phtml +186 -186
  35. app/etc/modules/Turnto_Admin.xml +10 -10
  36. app/etc/modules/Turnto_Login.xml +10 -10
  37. package.xml +7 -6
app/code/community/Turnto/Admin/Block/Adminhtml/System/Config/Feed.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_Adminhtml_System_Config_Feed
4
+ extends Mage_Adminhtml_Block_Abstract
5
+ implements Varien_Data_Form_Element_Renderer_Interface
6
+ {
7
+
8
+
9
+ //protected $_template = 'turnto/adminhtml/system/config/feed.phtml';
10
+ protected $_activated = null;
11
+
12
+ public function __construct()
13
+ {
14
+
15
+ parent::__construct();
16
+ $this->setTemplate('turnto/adminhtml/system/config/feed.phtml');
17
+ $this->_activated = Mage::helper('adminhelper1')
18
+ ->isFeedActivated();
19
+
20
+ if($this->_activated)
21
+ Mage::helper('adminhelper1')->loadRatings();
22
+
23
+
24
+ }
25
+
26
+ public function render(Varien_Data_Form_Element_Abstract $element)
27
+ {
28
+
29
+ return $this->toHtml();
30
+ }
31
+
32
+
33
+ public function isFeedActivated()
34
+ {
35
+ return $this->_activated;
36
+ }
37
+
38
+ }
app/code/community/Turnto/Admin/Block/CatalogFeed.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Turnto_Admin_Block_CatalogFeed extends Mage_Adminhtml_Block_Template
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setTemplate('turnto/catalog_feed_tab.phtml');
10
- }
11
  }
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_CatalogFeed extends Mage_Adminhtml_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('turnto/catalog_feed_tab.phtml');
10
+ }
11
  }
app/code/community/Turnto/Admin/Block/HistoricalFeed.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Turnto_Admin_Block_HistoricalFeed extends Mage_Adminhtml_Block_Template
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setTemplate('turnto/historical_feed_tab.phtml');
10
- }
11
  }
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_HistoricalFeed extends Mage_Adminhtml_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('turnto/historical_feed_tab.phtml');
10
+ }
11
  }
app/code/community/Turnto/Admin/Block/Overview.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Turnto_Admin_Block_Overview extends Mage_Adminhtml_Block_Template
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setTemplate('turnto/overview.phtml');
10
- }
11
  }
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_Overview extends Mage_Adminhtml_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('turnto/overview.phtml');
10
+ }
11
  }
app/code/community/Turnto/Admin/Block/RatingsFeed.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_RatingsFeed extends Mage_Adminhtml_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('turnto/product_ratings_feed_tab.phtml');
10
+ }
11
+ }
app/code/community/Turnto/Admin/Block/Review/Helper.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Enterprise Edition
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magento Enterprise Edition License
8
+ * that is bundled with this package in the file LICENSE_EE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.magentocommerce.com/license/enterprise-edition
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Review
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://www.magentocommerce.com/license/enterprise-edition
25
+ */
26
+
27
+ /**
28
+ * Review helper
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Review
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Turnto_Admin_Block_Review_Helper extends Mage_Review_Block_Helper
35
+ {
36
+
37
+ protected $_turnto_rating = null;
38
+
39
+ public function getRatingSummary()
40
+ {
41
+
42
+ if(Mage::getStoreConfig('turnto_admin/feedconfig/enabled')){
43
+
44
+ $rating = $this->_getTurntoRating();
45
+ return $rating->getRating()*20;
46
+
47
+ }else{
48
+ //return $this->getProduct()->getRatingSummary()->getRatingSummary();
49
+ return parent::getRatingSummary();
50
+ }
51
+
52
+
53
+ }
54
+
55
+ public function getReviewsCount()
56
+ {
57
+
58
+ if(Mage::getStoreConfig('turnto_admin/feedconfig/enabled')){
59
+
60
+ $rating = $this->_getTurntoRating();
61
+ if($rating->getReviewCount()){
62
+
63
+ return $rating->getReviewCount();
64
+ }else{
65
+
66
+ return 0;
67
+ }
68
+
69
+ }else{
70
+ //return $this->getProduct()->getRatingSummary()->getReviewsCount();
71
+ return parent::getReviewsCount();
72
+ }
73
+ }
74
+
75
+ protected function _getTurntoRating()
76
+ {
77
+ if($this->_turnto_rating)
78
+ return $this->_turnto_rating;
79
+
80
+ $this->_turnto_rating = Mage::getModel('turnto_admin/rating')
81
+ ->getCollection()
82
+ ->addFieldToFilter('product_id', $this->getProduct()->getId())
83
+ ->getFirstItem();
84
+
85
+
86
+ return $this->_turnto_rating;
87
+ }
88
+
89
+ }
app/code/community/Turnto/Admin/Block/ShowTabsAdminBlock.php CHANGED
@@ -1,42 +1,49 @@
1
- <?php
2
-
3
- class Turnto_Admin_Block_ShowTabsAdminBlock extends Mage_Adminhtml_Block_Widget_Tabs
4
- {
5
- public function __construct()
6
- {
7
- parent::__construct();
8
- $this->setId('turnto_tab_section_id');
9
- $this->setTitle(Mage::helper('adminhelper1')->__('TurnTo'));
10
- }
11
-
12
- protected function _beforeToHtml()
13
- {
14
- $this->addTab('turnto_links_tab', array(
15
- 'label' => Mage::helper('adminhelper1')->__('Overview'),
16
- 'title' => Mage::helper('adminhelper1')->__('Overview'),
17
- 'content' => $this->getLayout()->createBlock("adminblock1/Overview")->toHtml(),
18
- 'active' => true
19
- ));
20
-
21
- $this->addTab('turnto_catalog_feed_tab', array(
22
- 'label' => Mage::helper('adminhelper1')->__('Catalog Feed'),
23
- 'title' => Mage::helper('adminhelper1')->__('Catalog Feed'),
24
- 'content' => $this->getLayout()->createBlock("adminblock1/CatalogFeed")->toHtml(),
25
- 'active' => false
26
- ));
27
-
28
- $this->addTab('turnto_hist_feed_tab', array(
29
- 'label' => Mage::helper('adminhelper1')->__('Historical Feed'),
30
- 'title' => Mage::helper('adminhelper1')->__('Historical Feed'),
31
- 'content' => $this->getLayout()->createBlock("adminblock1/HistoricalFeed")->toHtml(),
32
- 'active' => false
33
- ));
34
-
35
- $headBlock = $this->getLayout()->getBlock('head');
36
- $headBlock->addItem('css', 'calendar/calender-win2k-1.css');
37
- $headBlock->addItem('js', 'calendar/calender.js');
38
- $headBlock->addItem('js', 'calendar/calender-setup.js');
39
-
40
- return parent::_beforeToHtml();
41
- }
 
 
 
 
 
 
 
42
  }
1
+ <?php
2
+
3
+ class Turnto_Admin_Block_ShowTabsAdminBlock extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('turnto_tab_section_id');
9
+ $this->setTitle(Mage::helper('adminhelper1')->__('TurnTo'));
10
+ }
11
+
12
+ protected function _beforeToHtml()
13
+ {
14
+ $this->addTab('turnto_links_tab', array(
15
+ 'label' => Mage::helper('adminhelper1')->__('Overview'),
16
+ 'title' => Mage::helper('adminhelper1')->__('Overview'),
17
+ 'content' => $this->getLayout()->createBlock("adminblock1/Overview")->toHtml(),
18
+ 'active' => true
19
+ ));
20
+
21
+ $this->addTab('turnto_catalog_feed_tab', array(
22
+ 'label' => Mage::helper('adminhelper1')->__('Catalog Feed'),
23
+ 'title' => Mage::helper('adminhelper1')->__('Catalog Feed'),
24
+ 'content' => $this->getLayout()->createBlock("adminblock1/CatalogFeed")->toHtml(),
25
+ 'active' => false
26
+ ));
27
+
28
+ $this->addTab('turnto_hist_feed_tab', array(
29
+ 'label' => Mage::helper('adminhelper1')->__('Historical Feed'),
30
+ 'title' => Mage::helper('adminhelper1')->__('Historical Feed'),
31
+ 'content' => $this->getLayout()->createBlock("adminblock1/HistoricalFeed")->toHtml(),
32
+ 'active' => false
33
+ ));
34
+
35
+ $this->addTab('turnto_ratings_feed_tab', array(
36
+ 'label' => Mage::helper('adminhelper1')->__('Product Ratings Feed'),
37
+ 'title' => Mage::helper('adminhelper1')->__('Product Ratings Feed'),
38
+ 'content' => $this->getLayout()->createBlock("adminblock1/RatingsFeed")->toHtml(),
39
+ 'active' => false
40
+ ));
41
+
42
+ $headBlock = $this->getLayout()->getBlock('head');
43
+ $headBlock->addItem('css', 'calendar/calender-win2k-1.css');
44
+ $headBlock->addItem('js', 'calendar/calender.js');
45
+ $headBlock->addItem('js', 'calendar/calender-setup.js');
46
+
47
+ return parent::_beforeToHtml();
48
+ }
49
  }
app/code/community/Turnto/Admin/Helper/Data.php CHANGED
@@ -1,6 +1,126 @@
1
- <?php
2
-
3
- class Turnto_Admin_Helper_Data extends Mage_Core_Helper_Data
4
- {
5
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  }
1
+ <?php
2
+
3
+ class Turnto_Admin_Helper_Data extends Mage_Core_Helper_Data
4
+ {
5
+
6
+ protected $_activated = null;
7
+ protected $_feed = null;
8
+
9
+ public function isFeedActivated()
10
+ {
11
+
12
+ $feed_url = $this->getFeedUrl();
13
+ return $this->checkFeed($feed_url);
14
+
15
+
16
+ }
17
+
18
+ public function checkFeed($url = null)
19
+ {
20
+
21
+ if(!$url)
22
+ return null;
23
+
24
+ if(!$xml = simplexml_load_file($url)){
25
+
26
+ $active = false;
27
+ }else{
28
+ $this->_feed = simplexml_load_file($url);
29
+ $active = true;
30
+ }
31
+
32
+ return $active;
33
+ }
34
+
35
+ public function getFeedUrl()
36
+ {
37
+
38
+ $url = Mage::getStoreConfig('turnto_admin/feedconfig/url');
39
+ $site_key = Mage::getStoreConfig('turnto_admin/feedconfig/site_key');
40
+ $site_auth = Mage::getStoreConfig('turnto_admin/feedconfig/site_auth');
41
+
42
+ if(!$url || !$site_key || !$site_auth)
43
+ return null;
44
+
45
+ $feed_url = rtrim($url,'/').'/'.$site_key.'/'.$site_auth.'/turnto-skuaveragerating.xml';
46
+ //var_dump($feed_url);
47
+
48
+ return $feed_url;
49
+ }
50
+
51
+
52
+ public function loadRatings($url = null)
53
+ {
54
+
55
+ if(!$this->_feed){
56
+
57
+ if(!$url)
58
+ $url = $this->getFeedUrl();
59
+
60
+ if(!$this->checkFeed($url))
61
+ return null;
62
+ }
63
+
64
+ $i=0;
65
+
66
+ #xml feed product 'sku' attribute contains product_id
67
+ $key_field = 'sku';
68
+
69
+ foreach($this->_feed->products->product as $product)
70
+ {
71
+
72
+ if(!$product[$key_field]){
73
+ Mage::log('Product sku is missing in the feed...', null, 'turnto_product_ratings.log');
74
+ continue;
75
+ }
76
+
77
+
78
+ $rating = Mage::getModel('turnto_admin/rating')
79
+ ->getCollection()
80
+ ->addFieldToFilter('product_id', $product[$key_field])
81
+ ->getFirstItem();
82
+
83
+ try{
84
+
85
+ if(!$rating->getCreatedAt())
86
+ $rating->setCreatedAt(Mage::getModel('core/date')->date('Y-m-d H:i:s'));
87
+
88
+
89
+ $rating->setProductId($product[$key_field])
90
+ // ->setSku($product['sku'])
91
+ ->setReviewCount($product['review_count'])
92
+ ->setUpdatedAt(Mage::getModel('core/date')->date('Y-m-d H:i:s'))
93
+ ->setRating($product[$i])
94
+ ->save();
95
+
96
+ }catch(Exception $e){
97
+ Mage::log('Error updating product rating for product id:'.$product[$key_field].'. Error details:'.$e->getMessage(), null, 'turnto_product_ratings.log');
98
+
99
+ }
100
+
101
+
102
+ $i++;
103
+ }
104
+
105
+ }
106
+
107
+ public function getLastUpdated()
108
+ {
109
+
110
+ $updated = null;
111
+
112
+ $resource = Mage::getSingleton('core/resource');
113
+ $read = $resource->getConnection('core_read');
114
+
115
+ $query = "SELECT MAX(updated_at) as updated FROM ".Mage::getSingleton('core/resource')->getTableName('turnto_admin/rating');
116
+
117
+ $result = $read->fetchAll($query);
118
+
119
+ if($result[0]['updated'])
120
+ $updated = $result[0]['updated'];
121
+
122
+ // var_dump($query); var_dump($result); exit;
123
+
124
+ return $updated;
125
+ }
126
  }
app/code/community/Turnto/Admin/Model/Observer.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Model_Observer
4
+ {
5
+
6
+ public function getProductsRatingsFeed()
7
+ {
8
+
9
+ if(Mage::helper('adminhelper1')->isFeedActivated())
10
+ Mage::helper('adminhelper1')->loadRatings();
11
+
12
+ //return $this;
13
+ }
14
+
15
+
16
+ }
app/code/community/Turnto/Admin/Model/Rating.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Model_Rating extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('turnto_admin/rating');
8
+ }
9
+ }
app/code/community/Turnto/Admin/Model/Resource/Rating.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Model_Resource_Rating extends Mage_Core_Model_Resource_Db_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('turnto_admin/rating','id');
8
+ }
9
+ }
app/code/community/Turnto/Admin/Model/Resource/Rating/Collection.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_Model_Resource_Rating_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('turnto_admin/rating');
8
+ }
9
+ }
app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php CHANGED
@@ -1,249 +1,259 @@
1
- <?php
2
-
3
- class Turnto_Admin_AdminControllers_TurntoController extends Mage_Adminhtml_Controller_Action
4
- {
5
- public function indexAction()
6
- {
7
- $this->loadLayout();
8
-
9
- $resource = Mage::getSingleton('core/resource');
10
-
11
- Mage::register('websites', Mage::app()->getWebsites());
12
-
13
- $this->_addLeft($this->getLayout()->createBlock('Turnto_Admin_Block_ShowTabsAdminBlock'));
14
-
15
- $this->renderLayout();
16
- }
17
-
18
- public function redirectAction()
19
- {
20
- $this->_redirectUrl('http://www.turnto.com');
21
- }
22
-
23
- public function postAction()
24
- {
25
- $post = $this->getRequest()->getPost();
26
- $catalogFeed = true;
27
-
28
- try {
29
- if (empty($post)) {
30
- Mage::throwException($this->__('Invalid form data.'));
31
- }
32
-
33
- $path = Mage::getBaseDir('media') . DS . 'turnto/';
34
- mkdir($path, 0755);
35
-
36
- if($post['feed_type'] == 'historical'){
37
- /* form processing */
38
- $startDate = $post['start_date'];
39
-
40
- if($startDate == null || $startDate == ""){
41
- Mage::getSingleton('adminhtml/session')->addError("Start Date is required");
42
- $this->_redirect('*/*/', array('active_tab' => 'turnto_hist_feed_tab'));
43
- return;
44
- }
45
-
46
- $scope = $post['scope'];
47
- $handle = fopen($path . 'histfeed.csv', 'w');
48
-
49
- fwrite($handle, "ORDERID\tORDERDATE\tEMAIL\tITEMTITLE\tITEMURL\tITEMLINEID\tZIP\tFIRSTNAME\tLASTNAME\tSKU\tPRICE\tITEMIMAGEURL");
50
- fwrite($handle, "\n");
51
-
52
- $fromDate = date('Y-m-d H:i:s', strtotime($startDate));
53
- Mage::app();
54
- $orders = Mage::getModel('sales/order')
55
- ->getCollection()
56
- ->addFieldToFilter('store_id', $scope)
57
- ->addAttributeToFilter('created_at', array('from'=>$fromDate))
58
- ->addAttributeToSort('entity_id', 'DESC');
59
- $orders->setPageSize(100);
60
- $pages = $orders->getLastPageNumber();
61
- $currentPage = 1;
62
- do {
63
- $orders->setCurPage($currentPage);
64
- foreach($orders as $order) {
65
- $itemlineid = 0;
66
- foreach($order->getAllVisibleItems() as $item) {
67
- //ORDERID
68
- fwrite($handle, $order->getRealOrderId());
69
- fwrite($handle, "\t");
70
- //ORDERDATE
71
- fwrite($handle, $order->getCreatedAtDate()->toString('Y-MM-d'));
72
- fwrite($handle, "\t");
73
- //EMAIL
74
- fwrite($handle, $order->getCustomerEmail());
75
- fwrite($handle, "\t");
76
- //ITEMTITLE
77
- fwrite($handle, $item->getName());
78
- fwrite($handle, "\t");
79
- //ITEMURL
80
- $product = $item->getProduct();
81
- fwrite($handle, $product->getProductUrl());
82
- fwrite($handle, "\t");
83
- //ITEMLINEID
84
- fwrite($handle, $itemlineid++);
85
- fwrite($handle, "\t");
86
- //ZIP
87
- fwrite($handle, $order->getShippingAddress()->getPostcode());
88
- fwrite($handle, "\t");
89
- //FIRSTNAME
90
- $name = explode(' ', $order->getCustomerName());
91
- fwrite($handle, $name[0]);
92
- fwrite($handle, "\t");
93
- //LASTNAME
94
- if (isset($name[1])){
95
- fwrite($handle, $name[1]);
96
- }
97
- fwrite($handle, "\t");
98
- //SKU
99
- fwrite($handle, $item->getSku());
100
- fwrite($handle, "\t");
101
- //PRICE
102
- fwrite($handle, $item->getOriginalPrice());
103
- fwrite($handle, "\t");
104
- //ITEMIMAGEURL
105
- if($product->getImage() != null && $product->getImage() != "no_selection") {
106
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() ));
107
- } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
108
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() ));
109
- } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
110
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() ));
111
- }
112
- fwrite($handle, "\n");
113
- }
114
- }
115
- $currentPage++;
116
- } while($currentPage <= $pages);
117
-
118
- fclose($handle);
119
-
120
- $message = $this->__('The historical feed was successfully generated. Click the &quot;Download historical feed&quot; link to download.');
121
- $catalogFeed = false;
122
- }
123
- else{
124
- /* form processing */
125
- $websiteId = $post['websiteId'];
126
- $storeId = 1;
127
- if (isset($websiteId)) {
128
- $split = explode('_', $websiteId);
129
- $websiteId = $split[0];
130
- $storeId = $split[1];
131
- } else {
132
- $websiteId = 1;
133
- }
134
-
135
- $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
136
- $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
137
- if(!isset($storeId)){
138
- $storeId = 1;
139
- }
140
- $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
141
- $baseMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
142
-
143
- $handle = fopen($path . 'catfeed.csv', 'w');
144
-
145
- fwrite($handle, "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY");
146
- fwrite($handle, "\n");
147
-
148
- $products = Mage::getModel('catalog/product')->setStoreId($storeId)->getCollection()->addAttributeToSelect('name')->addAttributeToSelect('*')->addAttributeToSelect('price')->addAttributeToSelect('image')->addWebsiteFilter($websiteId);
149
- if ($products) {
150
- foreach ($products as $product) {
151
- $product->setStoreId($storeId);
152
- fwrite($handle, $product->getSku());
153
- fwrite($handle, "\t");
154
- if($product->getImage() != null && $product->getImage() != "no_selection") {
155
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() ));
156
- } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
157
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() ));
158
- } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
159
- fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() ));
160
- }
161
- fwrite($handle, "\t");
162
- fwrite($handle, $product->getName());
163
- fwrite($handle, "\t");
164
- fwrite($handle, $product->getPrice());
165
- fwrite($handle, "\t");
166
- //CURRENCY
167
- fwrite($handle, "\t");
168
- //ACTIVE
169
- fwrite($handle, "Y");
170
- fwrite($handle, "\t");
171
- //ITEMURL
172
- fwrite($handle, $product->getProductUrl());
173
- fwrite($handle, "\t");
174
- //CATEGORY
175
- $ids = $product->getCategoryIds();
176
- fwrite($handle, (isset($ids[0]) ? $ids[0] : ''));
177
- fwrite($handle, "\t");
178
- // KEYWORDS
179
- fwrite($handle, "\t");
180
- // REPLACEMENTSKU
181
- fwrite($handle, "\t");
182
- //VIRTUALPARENTCODE
183
- fwrite($handle, "\t");
184
- //CATEGORYPATHJSON
185
- fwrite($handle, "\t");
186
- //ISCATEGORY
187
- fwrite($handle, "n");
188
- fwrite($handle, "\n");
189
- }
190
- }
191
-
192
- $categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect('name');
193
- if ($categories) {
194
- foreach ($categories as $category) {
195
- if ($category->getId() == 1) {
196
- continue;
197
- }
198
- $category->setStoreId($storeId);
199
- fwrite($handle, $category->getId());
200
- fwrite($handle, "\t");
201
- //IMAGEURL
202
- fwrite($handle, "\t");
203
- //TITLE
204
- fwrite($handle, $category->getName());
205
- fwrite($handle, "\t");
206
- //PRICE
207
- fwrite($handle, "\t");
208
- //CURRENCY
209
- fwrite($handle, "\t");
210
- //ACTIVE
211
- fwrite($handle, "Y");
212
- fwrite($handle, "\t");
213
- //ITEMURL
214
- fwrite($handle, $category->getUrl());
215
- fwrite($handle, "\t");
216
- //CATEGORY
217
- fwrite($handle, $category->getParentCategory()->getId());
218
- fwrite($handle, "\t");
219
- //KEYWORDS
220
- fwrite($handle, "\t");
221
- //REPLACEMENTSKU
222
- fwrite($handle, "\t");
223
- //VIRTUALPARENTCODE
224
- fwrite($handle, "\t");
225
- //CATEGORYPATHJSON
226
- fwrite($handle, "\t");
227
- //ISCATEGORY
228
- fwrite($handle, "Y");
229
- fwrite($handle, "\n");
230
-
231
- }
232
- }
233
-
234
- fclose($handle);
235
-
236
- $message = $this->__('The catalog feed was successfully generated. Click the &quot;Download catalog feed&quot; link to download.');
237
- }
238
- Mage::getSingleton('adminhtml/session')->addSuccess($message);
239
- } catch (Exception $e) {
240
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
241
- }
242
-
243
- if($catalogFeed){
244
- $this->_redirect('*/*/', array('active_tab' => 'turnto_catalog_feed_tab'));
245
- }else{
246
- $this->_redirectUrl(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'media/turnto/histfeed.csv');
247
- }
248
- }
249
- }
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_AdminControllers_TurntoController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ public function indexAction()
6
+ {
7
+ $this->loadLayout();
8
+
9
+ $resource = Mage::getSingleton('core/resource');
10
+
11
+ Mage::register('websites', Mage::app()->getWebsites());
12
+
13
+ $this->_addLeft($this->getLayout()->createBlock('Turnto_Admin_Block_ShowTabsAdminBlock'));
14
+
15
+ $this->renderLayout();
16
+ }
17
+
18
+ public function redirectAction()
19
+ {
20
+ $this->_redirectUrl('http://www.turnto.com');
21
+ }
22
+
23
+ public function ratingsAction()
24
+ {
25
+
26
+ Mage::helper('adminhelper1')->loadRatings();
27
+ $message = $this->__('Products Ratings successfully updated.');
28
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
29
+ $this->_redirect('*/*/', array('active_tab' => 'turnto_ratings_feed_tab'));
30
+
31
+ }
32
+
33
+ public function postAction()
34
+ {
35
+ $post = $this->getRequest()->getPost();
36
+ $catalogFeed = true;
37
+
38
+ try {
39
+ if (empty($post)) {
40
+ Mage::throwException($this->__('Invalid form data.'));
41
+ }
42
+
43
+ $path = Mage::getBaseDir('media') . DS . 'turnto/';
44
+ mkdir($path, 0755);
45
+
46
+ if($post['feed_type'] == 'historical'){
47
+ /* form processing */
48
+ $startDate = $post['start_date'];
49
+
50
+ if($startDate == null || $startDate == ""){
51
+ Mage::getSingleton('adminhtml/session')->addError("Start Date is required");
52
+ $this->_redirect('*/*/', array('active_tab' => 'turnto_hist_feed_tab'));
53
+ return;
54
+ }
55
+
56
+ $scope = $post['scope'];
57
+ $handle = fopen($path . 'histfeed.csv', 'w');
58
+
59
+ fwrite($handle, "ORDERID\tORDERDATE\tEMAIL\tITEMTITLE\tITEMURL\tITEMLINEID\tZIP\tFIRSTNAME\tLASTNAME\tSKU\tPRICE\tITEMIMAGEURL");
60
+ fwrite($handle, "\n");
61
+
62
+ $fromDate = date('Y-m-d H:i:s', strtotime($startDate));
63
+ Mage::app();
64
+ $orders = Mage::getModel('sales/order')
65
+ ->getCollection()
66
+ ->addFieldToFilter('store_id', $scope)
67
+ ->addAttributeToFilter('created_at', array('from'=>$fromDate))
68
+ ->addAttributeToSort('entity_id', 'DESC');
69
+ $orders->setPageSize(100);
70
+ $pages = $orders->getLastPageNumber();
71
+ $currentPage = 1;
72
+ do {
73
+ $orders->setCurPage($currentPage);
74
+ foreach($orders as $order) {
75
+ $itemlineid = 0;
76
+ foreach($order->getAllVisibleItems() as $item) {
77
+ //ORDERID
78
+ fwrite($handle, $order->getRealOrderId());
79
+ fwrite($handle, "\t");
80
+ //ORDERDATE
81
+ fwrite($handle, $order->getCreatedAtDate()->toString('Y-MM-d'));
82
+ fwrite($handle, "\t");
83
+ //EMAIL
84
+ fwrite($handle, $order->getCustomerEmail());
85
+ fwrite($handle, "\t");
86
+ //ITEMTITLE
87
+ fwrite($handle, $item->getName());
88
+ fwrite($handle, "\t");
89
+ //ITEMURL
90
+ $product = $item->getProduct();
91
+ fwrite($handle, $product->getProductUrl());
92
+ fwrite($handle, "\t");
93
+ //ITEMLINEID
94
+ fwrite($handle, $itemlineid++);
95
+ fwrite($handle, "\t");
96
+ //ZIP
97
+ fwrite($handle, $order->getShippingAddress()->getPostcode());
98
+ fwrite($handle, "\t");
99
+ //FIRSTNAME
100
+ $name = explode(' ', $order->getCustomerName());
101
+ fwrite($handle, $name[0]);
102
+ fwrite($handle, "\t");
103
+ //LASTNAME
104
+ if (isset($name[1])){
105
+ fwrite($handle, $name[1]);
106
+ }
107
+ fwrite($handle, "\t");
108
+ //SKU
109
+ fwrite($handle, $item->getSku());
110
+ fwrite($handle, "\t");
111
+ //PRICE
112
+ fwrite($handle, $item->getOriginalPrice());
113
+ fwrite($handle, "\t");
114
+ //ITEMIMAGEURL
115
+ if($product->getImage() != null && $product->getImage() != "no_selection") {
116
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() ));
117
+ } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
118
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() ));
119
+ } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
120
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() ));
121
+ }
122
+ fwrite($handle, "\n");
123
+ }
124
+ }
125
+ $currentPage++;
126
+ } while($currentPage <= $pages);
127
+
128
+ fclose($handle);
129
+
130
+ $message = $this->__('The historical feed was successfully generated. Click the &quot;Download historical feed&quot; link to download.');
131
+ $catalogFeed = false;
132
+ }
133
+ else{
134
+ /* form processing */
135
+ $websiteId = $post['websiteId'];
136
+ $storeId = 1;
137
+ if (isset($websiteId)) {
138
+ $split = explode('_', $websiteId);
139
+ $websiteId = $split[0];
140
+ $storeId = $split[1];
141
+ } else {
142
+ $websiteId = 1;
143
+ }
144
+
145
+ $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
146
+ $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
147
+ if(!isset($storeId)){
148
+ $storeId = 1;
149
+ }
150
+ $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
151
+ $baseMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
152
+
153
+ $handle = fopen($path . 'catfeed.csv', 'w');
154
+
155
+ fwrite($handle, "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY");
156
+ fwrite($handle, "\n");
157
+
158
+ $products = Mage::getModel('catalog/product')->setStoreId($storeId)->getCollection()->addAttributeToSelect('name')->addAttributeToSelect('*')->addAttributeToSelect('price')->addAttributeToSelect('image')->addWebsiteFilter($websiteId);
159
+ if ($products) {
160
+ foreach ($products as $product) {
161
+ $product->setStoreId($storeId);
162
+ fwrite($handle, $product->getSku());
163
+ fwrite($handle, "\t");
164
+ if($product->getImage() != null && $product->getImage() != "no_selection") {
165
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() ));
166
+ } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
167
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() ));
168
+ } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
169
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() ));
170
+ }
171
+ fwrite($handle, "\t");
172
+ fwrite($handle, $product->getName());
173
+ fwrite($handle, "\t");
174
+ fwrite($handle, $product->getPrice());
175
+ fwrite($handle, "\t");
176
+ //CURRENCY
177
+ fwrite($handle, "\t");
178
+ //ACTIVE
179
+ fwrite($handle, "Y");
180
+ fwrite($handle, "\t");
181
+ //ITEMURL
182
+ fwrite($handle, $product->getProductUrl());
183
+ fwrite($handle, "\t");
184
+ //CATEGORY
185
+ $ids = $product->getCategoryIds();
186
+ fwrite($handle, (isset($ids[0]) ? $ids[0] : ''));
187
+ fwrite($handle, "\t");
188
+ // KEYWORDS
189
+ fwrite($handle, "\t");
190
+ // REPLACEMENTSKU
191
+ fwrite($handle, "\t");
192
+ //VIRTUALPARENTCODE
193
+ fwrite($handle, "\t");
194
+ //CATEGORYPATHJSON
195
+ fwrite($handle, "\t");
196
+ //ISCATEGORY
197
+ fwrite($handle, "n");
198
+ fwrite($handle, "\n");
199
+ }
200
+ }
201
+
202
+ $categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect('name');
203
+ if ($categories) {
204
+ foreach ($categories as $category) {
205
+ if ($category->getId() == 1) {
206
+ continue;
207
+ }
208
+ $category->setStoreId($storeId);
209
+ fwrite($handle, $category->getId());
210
+ fwrite($handle, "\t");
211
+ //IMAGEURL
212
+ fwrite($handle, "\t");
213
+ //TITLE
214
+ fwrite($handle, $category->getName());
215
+ fwrite($handle, "\t");
216
+ //PRICE
217
+ fwrite($handle, "\t");
218
+ //CURRENCY
219
+ fwrite($handle, "\t");
220
+ //ACTIVE
221
+ fwrite($handle, "Y");
222
+ fwrite($handle, "\t");
223
+ //ITEMURL
224
+ fwrite($handle, $category->getUrl());
225
+ fwrite($handle, "\t");
226
+ //CATEGORY
227
+ fwrite($handle, $category->getParentCategory()->getId());
228
+ fwrite($handle, "\t");
229
+ //KEYWORDS
230
+ fwrite($handle, "\t");
231
+ //REPLACEMENTSKU
232
+ fwrite($handle, "\t");
233
+ //VIRTUALPARENTCODE
234
+ fwrite($handle, "\t");
235
+ //CATEGORYPATHJSON
236
+ fwrite($handle, "\t");
237
+ //ISCATEGORY
238
+ fwrite($handle, "Y");
239
+ fwrite($handle, "\n");
240
+
241
+ }
242
+ }
243
+
244
+ fclose($handle);
245
+
246
+ $message = $this->__('The catalog feed was successfully generated. Click the &quot;Download catalog feed&quot; link to download.');
247
+ }
248
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
249
+ } catch (Exception $e) {
250
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
251
+ }
252
+
253
+ if($catalogFeed){
254
+ $this->_redirect('*/*/', array('active_tab' => 'turnto_catalog_feed_tab'));
255
+ }else{
256
+ $this->_redirectUrl(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'media/turnto/histfeed.csv');
257
+ }
258
+ }
259
+ }
app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php.bkup ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Turnto_Admin_AdminControllers_TurntoController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ public function indexAction()
6
+ {
7
+ $this->loadLayout();
8
+
9
+ $resource = Mage::getSingleton('core/resource');
10
+ $storeList = array();
11
+ foreach (Mage::app()->getWebsites() as $website) {
12
+ foreach ($website->getGroups() as $group) {
13
+ $stores = $group->getStores();
14
+ foreach ($stores as $store) {
15
+ array_push($storeList, $store);
16
+ }
17
+ }
18
+ }
19
+
20
+ Mage::register('sites', $storeList);
21
+
22
+ $this->_addLeft($this->getLayout()->createBlock('Turnto_Admin_Block_ShowTabsAdminBlock'));
23
+
24
+ $this->renderLayout();
25
+ }
26
+
27
+ public function redirectAction()
28
+ {
29
+ $this->_redirectUrl('http://www.turnto.com');
30
+ }
31
+
32
+ public function postAction()
33
+ {
34
+ $post = $this->getRequest()->getPost();
35
+ $catalogFeed = true;
36
+
37
+ try {
38
+ if (empty($post)) {
39
+ Mage::throwException($this->__('Invalid form data.'));
40
+ }
41
+
42
+ $path = Mage::getBaseDir('media') . DS . 'turnto/';
43
+ mkdir($path, 0755);
44
+
45
+ if($post['feed_type'] == 'historical'){
46
+ /* form processing */
47
+ $startDate = $post['start_date'];
48
+
49
+ if($startDate == null || $startDate == ""){
50
+ Mage::getSingleton('adminhtml/session')->addError("Start Date is required");
51
+ $this->_redirect('*/*/', array('active_tab' => 'turnto_hist_feed_tab'));
52
+ return;
53
+ }
54
+
55
+ $scope = $post['scope'];
56
+ $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
57
+ $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
58
+ if(isset($scope)){
59
+ $baseUrl = Mage::app()->getStore($scope)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
60
+ $baseMediaUrl = Mage::app()->getStore($scope)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
61
+ }
62
+
63
+ $resource = Mage::getSingleton('core/resource');
64
+ $readConnection = $resource->getConnection('core_read');
65
+
66
+ $stmt = $readConnection->prepare(
67
+ 'select sales_flat_order.entity_id as orderid, '
68
+ .'sales_flat_order_item.created_at as orderdate, '
69
+ .'customer_email as email, '
70
+ .'ifnull(parent.name, sales_flat_order_item.name) as itemtitle, '
71
+ .'concat('.$readConnection->quote($baseUrl).', ifnull(parent.url_path, catalog_product_flat_1.url_path)) as itemurl, '
72
+ .'item_id as itemlineid, '
73
+ .'postcode as zip, '
74
+ .'customer_firstname as firstname, '
75
+ .'customer_lastname as lastname, '
76
+ .'ifnull(parent.sku, sales_flat_order_item.sku) as sku, '
77
+ .'grand_total as price, '
78
+ .'concat('.$readConnection->quote($baseMediaUrl).', ifnull(parent.small_image, catalog_product_flat_1.small_image)) as itemimageurl '
79
+ .'from sales_flat_order,'
80
+ .'sales_flat_order_item, '
81
+ .'sales_flat_order_address, '
82
+ .'catalog_product_flat_1 '
83
+ .'left join catalog_product_super_link on catalog_product_flat_1.entity_id = catalog_product_super_link.product_id '
84
+ .'left join catalog_product_flat_1 as parent on catalog_product_super_link.parent_id = parent.entity_id '
85
+ .'where sales_flat_order.entity_id = sales_flat_order_item.order_id '
86
+ .'and sales_flat_order.entity_id = sales_flat_order_address.parent_id '
87
+ .'and sales_flat_order_item.product_id = catalog_product_flat_1.entity_id '
88
+ .'and sales_flat_order_item.created_at > str_to_date(\''.$startDate.'\', \'%m/%d/%Y\')', array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
89
+ $stmt->execute();
90
+
91
+ $handle = fopen($path . 'histfeed.csv', 'w');
92
+
93
+ fwrite($handle, "ORDERID\tORDERDATE\tEMAIL\tITEMTITLE\tITEMURL\tITEMLINEID\tZIP\tFIRSTNAME\tLASTNAME\tSKU\tPRICE\tITEMIMAGEURL");
94
+ fwrite($handle, "\n");
95
+
96
+ while ($row = $stmt->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {
97
+ foreach($row as $column){
98
+ fwrite($handle, str_replace("\t", "\\t", $column));
99
+ fwrite($handle, "\t");
100
+ }
101
+
102
+ fwrite($handle, "\n");
103
+ }
104
+ $stmt = null;
105
+ fclose($handle);
106
+
107
+ $message = $this->__('The historical feed was successfully generated. Click the &quot;Download historical feed&quot; link to download.');
108
+ $catalogFeed = false;
109
+ }
110
+ else{
111
+ /* form processing */
112
+ $scope = $post['scope'];
113
+
114
+ $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
115
+ $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
116
+ if(isset($scope)){
117
+ $baseUrl = Mage::app()->getStore($scope)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
118
+ $baseMediaUrl = Mage::app()->getStore($scope)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
119
+ }
120
+
121
+ $handle = fopen($path . 'catfeed.csv', 'w');
122
+
123
+ fwrite($handle, "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY");
124
+ fwrite($handle, "\n");
125
+
126
+ $products = Mage::getModel('catalog/product')->setStoreId($scope)->getCollection()->addAttributeToSelect('name')->addAttributeToSelect('*')->addAttributeToSelect('price')->addAttributeToSelect('image');
127
+ if ($products) {
128
+ foreach ($products as $product) {
129
+ $product->setStoreId($scope);
130
+ fwrite($handle, $product->getSku());
131
+ fwrite($handle, "\t");
132
+ if($product->getImage() != null && $product->getImage() != "no_selection") {
133
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() ));
134
+ } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
135
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() ));
136
+ } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
137
+ fwrite($handle, Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() ));
138
+ }
139
+ fwrite($handle, "\t");
140
+ fwrite($handle, $product->getName());
141
+ fwrite($handle, "\t");
142
+ fwrite($handle, $product->getPrice());
143
+ fwrite($handle, "\t");
144
+ //CURRENCY
145
+ fwrite($handle, "\t");
146
+ //ACTIVE
147
+ fwrite($handle, "Y");
148
+ fwrite($handle, "\t");
149
+ //ITEMURL
150
+ fwrite($handle, $product->getProductUrl());
151
+ fwrite($handle, "\t");
152
+ //CATEGORY
153
+ $ids = $product->getCategoryIds();
154
+ fwrite($handle, (isset($ids[0]) ? $ids[0] : ''));
155
+ fwrite($handle, "\t");
156
+ // KEYWORDS
157
+ fwrite($handle, "\t");
158
+ // REPLACEMENTSKU
159
+ fwrite($handle, "\t");
160
+ //VIRTUALPARENTCODE
161
+ fwrite($handle, "\t");
162
+ //CATEGORYPATHJSON
163
+ fwrite($handle, "\t");
164
+ //ISCATEGORY
165
+ fwrite($handle, "n");
166
+ fwrite($handle, "\n");
167
+ }
168
+ }
169
+
170
+ $categories = Mage::getModel('catalog/category')->setStoreId($scope)->getCollection()->addAttributeToSelect('name');
171
+ if ($categories) {
172
+ foreach ($categories as $category) {
173
+ if ($category->getId() == 1) {
174
+ continue;
175
+ }
176
+ $category->setStoreId($scope);
177
+ fwrite($handle, $category->getId());
178
+ fwrite($handle, "\t");
179
+ //IMAGEURL
180
+ fwrite($handle, "\t");
181
+ //TITLE
182
+ fwrite($handle, $category->getName());
183
+ fwrite($handle, "\t");
184
+ //PRICE
185
+ fwrite($handle, "\t");
186
+ //CURRENCY
187
+ fwrite($handle, "\t");
188
+ //ACTIVE
189
+ fwrite($handle, "Y");
190
+ fwrite($handle, "\t");
191
+ //ITEMURL
192
+ fwrite($handle, $category->getUrl());
193
+ fwrite($handle, "\t");
194
+ //CATEGORY
195
+ fwrite($handle, $category->getParentCategory()->getId());
196
+ fwrite($handle, "\t");
197
+ //KEYWORDS
198
+ fwrite($handle, "\t");
199
+ //REPLACEMENTSKU
200
+ fwrite($handle, "\t");
201
+ //VIRTUALPARENTCODE
202
+ fwrite($handle, "\t");
203
+ //CATEGORYPATHJSON
204
+ fwrite($handle, "\t");
205
+ //ISCATEGORY
206
+ fwrite($handle, "Y");
207
+ fwrite($handle, "\n");
208
+
209
+ }
210
+ }
211
+
212
+ fclose($handle);
213
+
214
+ $message = $this->__('The catalog feed was successfully generated. Click the &quot;Download catalog feed&quot; link to download.');
215
+ }
216
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
217
+ } catch (Exception $e) {
218
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
219
+ }
220
+
221
+ if($catalogFeed){
222
+ $this->_redirect('*/*/', array('active_tab' => 'turnto_catalog_feed_tab'));
223
+ }else{
224
+ $this->_redirectUrl(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'media/turnto/histfeed.csv');
225
+ }
226
+ }
227
+ }
app/code/community/Turnto/Admin/controllers/IndexController.php CHANGED
@@ -1,137 +1,138 @@
1
- <?php
2
-
3
- class Turnto_Admin_IndexController extends Mage_Core_Controller_Front_Action{
4
- public function indexAction(){
5
- header( 'Content-type: text/plain; charset=utf-8' );
6
- try {
7
- $resource = Mage::getSingleton('core/resource');
8
- $readConnection = $resource->getConnection('core_read');
9
- $params = $this->getRequest()->getParams();
10
- $storeId = $params['storeId'];
11
- $websiteId = $params['websiteId'];
12
- $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
13
- $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
14
- if(!isset($storeId)){
15
- $storeId = 1;
16
- }
17
- $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
18
- $baseMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
19
-
20
- if(!isset($websiteId)){
21
- $websiteId=1;
22
- }
23
-
24
- echo "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY";
25
- echo "\n";
26
-
27
- $products = Mage::getModel('catalog/product')->setStoreId($storeId)->getCollection()->addAttributeToSelect('*')->addWebsiteFilter($websiteId);
28
-
29
- Mage::getSingleton('core/resource_iterator')->walk(
30
- $products->getSelect(),
31
- array(array($this, 'productCallback')),
32
- array('store_id' => $storeId)
33
- );
34
-
35
- $categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect('*');
36
- if ($categories) {
37
- foreach ($categories as $category) {
38
- if ($category->getId() == 1) {
39
- continue;
40
- }
41
- $category->setStoreId($storeId);
42
- echo $category->getId();
43
- echo "\t";
44
- //IMAGEURL
45
- echo "\t";
46
- //TITLE
47
- echo $category->getName();
48
- echo "\t";
49
- //PRICE
50
- echo "\t";
51
- //CURRENCY
52
- echo "\t";
53
- //ACTIVE
54
- echo "Y";
55
- echo "\t";
56
- //ITEMURL
57
- echo $category->getUrl();
58
- echo "\t";
59
- //CATEGORY
60
- echo $category->getParentCategory()->getId();
61
- echo "\t";
62
- //KEYWORDS
63
- echo "\t";
64
- //REPLACEMENTSKU
65
- echo "\t";
66
- //VIRTUALPARENTCODE
67
- echo "\t";
68
- //CATEGORYPATHJSON
69
- echo "\t";
70
- //ISCATEGORY
71
- echo "Y";
72
- echo "\n";
73
- }
74
- }
75
- } catch (Exception $e) {
76
- echo $e->getMessage();
77
- }
78
-
79
- return;
80
-
81
-
82
- }
83
-
84
- public function productCallback($args)
85
- {
86
- $product = Mage::getModel('catalog/product');
87
- $product->setData($args['row']);
88
-
89
- $parents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
90
- if(isset($parents[0]))
91
- {
92
- // skip products with a parent
93
- return;
94
- }
95
- $product->setStoreId($args["store_id"]);
96
- echo $product->getSku();
97
- echo "\t";
98
- //echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );
99
- if($product->getImage() != null && $product->getImage() != "no_selection") {
100
- echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );
101
- } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
102
- echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() );
103
- } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
104
- echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() );
105
- }
106
- echo "\t";
107
- echo $product->getName();
108
- echo "\t";
109
- echo $product->getPrice();
110
- echo "\t";
111
- //CURRENCY
112
- echo "\t";
113
- //ACTIVE
114
- echo 'Y';
115
- echo "\t";
116
- //ITEMURL
117
- echo $product->getProductUrl();
118
- echo "\t";
119
- //CATEGORY
120
- $ids = $product->getCategoryIds();
121
- echo (isset($ids[0]) ? $ids[0] : '');
122
- echo "\t";
123
- // KEYWORDS
124
- echo "\t";
125
- // REPLACEMENTSKU
126
- echo "\t";
127
- //VIRTUALPARENTCODE
128
- echo "\t";
129
- //CATEGORYPATHJSON
130
- echo "\t";
131
- //ISCATEGORY
132
- echo "n";
133
- echo "\n";
134
- }
135
- }
136
-
137
-
 
1
+ <?php
2
+
3
+ class Turnto_Admin_IndexController extends Mage_Core_Controller_Front_Action{
4
+ public function indexAction(){
5
+ header( 'Content-type: text/plain; charset=utf-8' );
6
+ try {
7
+ $resource = Mage::getSingleton('core/resource');
8
+ $readConnection = $resource->getConnection('core_read');
9
+ $params = $this->getRequest()->getParams();
10
+ $storeId = $params['storeId'];
11
+ $websiteId = $params['websiteId'];
12
+ $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
13
+ $baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
14
+ if(!isset($storeId)){
15
+ $storeId = 1;
16
+ }
17
+ $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
18
+ $baseMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product';
19
+
20
+ if(!isset($websiteId)){
21
+ $websiteId=1;
22
+ }
23
+
24
+ echo "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY";
25
+ echo "\n";
26
+
27
+ $products = Mage::getModel('catalog/product')->setStoreId($storeId)->getCollection()->addAttributeToSelect('*')->addWebsiteFilter($websiteId);
28
+
29
+ Mage::getSingleton('core/resource_iterator')->walk(
30
+ $products->getSelect(),
31
+ array(array($this, 'productCallback')),
32
+ array('store_id' => $storeId)
33
+ );
34
+
35
+ $categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect('*');
36
+ if ($categories) {
37
+ foreach ($categories as $category) {
38
+ if ($category->getId() == 1) {
39
+ continue;
40
+ }
41
+ $category->setStoreId($storeId);
42
+ echo $category->getId();
43
+ echo "\t";
44
+ //IMAGEURL
45
+ echo "\t";
46
+ //TITLE
47
+ echo $category->getName();
48
+ echo "\t";
49
+ //PRICE
50
+ echo "\t";
51
+ //CURRENCY
52
+ echo "\t";
53
+ //ACTIVE
54
+ echo "Y";
55
+ echo "\t";
56
+ //ITEMURL
57
+ echo $category->getUrl();
58
+ echo "\t";
59
+ //CATEGORY
60
+ echo $category->getParentCategory()->getId();
61
+ echo "\t";
62
+ //KEYWORDS
63
+ echo "\t";
64
+ //REPLACEMENTSKU
65
+ echo "\t";
66
+ //VIRTUALPARENTCODE
67
+ echo "\t";
68
+ //CATEGORYPATHJSON
69
+ echo "\t";
70
+ //ISCATEGORY
71
+ echo "Y";
72
+ echo "\n";
73
+ }
74
+ }
75
+ } catch (Exception $e) {
76
+ echo $e->getMessage();
77
+ }
78
+
79
+ return;
80
+
81
+
82
+ }
83
+
84
+ public function productCallback($args)
85
+ {
86
+ $product = Mage::getModel('catalog/product');
87
+ $product->setData($args['row']);
88
+
89
+ $parents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
90
+ if(isset($parents[0]))
91
+ {
92
+ // skip products with a parent
93
+ return;
94
+ }
95
+ $product->setStoreId($args["store_id"]);
96
+ echo $product->getSku();
97
+ echo "\t";
98
+ //echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );
99
+ if($product->getImage() != null && $product->getImage() != "no_selection") {
100
+ echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );
101
+ } else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
102
+ echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getSmallImage() );
103
+ } else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
104
+ echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getThumbnail() );
105
+ }
106
+ echo "\t";
107
+ echo $product->getName();
108
+ echo "\t";
109
+ echo $product->getPrice();
110
+ echo "\t";
111
+ //CURRENCY
112
+ echo "\t";
113
+ //ACTIVE
114
+ echo 'Y';
115
+ echo "\t";
116
+ //ITEMURL
117
+ echo $product->getProductUrl();
118
+ echo "\t";
119
+ //CATEGORY
120
+ $ids = $product->getCategoryIds();
121
+ echo (isset($ids[0]) ? $ids[0] : '');
122
+ echo "\t";
123
+ // KEYWORDS
124
+ echo "\t";
125
+ // REPLACEMENTSKU
126
+ echo "\t";
127
+ //VIRTUALPARENTCODE
128
+ echo "\t";
129
+ //CATEGORYPATHJSON
130
+ echo "\t";
131
+ //ISCATEGORY
132
+ echo "n";
133
+ echo "\n";
134
+ }
135
+
136
+ }
137
+
138
+
app/code/community/Turnto/Admin/controllers/VersionController.php CHANGED
@@ -1,7 +1,7 @@
1
- <?php
2
- class Turnto_Admin_VersionController extends Mage_Core_Controller_Front_Action {
3
- public function indexAction() {
4
- echo Mage::getConfig()->getNode()->modules->Turnto_Admin->version;
5
- }
6
- }
7
- ?>
1
+ <?php
2
+ class Turnto_Admin_VersionController extends Mage_Core_Controller_Front_Action {
3
+ public function indexAction() {
4
+ echo Mage::getConfig()->getNode()->modules->Turnto_Admin->version;
5
+ }
6
+ }
7
+ ?>
app/code/community/Turnto/Admin/etc/config.xml CHANGED
@@ -1,86 +1,152 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Turnto_Admin>
6
- <version>2.1.5</version>
7
- </Turnto_Admin>
8
- </modules>
9
-
10
- <global>
11
- <blocks>
12
- <adminblock1>
13
- <class>Turnto_Admin_Block</class>
14
- </adminblock1>
15
- </blocks>
16
- <helpers>
17
- <adminhelper1>
18
- <class>Turnto_Admin_Helper</class>
19
- </adminhelper1>
20
- </helpers>
21
- </global>
22
-
23
- <frontend>
24
- <routers>
25
- <turntocatfeed>
26
- <use>standard</use>
27
- <args>
28
- <module>Turnto_Admin</module>
29
- <frontName>turntocatalogfeed</frontName>
30
- </args>
31
- </turntocatfeed>
32
- <turntoversion>
33
- <use>standard</use>
34
- <args>
35
- <module>Turnto_Admin</module>
36
- <frontName>turnto</frontName>
37
- </args>
38
- </turntoversion>
39
- </routers>
40
- </frontend>
41
-
42
- <admin>
43
- <routers>
44
- <samplerouter1>
45
- <use>admin</use>
46
- <args>
47
- <module>Turnto_Admin_AdminControllers</module>
48
- <frontName>adminturnto</frontName>
49
-
50
- <modules>
51
- <sintax after="Turnto_Admin_AdminControllers">Mage_Adminhtml</sintax>
52
- </modules>
53
- </args>
54
- </samplerouter1>
55
- </routers>
56
- </admin>
57
-
58
- <adminhtml>
59
- <menu>
60
- <menu1 translate="title" module="adminhelper1">
61
- <title>TurnTo</title>
62
- <sort_order>200</sort_order>
63
- <children>
64
- <!-- Note the misleading "module" attribute.
65
- It actualy refers to one of the declared helpers -->
66
- <item1 translate="title" module="adminhelper1">
67
- <title>Integration</title>
68
- <action>samplerouter1/Turnto</action>
69
- <sort_order>1</sort_order>
70
- </item1>
71
- <item2 translate="title" module="adminhelper1">
72
- <title>Moderation</title>
73
- <action>samplerouter1/Turnto/redirect</action>
74
- <sort_order>2</sort_order>
75
- </item2>
76
- <item3 translate="title" module="adminhelper1">
77
- <title>Reporting</title>
78
- <action>samplerouter1/Turnto/redirect</action>
79
- <sort_order>3</sort_order>
80
- </item3>
81
- </children>
82
- </menu1>
83
- </menu>
84
- </adminhtml>
85
-
86
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Turnto_Admin>
6
+ <version>2.2.0</version>
7
+ </Turnto_Admin>
8
+ </modules>
9
+
10
+ <global>
11
+ <blocks>
12
+ <adminblock1>
13
+ <class>Turnto_Admin_Block</class>
14
+ </adminblock1>
15
+ <review>
16
+ <rewrite>
17
+ <helper>Turnto_Admin_Block_Review_Helper</helper>
18
+ </rewrite>
19
+ </review>
20
+ </blocks>
21
+ <helpers>
22
+ <adminhelper1>
23
+ <class>Turnto_Admin_Helper</class>
24
+ </adminhelper1>
25
+ </helpers>
26
+ <models>
27
+ <turnto_admin>
28
+ <class>Turnto_Admin_Model</class>
29
+ <resourceModel>turnto_admin_resource</resourceModel>
30
+ </turnto_admin>
31
+ <turnto_admin_resource>
32
+ <class>Turnto_Admin_Model_Resource</class>
33
+ <entities>
34
+ <rating>
35
+ <table>turnto_products_ratings</table>
36
+ </rating>
37
+ </entities>
38
+ </turnto_admin_resource>
39
+ </models>
40
+ <resources>
41
+ <turnto_admin_setup>
42
+ <setup>
43
+ <module>Turnto_Admin</module>
44
+ </setup>
45
+ </turnto_admin_setup>
46
+ </resources>
47
+ </global>
48
+
49
+ <frontend>
50
+ <routers>
51
+ <turntocatfeed>
52
+ <use>standard</use>
53
+ <args>
54
+ <module>Turnto_Admin</module>
55
+ <frontName>turntocatalogfeed</frontName>
56
+ </args>
57
+ </turntocatfeed>
58
+ <turntoversion>
59
+ <use>standard</use>
60
+ <args>
61
+ <module>Turnto_Admin</module>
62
+ <frontName>turnto</frontName>
63
+ </args>
64
+ </turntoversion>
65
+ </routers>
66
+ </frontend>
67
+
68
+ <admin>
69
+ <routers>
70
+ <samplerouter1>
71
+ <use>admin</use>
72
+ <args>
73
+ <module>Turnto_Admin_AdminControllers</module>
74
+ <frontName>adminturnto</frontName>
75
+
76
+ <modules>
77
+ <sintax after="Turnto_Admin_AdminControllers">Mage_Adminhtml</sintax>
78
+ </modules>
79
+ </args>
80
+ </samplerouter1>
81
+ </routers>
82
+ </admin>
83
+
84
+ <adminhtml>
85
+ <menu>
86
+ <menu1 translate="title" module="adminhelper1">
87
+ <title>TurnTo</title>
88
+ <sort_order>200</sort_order>
89
+ <children>
90
+ <!-- Note the misleading "module" attribute.
91
+ It actualy refers to one of the declared helpers -->
92
+ <item1 translate="title" module="adminhelper1">
93
+ <title>Integration</title>
94
+ <action>samplerouter1/Turnto</action>
95
+ <sort_order>1</sort_order>
96
+ </item1>
97
+ <item2 translate="title" module="adminhelper1">
98
+ <title>Moderation</title>
99
+ <action>samplerouter1/Turnto/redirect</action>
100
+ <sort_order>2</sort_order>
101
+ </item2>
102
+ <item3 translate="title" module="adminhelper1">
103
+ <title>Reporting</title>
104
+ <action>samplerouter1/Turnto/redirect</action>
105
+ <sort_order>3</sort_order>
106
+ </item3>
107
+ </children>
108
+ </menu1>
109
+ </menu>
110
+ <acl>
111
+ <resources>
112
+ <all>
113
+ <title>Allow Everything</title>
114
+ </all>
115
+ <admin>
116
+ <children>
117
+ <system>
118
+ <children>
119
+ <config>
120
+ <children>
121
+ <turnto_admin>
122
+ <title>Turnto Products Ratings</title>
123
+ </turnto_admin>
124
+ </children>
125
+ </config>
126
+ </children>
127
+ </system>
128
+ </children>
129
+ </admin>
130
+ </resources>
131
+ </acl>
132
+ </adminhtml>
133
+ <default>
134
+ <turnto_admin>
135
+ <feedconfig>
136
+ <url>http://static.www.turnto.com/static/export/</url>
137
+ </feedconfig>
138
+ </turnto_admin>
139
+ </default>
140
+ <crontab>
141
+ <jobs>
142
+ <turnto_products_ratings>
143
+ <schedule>
144
+ <cron_expr>0 4 * * *</cron_expr>
145
+ </schedule>
146
+ <run>
147
+ <model>turnto_admin/observer::getProductsRatingsFeed</model>
148
+ </run>
149
+ </turnto_products_ratings>
150
+ </jobs>
151
+ </crontab>
152
+ </config>
app/code/community/Turnto/Admin/etc/system.xml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package Turnto_Admin
5
+ */
6
+ -->
7
+ <config>
8
+ <tabs>
9
+ <turnto_extensions translate="label" >
10
+ <label>TurnTo</label>
11
+ <sort_order>260</sort_order>
12
+ </turnto_extensions>
13
+ </tabs>
14
+
15
+ <sections>
16
+ <turnto_admin translate="label" >
17
+ <label>Products Ratings Feed</label>
18
+ <tab>turnto_extensions</tab>
19
+ <frontend_type>text</frontend_type>
20
+ <sort_order>1</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <groups>
25
+ <feedconfig translate="label" >
26
+ <label>Turnto Feed Configuration</label>
27
+ <frontend_type>text</frontend_type>
28
+ <sort_order>10</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ <expanded>1</expanded>
33
+ <fields>
34
+ <feed_activation>
35
+ <frontend_model>adminblock1/adminhtml_system_config_feed</frontend_model>
36
+ <sort_order>1</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+
41
+ </feed_activation>
42
+ <url translate="label">
43
+ <label>Products Ratings Feed url*</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>10</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ <validate>required-entry</validate>
50
+ </url>
51
+ <site_key translate="label">
52
+ <label>Site Key*</label>
53
+ <frontend_type>text</frontend_type>
54
+ <sort_order>20</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ <validate>required-entry</validate>
59
+ </site_key>
60
+ <site_auth translate="label">
61
+ <label>Authorization Key*</label>
62
+ <frontend_type>text</frontend_type>
63
+ <sort_order>30</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ <validate>required-entry</validate>
68
+ </site_auth>
69
+ <enabled translate="label">
70
+ <label>Show Turnto Products Ratings</label>
71
+ <frontend_type>select</frontend_type>
72
+ <source_model>adminhtml/system_config_source_yesno</source_model>
73
+ <sort_order>40</sort_order>
74
+ <show_in_default>1</show_in_default>
75
+ <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
+ <comment>When set to Yes, Turnto products ratings will be shown.</comment>
78
+ </enabled>
79
+
80
+ </fields>
81
+ </feedconfig>
82
+
83
+ </groups>
84
+
85
+ </turnto_admin>
86
+ </sections>
87
+ </config>
app/code/community/Turnto/Admin/sql/turnto_admin_setup/mysql4-install-2.2.0.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $table = $installer->getConnection()
8
+ ->newTable('turnto_products_ratings')
9
+ ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
10
+ 'identity' => true,
11
+ 'unsigned' => true,
12
+ 'nullable' => false,
13
+ 'primary' => true,
14
+ ), 'Id')
15
+ ->addColumn('product_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
16
+ 'nullable' => true,
17
+ ), 'Product Id')
18
+ ->addColumn('sku', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
19
+ 'nullable' => false,
20
+ ), 'Sku')
21
+ ->addColumn('review_count', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
22
+ 'nullable' => false,
23
+ 'default' => 0,
24
+ ), 'Review Count')
25
+ ->addColumn('rating', Varien_Db_Ddl_Table::TYPE_DECIMAL, null, array(
26
+ 'nullable' => false,
27
+ 'precision' => 2,
28
+ 'scale' => 1,
29
+ 'default' => 0,
30
+ ), 'Rating')
31
+ ->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
32
+ 'nullable' => true,
33
+ 'default' => null,
34
+ ), 'Created At')
35
+ ->addColumn('updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
36
+ 'nullable' => true,
37
+ 'default' => null,
38
+ ), 'Updated At');
39
+
40
+
41
+ $installer->getConnection()->createTable($table);
42
+
43
+
44
+ $installer->endSetup();
app/code/community/Turnto/Login/Block/Login.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Turnto_Login_Block_Login extends Mage_Core_Block_Template
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- //$this->setTemplate('customer/form/login.phtml');
10
- }
11
- }
1
+ <?php
2
+
3
+ class Turnto_Login_Block_Login extends Mage_Core_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ //$this->setTemplate('customer/form/login.phtml');
10
+ }
11
+ }
app/code/community/Turnto/Login/Block/Reg.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- class Turnto_Login_Block_Reg extends Mage_Core_Block_Template
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- //$this->setTemplate('customer/form/login.phtml');
10
- }
11
- }
1
+ <?php
2
+
3
+ class Turnto_Login_Block_Reg extends Mage_Core_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ //$this->setTemplate('customer/form/login.phtml');
10
+ }
11
+ }
app/code/community/Turnto/Login/Helper/Data.php CHANGED
@@ -1,6 +1,6 @@
1
- <?php
2
-
3
- class Turnto_Login_Helper_Data extends Mage_Core_Helper_Data
4
- {
5
-
6
- }
1
+ <?php
2
+
3
+ class Turnto_Login_Helper_Data extends Mage_Core_Helper_Data
4
+ {
5
+
6
+ }
app/code/community/Turnto/Login/controllers/IndexController.php CHANGED
@@ -1,243 +1,243 @@
1
- <?php
2
- class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
3
- public function indexAction()
4
- {
5
- $this->loadLayout();
6
-
7
- $this->renderLayout();
8
- }
9
-
10
- public function regAction()
11
- {
12
- $this->loadLayout();
13
-
14
- $this->renderLayout();
15
- }
16
-
17
-
18
- public function successAction()
19
- {
20
- echo '<html><head></head><body><script type="text/javascript">parent.TurnTo.localAuthenticationComplete();</script><h3>Loading...</h3></body></html>';
21
- }
22
-
23
-
24
-
25
- /**
26
- * Retrieve customer session model object
27
- *
28
- * @return Mage_Customer_Model_Session
29
- */
30
- protected function _getSession()
31
- {
32
- return Mage::getSingleton('customer/session');
33
- }
34
-
35
-
36
- /**
37
- * Login post action
38
- */
39
- public function loginAction()
40
- {
41
- //$result["error"]=0;
42
-
43
- //$this->getResponse()->setHeader('Content-Type', 'application/json');
44
-
45
- if ($this->_getSession()->isLoggedIn()) {
46
- //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
47
- $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
48
- return;
49
- }
50
- $session = $this->_getSession();
51
-
52
- if ($this->getRequest()->isPost()) {
53
- $login = $this->getRequest()->getPost('login');
54
- if (!empty($login['username']) && !empty($login['password'])) {
55
- try {
56
- $session->login($login['username'], $login['password']);
57
- if ($session->getCustomer()->getIsJustConfirmed()) {
58
- $this->_welcomeCustomer($session->getCustomer(), true);
59
- }
60
- $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
61
- return;
62
- } catch (Mage_Core_Exception $e) {
63
- switch ($e->getCode()) {
64
- case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
65
- //$result["error"] = 1;
66
- $value = Mage::helper('customer')->getEmailConfirmationUrl($login['username']);
67
- $message = Mage::helper('customer')->__('This account is not confirmed. <a href="%s">Click here</a> to resend confirmation email.', $value);
68
- break;
69
- case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
70
- //$result["error"] = 1;
71
- $message = $e->getMessage();
72
- break;
73
- default:
74
- //$result["error"] = 1;
75
- $message = $e->getMessage();
76
- }
77
- $session->addError($message);
78
- $session->setUsername($login['username']);
79
- } catch (Exception $e) {
80
- // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
81
- }
82
- } else {
83
- //$result["error"] = 1;
84
- $session->addError($this->__('Login and password are required.'));
85
- }
86
- }
87
-
88
- //$this->_loginPostRedirect();
89
- //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
90
- $this->_redirectError(Mage::getUrl('*/*/index', array('_secure' => true)));
91
- }
92
-
93
- public function getUserStatusAction()
94
- {
95
- $session = Mage::getSingleton('customer/session');
96
- $this->getResponse()->setHeader('Content-Type', 'application/json');
97
- if($session->isLoggedIn()) {
98
- $customer = $session->getCustomer();
99
- $result = array();
100
-
101
- $result['user_auth_token'] = $customer->getEntityId();
102
- $result['first_name'] = $customer->getFirstname();
103
- $result['last_name'] = $customer->getLastname();
104
- $result['email'] = $customer->getEmail();
105
- $result['email_confirmed'] = true;
106
- $result['nickname'] = null;
107
- } else {
108
- $result['error'] = "User is logged out";
109
- }
110
-
111
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
112
- }
113
-
114
- /**
115
- * Customer logout action
116
- */
117
- public function logoutAction()
118
- {
119
- $this->_getSession()->logout()->setBeforeAuthUrl(Mage::getUrl());
120
- }
121
-
122
- public function registerAction()
123
- {
124
- $session = $this->_getSession();
125
- if ($session->isLoggedIn()) {
126
- $this->_redirect('*/*/');
127
- return;
128
- }
129
- $session->setEscapeMessages(true); // prevent XSS injection in user input
130
- if ($this->getRequest()->isPost()) {
131
- $errors = array();
132
-
133
- if (!$customer = Mage::registry('current_customer')) {
134
- $customer = Mage::getModel('customer/customer')->setId(null);
135
- }
136
-
137
- /* @var $customerForm Mage_Customer_Model_Form */
138
- $customerForm = Mage::getModel('customer/form');
139
- $customerForm->setFormCode('customer_account_create')
140
- ->setEntity($customer);
141
-
142
- $customerData = $customerForm->extractData($this->getRequest());
143
-
144
- if ($this->getRequest()->getParam('is_subscribed', false)) {
145
- $customer->setIsSubscribed(1);
146
- }
147
-
148
- /**
149
- * Initialize customer group id
150
- */
151
- $customer->getGroupId();
152
-
153
- if ($this->getRequest()->getPost('create_address')) {
154
- /* @var $address Mage_Customer_Model_Address */
155
- $address = Mage::getModel('customer/address');
156
- /* @var $addressForm Mage_Customer_Model_Form */
157
- $addressForm = Mage::getModel('customer/form');
158
- $addressForm->setFormCode('customer_register_address')
159
- ->setEntity($address);
160
-
161
- $addressData = $addressForm->extractData($this->getRequest(), 'address', false);
162
- $addressErrors = $addressForm->validateData($addressData);
163
- if ($addressErrors === true) {
164
- $address->setId(null)
165
- ->setIsDefaultBilling($this->getRequest()->getParam('default_billing', false))
166
- ->setIsDefaultShipping($this->getRequest()->getParam('default_shipping', false));
167
- $addressForm->compactData($addressData);
168
- $customer->addAddress($address);
169
-
170
- $addressErrors = $address->validate();
171
- if (is_array($addressErrors)) {
172
- $errors = array_merge($errors, $addressErrors);
173
- }
174
- } else {
175
- $errors = array_merge($errors, $addressErrors);
176
- }
177
- }
178
-
179
- try {
180
- $customerErrors = $customerForm->validateData($customerData);
181
- if ($customerErrors !== true) {
182
- $errors = array_merge($customerErrors, $errors);
183
- } else {
184
- $customerForm->compactData($customerData);
185
- $customer->setPassword($this->getRequest()->getPost('password'));
186
- $customer->setConfirmation($this->getRequest()->getPost('confirmation'));
187
- $customerErrors = $customer->validate();
188
- if (is_array($customerErrors)) {
189
- $errors = array_merge($customerErrors, $errors);
190
- }
191
- }
192
-
193
- $validationResult = count($errors) == 0;
194
-
195
- if (true === $validationResult) {
196
- $customer->save();
197
-
198
- if ($customer->isConfirmationRequired()) {
199
- $customer->sendNewAccountEmail('confirmation', $session->getBeforeAuthUrl());
200
- $session->addSuccess($this->__('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href="%s">click here</a>.', Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail())));
201
- $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
202
- //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
203
- return;
204
- } else {
205
- $session->setCustomerAsLoggedIn($customer);
206
- //$url = $this->_welcomeCustomer($customer);
207
- //$this->_redirectSuccess($url);
208
- $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
209
- //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
210
- return;
211
- }
212
- } else {
213
- $session->setCustomerFormData($this->getRequest()->getPost());
214
- if (is_array($errors)) {
215
- foreach ($errors as $errorMessage) {
216
- $session->addError($errorMessage);
217
- }
218
- } else {
219
- $session->addError($this->__('Invalid customer data'));
220
- }
221
- }
222
- } catch (Mage_Core_Exception $e) {
223
- $session->setCustomerFormData($this->getRequest()->getPost());
224
- if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
225
- $url = Mage::getUrl('customer/account/forgotpassword');
226
- $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href="%s">click here</a> to get your password and access your account.', $url);
227
- $session->setEscapeMessages(false);
228
- } else {
229
- $message = $e->getMessage();
230
- }
231
- $session->addError($message);
232
- } catch (Exception $e) {
233
- $session->setCustomerFormData($this->getRequest()->getPost())
234
- ->addException($e, $this->__('Cannot save the customer.'));
235
- }
236
- }
237
-
238
- //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
239
- $this->_redirectError(Mage::getUrl('*/*/reg', array('_secure' => true)));
240
- }
241
- }
242
-
243
-
1
+ <?php
2
+ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
3
+ public function indexAction()
4
+ {
5
+ $this->loadLayout();
6
+
7
+ $this->renderLayout();
8
+ }
9
+
10
+ public function regAction()
11
+ {
12
+ $this->loadLayout();
13
+
14
+ $this->renderLayout();
15
+ }
16
+
17
+
18
+ public function successAction()
19
+ {
20
+ echo '<html><head></head><body><script type="text/javascript">parent.TurnTo.localAuthenticationComplete();</script><h3>Loading...</h3></body></html>';
21
+ }
22
+
23
+
24
+
25
+ /**
26
+ * Retrieve customer session model object
27
+ *
28
+ * @return Mage_Customer_Model_Session
29
+ */
30
+ protected function _getSession()
31
+ {
32
+ return Mage::getSingleton('customer/session');
33
+ }
34
+
35
+
36
+ /**
37
+ * Login post action
38
+ */
39
+ public function loginAction()
40
+ {
41
+ //$result["error"]=0;
42
+
43
+ //$this->getResponse()->setHeader('Content-Type', 'application/json');
44
+
45
+ if ($this->_getSession()->isLoggedIn()) {
46
+ //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
47
+ $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
48
+ return;
49
+ }
50
+ $session = $this->_getSession();
51
+
52
+ if ($this->getRequest()->isPost()) {
53
+ $login = $this->getRequest()->getPost('login');
54
+ if (!empty($login['username']) && !empty($login['password'])) {
55
+ try {
56
+ $session->login($login['username'], $login['password']);
57
+ if ($session->getCustomer()->getIsJustConfirmed()) {
58
+ $this->_welcomeCustomer($session->getCustomer(), true);
59
+ }
60
+ $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
61
+ return;
62
+ } catch (Mage_Core_Exception $e) {
63
+ switch ($e->getCode()) {
64
+ case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
65
+ //$result["error"] = 1;
66
+ $value = Mage::helper('customer')->getEmailConfirmationUrl($login['username']);
67
+ $message = Mage::helper('customer')->__('This account is not confirmed. <a href="%s">Click here</a> to resend confirmation email.', $value);
68
+ break;
69
+ case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
70
+ //$result["error"] = 1;
71
+ $message = $e->getMessage();
72
+ break;
73
+ default:
74
+ //$result["error"] = 1;
75
+ $message = $e->getMessage();
76
+ }
77
+ $session->addError($message);
78
+ $session->setUsername($login['username']);
79
+ } catch (Exception $e) {
80
+ // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
81
+ }
82
+ } else {
83
+ //$result["error"] = 1;
84
+ $session->addError($this->__('Login and password are required.'));
85
+ }
86
+ }
87
+
88
+ //$this->_loginPostRedirect();
89
+ //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
90
+ $this->_redirectError(Mage::getUrl('*/*/index', array('_secure' => true)));
91
+ }
92
+
93
+ public function getUserStatusAction()
94
+ {
95
+ $session = Mage::getSingleton('customer/session');
96
+ $this->getResponse()->setHeader('Content-Type', 'application/json');
97
+ if($session->isLoggedIn()) {
98
+ $customer = $session->getCustomer();
99
+ $result = array();
100
+
101
+ $result['user_auth_token'] = $customer->getEntityId();
102
+ $result['first_name'] = $customer->getFirstname();
103
+ $result['last_name'] = $customer->getLastname();
104
+ $result['email'] = $customer->getEmail();
105
+ $result['email_confirmed'] = true;
106
+ $result['nickname'] = null;
107
+ } else {
108
+ $result['error'] = "User is logged out";
109
+ }
110
+
111
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
112
+ }
113
+
114
+ /**
115
+ * Customer logout action
116
+ */
117
+ public function logoutAction()
118
+ {
119
+ $this->_getSession()->logout()->setBeforeAuthUrl(Mage::getUrl());
120
+ }
121
+
122
+ public function registerAction()
123
+ {
124
+ $session = $this->_getSession();
125
+ if ($session->isLoggedIn()) {
126
+ $this->_redirect('*/*/');
127
+ return;
128
+ }
129
+ $session->setEscapeMessages(true); // prevent XSS injection in user input
130
+ if ($this->getRequest()->isPost()) {
131
+ $errors = array();
132
+
133
+ if (!$customer = Mage::registry('current_customer')) {
134
+ $customer = Mage::getModel('customer/customer')->setId(null);
135
+ }
136
+
137
+ /* @var $customerForm Mage_Customer_Model_Form */
138
+ $customerForm = Mage::getModel('customer/form');
139
+ $customerForm->setFormCode('customer_account_create')
140
+ ->setEntity($customer);
141
+
142
+ $customerData = $customerForm->extractData($this->getRequest());
143
+
144
+ if ($this->getRequest()->getParam('is_subscribed', false)) {
145
+ $customer->setIsSubscribed(1);
146
+ }
147
+
148
+ /**
149
+ * Initialize customer group id
150
+ */
151
+ $customer->getGroupId();
152
+
153
+ if ($this->getRequest()->getPost('create_address')) {
154
+ /* @var $address Mage_Customer_Model_Address */
155
+ $address = Mage::getModel('customer/address');
156
+ /* @var $addressForm Mage_Customer_Model_Form */
157
+ $addressForm = Mage::getModel('customer/form');
158
+ $addressForm->setFormCode('customer_register_address')
159
+ ->setEntity($address);
160
+
161
+ $addressData = $addressForm->extractData($this->getRequest(), 'address', false);
162
+ $addressErrors = $addressForm->validateData($addressData);
163
+ if ($addressErrors === true) {
164
+ $address->setId(null)
165
+ ->setIsDefaultBilling($this->getRequest()->getParam('default_billing', false))
166
+ ->setIsDefaultShipping($this->getRequest()->getParam('default_shipping', false));
167
+ $addressForm->compactData($addressData);
168
+ $customer->addAddress($address);
169
+
170
+ $addressErrors = $address->validate();
171
+ if (is_array($addressErrors)) {
172
+ $errors = array_merge($errors, $addressErrors);
173
+ }
174
+ } else {
175
+ $errors = array_merge($errors, $addressErrors);
176
+ }
177
+ }
178
+
179
+ try {
180
+ $customerErrors = $customerForm->validateData($customerData);
181
+ if ($customerErrors !== true) {
182
+ $errors = array_merge($customerErrors, $errors);
183
+ } else {
184
+ $customerForm->compactData($customerData);
185
+ $customer->setPassword($this->getRequest()->getPost('password'));
186
+ $customer->setConfirmation($this->getRequest()->getPost('confirmation'));
187
+ $customerErrors = $customer->validate();
188
+ if (is_array($customerErrors)) {
189
+ $errors = array_merge($customerErrors, $errors);
190
+ }
191
+ }
192
+
193
+ $validationResult = count($errors) == 0;
194
+
195
+ if (true === $validationResult) {
196
+ $customer->save();
197
+
198
+ if ($customer->isConfirmationRequired()) {
199
+ $customer->sendNewAccountEmail('confirmation', $session->getBeforeAuthUrl());
200
+ $session->addSuccess($this->__('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href="%s">click here</a>.', Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail())));
201
+ $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
202
+ //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
203
+ return;
204
+ } else {
205
+ $session->setCustomerAsLoggedIn($customer);
206
+ //$url = $this->_welcomeCustomer($customer);
207
+ //$this->_redirectSuccess($url);
208
+ $this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
209
+ //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
210
+ return;
211
+ }
212
+ } else {
213
+ $session->setCustomerFormData($this->getRequest()->getPost());
214
+ if (is_array($errors)) {
215
+ foreach ($errors as $errorMessage) {
216
+ $session->addError($errorMessage);
217
+ }
218
+ } else {
219
+ $session->addError($this->__('Invalid customer data'));
220
+ }
221
+ }
222
+ } catch (Mage_Core_Exception $e) {
223
+ $session->setCustomerFormData($this->getRequest()->getPost());
224
+ if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
225
+ $url = Mage::getUrl('customer/account/forgotpassword');
226
+ $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href="%s">click here</a> to get your password and access your account.', $url);
227
+ $session->setEscapeMessages(false);
228
+ } else {
229
+ $message = $e->getMessage();
230
+ }
231
+ $session->addError($message);
232
+ } catch (Exception $e) {
233
+ $session->setCustomerFormData($this->getRequest()->getPost())
234
+ ->addException($e, $this->__('Cannot save the customer.'));
235
+ }
236
+ }
237
+
238
+ //$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
239
+ $this->_redirectError(Mage::getUrl('*/*/reg', array('_secure' => true)));
240
+ }
241
+ }
242
+
243
+
app/code/community/Turnto/Login/etc/config.xml CHANGED
@@ -1,41 +1,41 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Turnto_Login>
6
- <version>2.1.5</version>
7
- </Turnto_Login>
8
- </modules>
9
-
10
- <global>
11
- <blocks>
12
- <loginblock1>
13
- <class>Turnto_Login_Block</class>
14
- </loginblock1>
15
- </blocks>
16
- <helpers>
17
- <loginhelper1>
18
- <class>Turnto_Login_Helper</class>
19
- </loginhelper1>
20
- </helpers>
21
- </global>
22
-
23
- <frontend>
24
- <routers>
25
- <turnto_login>
26
- <use>standard</use>
27
- <args>
28
- <module>Turnto_Login</module>
29
- <frontName>turntologin</frontName>
30
- </args>
31
- </turnto_login>
32
- </routers>
33
- <layout>
34
- <updates>
35
- <turnto_login>
36
- <file>turnto_login.xml</file>
37
- </turnto_login>
38
- </updates>
39
- </layout>
40
- </frontend>
41
- </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Turnto_Login>
6
+ <version>2.1.5</version>
7
+ </Turnto_Login>
8
+ </modules>
9
+
10
+ <global>
11
+ <blocks>
12
+ <loginblock1>
13
+ <class>Turnto_Login_Block</class>
14
+ </loginblock1>
15
+ </blocks>
16
+ <helpers>
17
+ <loginhelper1>
18
+ <class>Turnto_Login_Helper</class>
19
+ </loginhelper1>
20
+ </helpers>
21
+ </global>
22
+
23
+ <frontend>
24
+ <routers>
25
+ <turnto_login>
26
+ <use>standard</use>
27
+ <args>
28
+ <module>Turnto_Login</module>
29
+ <frontName>turntologin</frontName>
30
+ </args>
31
+ </turnto_login>
32
+ </routers>
33
+ <layout>
34
+ <updates>
35
+ <turnto_login>
36
+ <file>turnto_login.xml</file>
37
+ </turnto_login>
38
+ </updates>
39
+ </layout>
40
+ </frontend>
41
+ </config>
app/design/adminhtml/default/default/template/turnto/adminhtml/system/config/feed.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ ?>
5
+ <div style="margin-left:215px;">
6
+ <?php if($this->isFeedActivated()): ?>
7
+ <p style="margin-bottom:0; color:green;"><b><?php echo $this->__('Feed is activated!') ?></b></p>
8
+ <?php else: ?>
9
+ <p style="margin-bottom:0; color:red;"><b><?php echo $this->__('Unable to access the feed! Please make sure your Turnto account is activated and configrations are correctly set.') ?></b></p>
10
+
11
+ <?php endif; ?>
12
+ </div>
app/design/adminhtml/default/default/template/turnto/catalog_feed_tab.phtml CHANGED
@@ -1,72 +1,72 @@
1
- <h4>Catalog Feed</h4>
2
- <p style="width:650px">Go to your Settings in TurnTo Management area and enter:
3
- <br>
4
- <i><?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'turntocatalogfeed';?><?php if(count(Mage::registry('websites')) > 1) { ?>?websiteId=WEBSITE_ID<?php } ?><?php if(count(Mage::registry('stores')) > 1) { ?>&storeId=STORE_ID<?php } ?></i>
5
- <br>
6
- <?php if(count(Mage::registry('stores')) > 1 || count(Mage::registry('websites'))) { ?>
7
- <b>NOTE: You appear to have multiple sites or stores on your magento installation so you will need to supply a scope in the URL. Replace <i>WEBSITE_ID</i> and <i>STORE_ID</i> in the url above with the appropriate values from the drop-downs below (just the number. For instance: siteId=1)</b>
8
- <br>
9
- <?php } ?>
10
- <br>
11
- in the <b>Catalog Feed Url:</b> input field.
12
- <br>
13
- <br>
14
- This will set up the automation of the catalog feed in order to keep you products up to date. </p>
15
- <br>
16
- <br>
17
- <br>
18
- To manually create a catalog feed press Generate to build a catalog feed. This feed can be downloaded and uploaded via the TurnTo management form.
19
-
20
- <br>
21
- <form id="cat_feed_form" name="cat_feed_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
22
- <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
23
- <input name="feed_type" type="hidden" value="catalog" />
24
- <table>
25
- <!--
26
- <tr>
27
- <td>Site Key:</td>
28
- <td><input id="siteKey" name="siteKey" type="text" /></td>
29
- </tr>
30
- <tr>
31
- <td>Auth Key:</td>
32
- <td><input id="authKey" name="authKey" type="text" /></td>
33
- </tr>
34
- -->
35
- <tr>
36
- <?php
37
- echo '<td>Website/Store:</td>';
38
- echo '<td><select id="websiteId" name="websiteId">';
39
- foreach (Mage::registry('websites') as $website) {
40
- foreach ($website->getGroups() as $group) {
41
- $stores = $group->getStores();
42
- foreach ($stores as $store) {
43
- //echo '<option value="'.$website->getId().'_'.store->getId().'">Website</option>';
44
- echo '<option value="'.$website->getId().'_'.$store->getId().'">'.$website->getId().': '.$website->getName().' '.$store->getId().': '.$store->getName().'</option>';
45
- }
46
- }
47
- }
48
- echo '</select></td>'
49
- ?>
50
- </tr>
51
- <tr>
52
- <td></td>
53
- <td align="right">
54
-
55
- <input id="submit" name="submit" value="Generate" type="submit" /></td>
56
-
57
- </tr>
58
- </table>
59
-
60
-
61
-
62
-
63
-
64
- <?php
65
- $file = Mage::getBaseDir('media') . DS . 'turnto/catfeed.csv';
66
-
67
- if(file_exists($file)){
68
- echo '<br /><br /><a href="/media/turnto/catfeed.csv">Download catalog feed</a> - created '.date('m/d/Y G:i',filectime($file));
69
- }
70
- ?>
71
- </form>
72
-
1
+ <h4>Catalog Feed</h4>
2
+ <p style="width:650px">Go to your Settings in TurnTo Management area and enter:
3
+ <br>
4
+ <i><?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'turntocatalogfeed';?><?php if(count(Mage::registry('websites')) > 1) { ?>?websiteId=WEBSITE_ID<?php } ?><?php if(count(Mage::registry('stores')) > 1) { ?>&storeId=STORE_ID<?php } ?></i>
5
+ <br>
6
+ <?php if(count(Mage::registry('stores')) > 1 || count(Mage::registry('websites'))) { ?>
7
+ <b>NOTE: You appear to have multiple sites or stores on your magento installation so you will need to supply a scope in the URL. Replace <i>WEBSITE_ID</i> and <i>STORE_ID</i> in the url above with the appropriate values from the drop-downs below (just the number. For instance: siteId=1)</b>
8
+ <br>
9
+ <?php } ?>
10
+ <br>
11
+ in the <b>Catalog Feed Url:</b> input field.
12
+ <br>
13
+ <br>
14
+ This will set up the automation of the catalog feed in order to keep you products up to date. </p>
15
+ <br>
16
+ <br>
17
+ <br>
18
+ To manually create a catalog feed press Generate to build a catalog feed. This feed can be downloaded and uploaded via the TurnTo management form.
19
+
20
+ <br>
21
+ <form id="cat_feed_form" name="cat_feed_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
22
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
23
+ <input name="feed_type" type="hidden" value="catalog" />
24
+ <table>
25
+ <!--
26
+ <tr>
27
+ <td>Site Key:</td>
28
+ <td><input id="siteKey" name="siteKey" type="text" /></td>
29
+ </tr>
30
+ <tr>
31
+ <td>Auth Key:</td>
32
+ <td><input id="authKey" name="authKey" type="text" /></td>
33
+ </tr>
34
+ -->
35
+ <tr>
36
+ <?php
37
+ echo '<td>Website/Store:</td>';
38
+ echo '<td><select id="websiteId" name="websiteId">';
39
+ foreach (Mage::registry('websites') as $website) {
40
+ foreach ($website->getGroups() as $group) {
41
+ $stores = $group->getStores();
42
+ foreach ($stores as $store) {
43
+ //echo '<option value="'.$website->getId().'_'.store->getId().'">Website</option>';
44
+ echo '<option value="'.$website->getId().'_'.$store->getId().'">'.$website->getId().': '.$website->getName().' '.$store->getId().': '.$store->getName().'</option>';
45
+ }
46
+ }
47
+ }
48
+ echo '</select></td>'
49
+ ?>
50
+ </tr>
51
+ <tr>
52
+ <td></td>
53
+ <td align="right">
54
+
55
+ <input id="submit" name="submit" value="Generate" type="submit" /></td>
56
+
57
+ </tr>
58
+ </table>
59
+
60
+
61
+
62
+
63
+
64
+ <?php
65
+ $file = Mage::getBaseDir('media') . DS . 'turnto/catfeed.csv';
66
+
67
+ if(file_exists($file)){
68
+ echo '<br /><br /><a href="/media/turnto/catfeed.csv">Download catalog feed</a> - created '.date('m/d/Y G:i',filectime($file));
69
+ }
70
+ ?>
71
+ </form>
72
+
app/design/adminhtml/default/default/template/turnto/historical_feed_tab.phtml CHANGED
@@ -1,49 +1,49 @@
1
- <h4>Historical Feed</h4>
2
- <p style="width:600px">A one-time historical batch feed of past customers for populating TurnTo products in a text (tab delimited) format. Feeds contain the information about your site's users and their activities on your site. Upload your magento generated historical feed in your TurnTo feed upload tab in the TurnTo settings area.</p>
3
- <br />
4
- <b>Press Generate to build a historical feed</b>
5
-
6
- <form id="hist_feed_form" name="hist_feed_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
7
- <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
8
- <input name="feed_type" type="hidden" value="historical" />
9
- <table>
10
- <?php if(count(Mage::registry('sites')) > 1) { ?>
11
- <tr>
12
- <td>Scope:</td>
13
- <td><select id="scope" name="scope">
14
- <?php
15
- $sites = Mage::registry('sites');
16
- foreach($sites as $site) {
17
- echo '<option value="'.$site->getId().'">'.$site->getId().': '.$site->getName().'</option>';
18
- }
19
- ?>
20
- </td>
21
- </tr>
22
- <?php } ?>
23
- <tr>
24
- <td>From Date:</td>
25
- <td>
26
- <input name="start_date" id="start_date" readonly="readonly" class="input-text" type="text" />
27
- <img title="Select Date" id="start_date_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl() . '../default/images/fam_calendar.gif' ?>">
28
- </td>
29
- </tr>
30
- <tr><td colspan="2">&nbsp;</td></tr>
31
- <tr>
32
- <td></td>
33
- <td align="right"><input type="submit" name="submit" value="Generate" /></td>
34
- </tr>
35
- </table>
36
- </form>
37
-
38
- <script type="text/javascript">
39
- //<![CDATA[
40
- Calendar.setup({
41
- inputField: "start_date",
42
- ifFormat: "%m/%e/%Y",
43
- showsTime: false,
44
- button: "start_date_trig",
45
- align: "Bl",
46
- singleClick: true
47
- });
48
- //]]>
49
- </script>
1
+ <h4>Historical Feed</h4>
2
+ <p style="width:600px">A one-time historical batch feed of past customers for populating TurnTo products in a text (tab delimited) format. Feeds contain the information about your site's users and their activities on your site. Upload your magento generated historical feed in your TurnTo feed upload tab in the TurnTo settings area.</p>
3
+ <br />
4
+ <b>Press Generate to build a historical feed</b>
5
+
6
+ <form id="hist_feed_form" name="hist_feed_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
7
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
8
+ <input name="feed_type" type="hidden" value="historical" />
9
+ <table>
10
+ <?php if(count(Mage::registry('sites')) > 1) { ?>
11
+ <tr>
12
+ <td>Scope:</td>
13
+ <td><select id="scope" name="scope">
14
+ <?php
15
+ $sites = Mage::registry('sites');
16
+ foreach($sites as $site) {
17
+ echo '<option value="'.$site->getId().'">'.$site->getId().': '.$site->getName().'</option>';
18
+ }
19
+ ?>
20
+ </td>
21
+ </tr>
22
+ <?php } ?>
23
+ <tr>
24
+ <td>From Date:</td>
25
+ <td>
26
+ <input name="start_date" id="start_date" readonly="readonly" class="input-text" type="text" />
27
+ <img title="Select Date" id="start_date_trig" class="v-middle" alt="" src="<?php echo $this->getSkinUrl() . '../default/images/fam_calendar.gif' ?>">
28
+ </td>
29
+ </tr>
30
+ <tr><td colspan="2">&nbsp;</td></tr>
31
+ <tr>
32
+ <td></td>
33
+ <td align="right"><input type="submit" name="submit" value="Generate" /></td>
34
+ </tr>
35
+ </table>
36
+ </form>
37
+
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ Calendar.setup({
41
+ inputField: "start_date",
42
+ ifFormat: "%m/%e/%Y",
43
+ showsTime: false,
44
+ button: "start_date_trig",
45
+ align: "Bl",
46
+ singleClick: true
47
+ });
48
+ //]]>
49
+ </script>
app/design/adminhtml/default/default/template/turnto/overview.phtml CHANGED
@@ -1,37 +1,37 @@
1
- <h4>Overview</h4>
2
- <p style="margin-top:10px;width:600px">
3
-
4
-
5
- To install the Social Commerce Suite, first
6
- contact TurnTo to set up an account and get a license key for the cloud-based services,
7
- then setup your feeds and install the needed Javascript. TurnTo&#39;s support team will
8
- be happy to guide you through the steps.
9
- <br>
10
- <br>
11
- A link to detailed documentation is below.
12
-
13
-
14
-
15
- </p>
16
- <p style="margin-top:20px;width:600px">
17
- <b>To set up an account with Turnto, contact our Sales team via Email at
18
- <a href="mailto:contact@turnto.com">contact@turnto.com</a>
19
- </b>
20
- </p>
21
- <h4 style="margin-top:20px">Feeds</h4>
22
- <p style="margin-top:10px;width:650px">
23
- 1) Catalog Feed<br />
24
- Go to your Settings in TurnTo Management area on the TurnTo site and enter <i><?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'turntocatalogfeed'; ?></i> in the <b>Catalog Feed Url</b>: input field.
25
- This will set up the automation of the catalog feed in order to keep you products up to date.
26
- <br /><br />
27
- 2) Historical Batch Feed<br />
28
- A one-time historical batch feed of past customers for populating TurnTo products in a text (tab delimited) format. Feeds contain the information about your site's users and their activities on your site. Upload your magento generated historical feed in your TurnTo feed upload tab in the TurnTo settings area on the turnto website.<br />
29
- </p>
30
- <h4 style="margin-top:20px">Links</h4><p style="width:600px">Links to helpful information about TurnTo<br /><br />
31
- <a href="http://www.turnto.com/docs/home/magentoconnectaccess" alt="TurnTo Documentation">TurnTo Documentation</a>
32
- <br /><br />
33
- <a href="http://www.turnto.com" alt="Moderation">TurnTo Moderation</a>
34
- <br /><br />
35
- <a href="http://www.turnto.com" alt="Reports">TurnTo Reports</a>
36
- <br /><br />
37
- <a href="http://www.turnto.com" alt="Settings">TurnTo Settings</a></p>
1
+ <h4>Overview</h4>
2
+ <p style="margin-top:10px;width:600px">
3
+
4
+
5
+ To install the Social Commerce Suite, first
6
+ contact TurnTo to set up an account and get a license key for the cloud-based services,
7
+ then setup your feeds and install the needed Javascript. TurnTo&#39;s support team will
8
+ be happy to guide you through the steps.
9
+ <br>
10
+ <br>
11
+ A link to detailed documentation is below.
12
+
13
+
14
+
15
+ </p>
16
+ <p style="margin-top:20px;width:600px">
17
+ <b>To set up an account with Turnto, contact our Sales team via Email at
18
+ <a href="mailto:contact@turnto.com">contact@turnto.com</a>
19
+ </b>
20
+ </p>
21
+ <h4 style="margin-top:20px">Feeds</h4>
22
+ <p style="margin-top:10px;width:650px">
23
+ 1) Catalog Feed<br />
24
+ Go to your Settings in TurnTo Management area on the TurnTo site and enter <i><?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'turntocatalogfeed'; ?></i> in the <b>Catalog Feed Url</b>: input field.
25
+ This will set up the automation of the catalog feed in order to keep you products up to date.
26
+ <br /><br />
27
+ 2) Historical Batch Feed<br />
28
+ A one-time historical batch feed of past customers for populating TurnTo products in a text (tab delimited) format. Feeds contain the information about your site's users and their activities on your site. Upload your magento generated historical feed in your TurnTo feed upload tab in the TurnTo settings area on the turnto website.<br />
29
+ </p>
30
+ <h4 style="margin-top:20px">Links</h4><p style="width:600px">Links to helpful information about TurnTo<br /><br />
31
+ <a href="http://www.turnto.com/docs/home/magentoconnectaccess" alt="TurnTo Documentation">TurnTo Documentation</a>
32
+ <br /><br />
33
+ <a href="http://www.turnto.com" alt="Moderation">TurnTo Moderation</a>
34
+ <br /><br />
35
+ <a href="http://www.turnto.com" alt="Reports">TurnTo Reports</a>
36
+ <br /><br />
37
+ <a href="http://www.turnto.com" alt="Settings">TurnTo Settings</a></p>
app/design/adminhtml/default/default/template/turnto/product_ratings_feed_tab.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h4>Product Ratings Feed</h4>
2
+ <p style="margin-top:10px;width:600px">
3
+
4
+
5
+ Instructions here for the Product Ratings (to change content in this section, update file: app/design/adminhtml/default/default/template/turnto/product_ratings_feed_tab.phtml)
6
+ <br>
7
+ <br>
8
+
9
+ </p>
10
+
11
+ <?php $_helper = Mage::helper('adminhelper1') ?>
12
+
13
+ <?php if($_helper->isFeedActivated()): ?>
14
+ <p style="width:600px">Products Ratings (last updated): <?php echo $_helper->getLastUpdated() ?></p>
15
+
16
+
17
+ <form id="ratings_feed_form" name="ratings_feed_form" method="post" action="<?php echo $this->getUrl('*/*/ratings') ?>">
18
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
19
+ <input name="feed_type" type="hidden" value="ratings" />
20
+ <table>
21
+
22
+ <tr>
23
+
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td align="right">
28
+
29
+ <input id="submit" name="submit" value="Update Ratings" type="submit" /></td>
30
+
31
+ </tr>
32
+ </table>
33
+
34
+ </form>
35
+
36
+ <?php else: ?>
37
+ <form id="ratings_feed_form" name="ratings_feed_form" method="post" action="<?php echo $this->getBaseUrl().'admin/system_config/edit/section/turnto_admin/' ?>">
38
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
39
+ <h4 style="margin-top:20px">Feed Configuration</h4>
40
+ <p style="width:600px">Feed is not active. To configure the feed, please
41
+ <input id="submit" name="submit" value="Configure" type="submit" /></td>
42
+ </form>
43
+
44
+ <?php endif; ?>
45
+
46
+ <br /><br />
47
+ </p>
app/design/frontend/default/default/layout/turnto_login.xml CHANGED
@@ -1,80 +1,80 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <layout version="0.1.0">
3
-
4
- <turnto_login_index_index>
5
- <reference name="root">
6
- <action method="setTemplate">
7
- <template>turnto/login/login.phtml</template>
8
- <!--<template>customer/form/login.phtml</template>-->
9
- </action>
10
- </reference>
11
- <reference name="content">
12
- <block type="customer/form_login" name="customer_form_login" template="turnto/login/login_form.phtml"/>
13
- </reference>
14
- <block type="page/html_head" name="head" as="head">
15
- <action method="addJs"><script>prototype/prototype.js</script></action>
16
- <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
17
- <action method="addJs"><script>lib/ccard.js</script></action>
18
- <action method="addJs"><script>prototype/validation.js</script></action>
19
- <action method="addJs"><script>scriptaculous/builder.js</script></action>
20
- <action method="addJs"><script>scriptaculous/effects.js</script></action>
21
- <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
22
- <action method="addJs"><script>scriptaculous/controls.js</script></action>
23
- <action method="addJs"><script>scriptaculous/slider.js</script></action>
24
- <action method="addJs"><script>varien/js.js</script></action>
25
- <action method="addJs"><script>varien/form.js</script></action>
26
- <action method="addJs"><script>varien/menu.js</script></action>
27
- <action method="addJs"><script>mage/translate.js</script></action>
28
- <action method="addJs"><script>mage/cookies.js</script></action>
29
-
30
- <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
31
-
32
- <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
33
- <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
34
- <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
35
- <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
36
-
37
- <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
38
- <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
39
- </block>
40
- </turnto_login_index_index>
41
-
42
-
43
- <turnto_login_index_reg>
44
- <reference name="root">
45
- <action method="setTemplate">
46
- <template>turnto/login/reg.phtml</template>
47
- <!--<template>customer/form/login.phtml</template>-->
48
- </action>
49
- </reference>
50
- <reference name="content">
51
- <block type="customer/form_register" name="customer_form_register" template="turnto/login/reg_form.phtml"/>
52
- </reference>
53
- <block type="page/html_head" name="head" as="head">
54
- <action method="addJs"><script>prototype/prototype.js</script></action>
55
- <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
56
- <action method="addJs"><script>lib/ccard.js</script></action>
57
- <action method="addJs"><script>prototype/validation.js</script></action>
58
- <action method="addJs"><script>scriptaculous/builder.js</script></action>
59
- <action method="addJs"><script>scriptaculous/effects.js</script></action>
60
- <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
61
- <action method="addJs"><script>scriptaculous/controls.js</script></action>
62
- <action method="addJs"><script>scriptaculous/slider.js</script></action>
63
- <action method="addJs"><script>varien/js.js</script></action>
64
- <action method="addJs"><script>varien/form.js</script></action>
65
- <action method="addJs"><script>varien/menu.js</script></action>
66
- <action method="addJs"><script>mage/translate.js</script></action>
67
- <action method="addJs"><script>mage/cookies.js</script></action>
68
-
69
- <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
70
-
71
- <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
72
- <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
73
- <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
74
- <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
75
-
76
- <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
77
- <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
78
- </block>
79
- </turnto_login_index_reg>
80
- </layout>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+
4
+ <turnto_login_index_index>
5
+ <reference name="root">
6
+ <action method="setTemplate">
7
+ <template>turnto/login/login.phtml</template>
8
+ <!--<template>customer/form/login.phtml</template>-->
9
+ </action>
10
+ </reference>
11
+ <reference name="content">
12
+ <block type="customer/form_login" name="customer_form_login" template="turnto/login/login_form.phtml"/>
13
+ </reference>
14
+ <block type="page/html_head" name="head" as="head">
15
+ <action method="addJs"><script>prototype/prototype.js</script></action>
16
+ <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
17
+ <action method="addJs"><script>lib/ccard.js</script></action>
18
+ <action method="addJs"><script>prototype/validation.js</script></action>
19
+ <action method="addJs"><script>scriptaculous/builder.js</script></action>
20
+ <action method="addJs"><script>scriptaculous/effects.js</script></action>
21
+ <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
22
+ <action method="addJs"><script>scriptaculous/controls.js</script></action>
23
+ <action method="addJs"><script>scriptaculous/slider.js</script></action>
24
+ <action method="addJs"><script>varien/js.js</script></action>
25
+ <action method="addJs"><script>varien/form.js</script></action>
26
+ <action method="addJs"><script>varien/menu.js</script></action>
27
+ <action method="addJs"><script>mage/translate.js</script></action>
28
+ <action method="addJs"><script>mage/cookies.js</script></action>
29
+
30
+ <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
31
+
32
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
33
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
34
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
35
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
36
+
37
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
38
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
39
+ </block>
40
+ </turnto_login_index_index>
41
+
42
+
43
+ <turnto_login_index_reg>
44
+ <reference name="root">
45
+ <action method="setTemplate">
46
+ <template>turnto/login/reg.phtml</template>
47
+ <!--<template>customer/form/login.phtml</template>-->
48
+ </action>
49
+ </reference>
50
+ <reference name="content">
51
+ <block type="customer/form_register" name="customer_form_register" template="turnto/login/reg_form.phtml"/>
52
+ </reference>
53
+ <block type="page/html_head" name="head" as="head">
54
+ <action method="addJs"><script>prototype/prototype.js</script></action>
55
+ <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
56
+ <action method="addJs"><script>lib/ccard.js</script></action>
57
+ <action method="addJs"><script>prototype/validation.js</script></action>
58
+ <action method="addJs"><script>scriptaculous/builder.js</script></action>
59
+ <action method="addJs"><script>scriptaculous/effects.js</script></action>
60
+ <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
61
+ <action method="addJs"><script>scriptaculous/controls.js</script></action>
62
+ <action method="addJs"><script>scriptaculous/slider.js</script></action>
63
+ <action method="addJs"><script>varien/js.js</script></action>
64
+ <action method="addJs"><script>varien/form.js</script></action>
65
+ <action method="addJs"><script>varien/menu.js</script></action>
66
+ <action method="addJs"><script>mage/translate.js</script></action>
67
+ <action method="addJs"><script>mage/cookies.js</script></action>
68
+
69
+ <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
70
+
71
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
72
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
73
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
74
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
75
+
76
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
77
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
78
+ </block>
79
+ </turnto_login_index_reg>
80
+ </layout>
app/design/frontend/default/default/template/turnto/login/login.phtml CHANGED
@@ -1,8 +1,8 @@
1
- <html>
2
- <head>
3
- <?php echo $this->getChildHtml('head') ?>
4
- </head>
5
- <body>
6
- <?php echo $this->getChildHtml('content') ?>
7
- </body>
8
- </html>
1
+ <html>
2
+ <head>
3
+ <?php echo $this->getChildHtml('head') ?>
4
+ </head>
5
+ <body>
6
+ <?php echo $this->getChildHtml('content') ?>
7
+ </body>
8
+ </html>
app/design/frontend/default/default/template/turnto/login/login_form.phtml CHANGED
@@ -1,116 +1,116 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Customer login form template
30
- *
31
- * @see Mage_Customer_Block_Form_Login
32
- */
33
- ?>
34
- <div class="account-login">
35
- <div class="page-title">
36
- <h1><?php echo $this->__('Login') ?></h1>
37
- </div>
38
- <?php
39
- $this->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true));
40
- echo $this->getMessagesBlock()->getGroupedHtml();
41
- ?>
42
- <form method="post" id="login-form" action="<?php echo $this->getUrl("*/*/login") ?>">
43
- <div class="col2-set">
44
- <div class="col-1 new-users">
45
- <div class="content">
46
- <h2><?php echo $this->__('New Customers') ?></h2>
47
- <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
48
- </div>
49
- </div>
50
- <div class="col-2 registered-users">
51
- <div class="content">
52
- <h2><?php echo $this->__('Registered Customers') ?></h2>
53
- <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
54
- <ul class="form-list">
55
- <li>
56
- <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
57
- <div class="input-box">
58
- <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
59
- </div>
60
- </li>
61
- <li>
62
- <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
63
- <div class="input-box">
64
- <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
65
- </div>
66
- </li>
67
- </ul>
68
- <p class="required"><?php echo $this->__('* Required Fields') ?></p>
69
- </div>
70
- </div>
71
- </div>
72
- <div class="col2-set">
73
- <div class="col-1 new-users">
74
- <div class="buttons-set">
75
- <!--<button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>-->
76
- <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getUrl('*/*/reg') ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
77
- </div>
78
- </div>
79
- <div class="col-2 registered-users">
80
- <div class="buttons-set">
81
- <a href="<?php echo $this->getForgotPasswordUrl() ?>" target="_parent" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
82
- <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
83
- </div>
84
- </div>
85
- </div>
86
- </form>
87
- <script type="text/javascript">
88
- //<![CDATA[
89
- //function handlerFunction(){
90
-
91
- // Making Ajax Request
92
- //var request = new Ajax.Request(
93
- // '<?php echo $this->getUrl("*/*/login") ?>',
94
- // {
95
- // method: 'post',
96
- // onComplete: function(transport){ // Defining Complete Callback Function
97
-
98
- // Getting Ajax Response Text Which is JSON Object
99
- // var jsonResponse=JSON.parse(transport.responseText);
100
- //Checking JSON Objects property and performing related action
101
- // You will understand the response Text format after going through the controller description (Below)
102
- // if(jsonResponse.error){
103
- // alert("Error Occured");
104
- // return false;
105
- // }
106
- // else{
107
- // parent.TurnTo.localAuthenticationComplete();
108
- // }
109
- // },
110
- // parameters: Form.serialize($("login-form")) // Seriallizing the form input values
111
- // }
112
- // );
113
- // }
114
- //]]>
115
- </script>
116
- </div>
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Customer login form template
30
+ *
31
+ * @see Mage_Customer_Block_Form_Login
32
+ */
33
+ ?>
34
+ <div class="account-login">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Login') ?></h1>
37
+ </div>
38
+ <?php
39
+ $this->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true));
40
+ echo $this->getMessagesBlock()->getGroupedHtml();
41
+ ?>
42
+ <form method="post" id="login-form" action="<?php echo $this->getUrl("*/*/login") ?>">
43
+ <div class="col2-set">
44
+ <div class="col-1 new-users">
45
+ <div class="content">
46
+ <h2><?php echo $this->__('New Customers') ?></h2>
47
+ <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
48
+ </div>
49
+ </div>
50
+ <div class="col-2 registered-users">
51
+ <div class="content">
52
+ <h2><?php echo $this->__('Registered Customers') ?></h2>
53
+ <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
54
+ <ul class="form-list">
55
+ <li>
56
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
57
+ <div class="input-box">
58
+ <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
59
+ </div>
60
+ </li>
61
+ <li>
62
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
63
+ <div class="input-box">
64
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
65
+ </div>
66
+ </li>
67
+ </ul>
68
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="col2-set">
73
+ <div class="col-1 new-users">
74
+ <div class="buttons-set">
75
+ <!--<button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>-->
76
+ <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getUrl('*/*/reg') ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
77
+ </div>
78
+ </div>
79
+ <div class="col-2 registered-users">
80
+ <div class="buttons-set">
81
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" target="_parent" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
82
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </form>
87
+ <script type="text/javascript">
88
+ //<![CDATA[
89
+ //function handlerFunction(){
90
+
91
+ // Making Ajax Request
92
+ //var request = new Ajax.Request(
93
+ // '<?php echo $this->getUrl("*/*/login") ?>',
94
+ // {
95
+ // method: 'post',
96
+ // onComplete: function(transport){ // Defining Complete Callback Function
97
+
98
+ // Getting Ajax Response Text Which is JSON Object
99
+ // var jsonResponse=JSON.parse(transport.responseText);
100
+ //Checking JSON Objects property and performing related action
101
+ // You will understand the response Text format after going through the controller description (Below)
102
+ // if(jsonResponse.error){
103
+ // alert("Error Occured");
104
+ // return false;
105
+ // }
106
+ // else{
107
+ // parent.TurnTo.localAuthenticationComplete();
108
+ // }
109
+ // },
110
+ // parameters: Form.serialize($("login-form")) // Seriallizing the form input values
111
+ // }
112
+ // );
113
+ // }
114
+ //]]>
115
+ </script>
116
+ </div>
app/design/frontend/default/default/template/turnto/login/reg.phtml CHANGED
@@ -1,8 +1,8 @@
1
- <html>
2
- <head>
3
- <?php echo $this->getChildHtml('head') ?>
4
- </head>
5
- <body>
6
- <?php echo $this->getChildHtml('content') ?>
7
- </body>
8
- </html>
1
+ <html>
2
+ <head>
3
+ <?php echo $this->getChildHtml('head') ?>
4
+ </head>
5
+ <body>
6
+ <?php echo $this->getChildHtml('content') ?>
7
+ </body>
8
+ </html>
app/design/frontend/default/default/template/turnto/login/reg_form.phtml CHANGED
@@ -1,186 +1,186 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Create account form template
30
- *
31
- * @see Mage_Customer_Block_Form_Register
32
- */
33
- ?>
34
- <div class="account-create">
35
- <div class="page-title">
36
- <h1><?php echo $this->__('Create an Account') ?></h1>
37
- </div>
38
- <?php echo $this->getChildHtml('form_fields_before')?>
39
- <?php
40
- $this->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true));
41
- echo $this->getMessagesBlock()->getGroupedHtml();
42
- ?>
43
- <form action="<?php echo $this->getUrl("*/*/register") ?>" method="post" id="form-validate">
44
- <div class="fieldset">
45
- <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
46
- <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
47
- <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
48
- <ul class="form-list">
49
- <li class="fields">
50
- <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
51
- </li>
52
- <li>
53
- <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
54
- <div class="input-box">
55
- <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
56
- </div>
57
- </li>
58
- <?php if ($this->isNewsletterEnabled()): ?>
59
- <li class="control">
60
- <div class="input-box">
61
- <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
62
- </div>
63
- <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
64
- </li>
65
- <?php endif ?>
66
- <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
67
- <?php if ($_dob->isEnabled()): ?>
68
- <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
69
- <?php endif ?>
70
- <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
71
- <?php if ($_taxvat->isEnabled()): ?>
72
- <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
73
- <?php endif ?>
74
- <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
75
- <?php if ($_gender->isEnabled()): ?>
76
- <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
77
- <?php endif ?>
78
- </ul>
79
- </div>
80
- <?php if($this->getShowAddressFields()): ?>
81
- <div class="fieldset">
82
- <input type="hidden" name="create_address" value="1" />
83
- <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
84
- <ul class="form-list">
85
- <li class="fields">
86
- <div class="field">
87
- <label for="company"><?php echo $this->__('Company') ?></label>
88
- <div class="input-box">
89
- <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
90
- </div>
91
- </div>
92
- <div class="field">
93
- <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
94
- <div class="input-box">
95
- <input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
96
- </div>
97
- </div>
98
- </li>
99
- <li class="wide">
100
- <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
101
- <div class="input-box">
102
- <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
103
- </div>
104
- </li>
105
- <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
106
- <li class="wide">
107
- <div class="input-box">
108
- <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
109
- </div>
110
- </li>
111
- <?php endfor ?>
112
- <li class="fields">
113
- <div class="field">
114
- <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
115
- <div class="input-box">
116
- <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
117
- </div>
118
- </div>
119
- <div class="field">
120
- <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
121
- <div class="input-box">
122
- <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
123
- <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
124
- </select>
125
- <script type="text/javascript">
126
- //<![CDATA[
127
- $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
128
- //]]>
129
- </script>
130
- <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
131
- </div>
132
- </div>
133
- </li>
134
- <li class="fields">
135
- <div class="field">
136
- <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
137
- <div class="input-box">
138
- <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
139
- </div>
140
- </div>
141
- <div class="field">
142
- <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
143
- <div class="input-box">
144
- <?php echo $this->getCountryHtmlSelect() ?>
145
- </div>
146
- </div>
147
- </li>
148
- </ul>
149
- <input type="hidden" name="default_billing" value="1" />
150
- <input type="hidden" name="default_shipping" value="1" />
151
- </div>
152
- <?php endif; ?>
153
- <div class="fieldset">
154
- <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
155
- <ul class="form-list">
156
- <li class="fields">
157
- <div class="field">
158
- <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
159
- <div class="input-box">
160
- <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
161
- </div>
162
- </div>
163
- <div class="field">
164
- <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
165
- <div class="input-box">
166
- <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
167
- </div>
168
- </div>
169
- </li>
170
- </ul>
171
- </div>
172
- <div class="buttons-set">
173
- <p class="required"><?php echo $this->__('* Required Fields') ?></p>
174
- <!--<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>-->
175
- <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
176
- </div>
177
- </form>
178
- <script type="text/javascript">
179
- //<![CDATA[
180
- var dataForm = new VarienForm('form-validate', true);
181
- <?php if($this->getShowAddressFields()): ?>
182
- new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
183
- <?php endif; ?>
184
- //]]>
185
- </script>
186
- </div>
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Create account form template
30
+ *
31
+ * @see Mage_Customer_Block_Form_Register
32
+ */
33
+ ?>
34
+ <div class="account-create">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Create an Account') ?></h1>
37
+ </div>
38
+ <?php echo $this->getChildHtml('form_fields_before')?>
39
+ <?php
40
+ $this->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true));
41
+ echo $this->getMessagesBlock()->getGroupedHtml();
42
+ ?>
43
+ <form action="<?php echo $this->getUrl("*/*/register") ?>" method="post" id="form-validate">
44
+ <div class="fieldset">
45
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
46
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
47
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
48
+ <ul class="form-list">
49
+ <li class="fields">
50
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
51
+ </li>
52
+ <li>
53
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
54
+ <div class="input-box">
55
+ <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
56
+ </div>
57
+ </li>
58
+ <?php if ($this->isNewsletterEnabled()): ?>
59
+ <li class="control">
60
+ <div class="input-box">
61
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
62
+ </div>
63
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
64
+ </li>
65
+ <?php endif ?>
66
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
67
+ <?php if ($_dob->isEnabled()): ?>
68
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
69
+ <?php endif ?>
70
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
71
+ <?php if ($_taxvat->isEnabled()): ?>
72
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
73
+ <?php endif ?>
74
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
75
+ <?php if ($_gender->isEnabled()): ?>
76
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
77
+ <?php endif ?>
78
+ </ul>
79
+ </div>
80
+ <?php if($this->getShowAddressFields()): ?>
81
+ <div class="fieldset">
82
+ <input type="hidden" name="create_address" value="1" />
83
+ <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
84
+ <ul class="form-list">
85
+ <li class="fields">
86
+ <div class="field">
87
+ <label for="company"><?php echo $this->__('Company') ?></label>
88
+ <div class="input-box">
89
+ <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
90
+ </div>
91
+ </div>
92
+ <div class="field">
93
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
94
+ <div class="input-box">
95
+ <input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
96
+ </div>
97
+ </div>
98
+ </li>
99
+ <li class="wide">
100
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
101
+ <div class="input-box">
102
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
103
+ </div>
104
+ </li>
105
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
106
+ <li class="wide">
107
+ <div class="input-box">
108
+ <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
109
+ </div>
110
+ </li>
111
+ <?php endfor ?>
112
+ <li class="fields">
113
+ <div class="field">
114
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
115
+ <div class="input-box">
116
+ <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
117
+ </div>
118
+ </div>
119
+ <div class="field">
120
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
121
+ <div class="input-box">
122
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
123
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
124
+ </select>
125
+ <script type="text/javascript">
126
+ //<![CDATA[
127
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
128
+ //]]>
129
+ </script>
130
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
131
+ </div>
132
+ </div>
133
+ </li>
134
+ <li class="fields">
135
+ <div class="field">
136
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
137
+ <div class="input-box">
138
+ <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
139
+ </div>
140
+ </div>
141
+ <div class="field">
142
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
143
+ <div class="input-box">
144
+ <?php echo $this->getCountryHtmlSelect() ?>
145
+ </div>
146
+ </div>
147
+ </li>
148
+ </ul>
149
+ <input type="hidden" name="default_billing" value="1" />
150
+ <input type="hidden" name="default_shipping" value="1" />
151
+ </div>
152
+ <?php endif; ?>
153
+ <div class="fieldset">
154
+ <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
155
+ <ul class="form-list">
156
+ <li class="fields">
157
+ <div class="field">
158
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
159
+ <div class="input-box">
160
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
161
+ </div>
162
+ </div>
163
+ <div class="field">
164
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
165
+ <div class="input-box">
166
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
167
+ </div>
168
+ </div>
169
+ </li>
170
+ </ul>
171
+ </div>
172
+ <div class="buttons-set">
173
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
174
+ <!--<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>-->
175
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
176
+ </div>
177
+ </form>
178
+ <script type="text/javascript">
179
+ //<![CDATA[
180
+ var dataForm = new VarienForm('form-validate', true);
181
+ <?php if($this->getShowAddressFields()): ?>
182
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
183
+ <?php endif; ?>
184
+ //]]>
185
+ </script>
186
+ </div>
app/etc/modules/Turnto_Admin.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Turnto_Admin>
6
- <active>true</active>
7
- <codePool>community</codePool>
8
- </Turnto_Admin>
9
- </modules>
10
- </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Turnto_Admin>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Turnto_Admin>
9
+ </modules>
10
+ </config>
app/etc/modules/Turnto_Login.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Turnto_Login>
6
- <active>true</active>
7
- <codePool>community</codePool>
8
- </Turnto_Login>
9
- </modules>
10
- </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Turnto_Login>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Turnto_Login>
9
+ </modules>
10
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>socialcommerce_suite_by_turnto</name>
4
- <version>2.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.turntonetworks.com/terms-of-use">TurnTo Networks</license>
7
  <channel>community</channel>
@@ -9,14 +9,15 @@
9
  <summary>Connect your shoppers to your customers</summary>
10
  <description>The TurnTo Social Commerce Suite helps you put the good will you have earned from your customers to work by opening direct communications between your shoppers and your past customers.</description>
11
  <notes>TurnTo Admin Extension&#xD;
 
12
  2.0 Adds support for Single Sign On&#xD;
13
  2.1 Re-wrote catalog feed generator&#xD;
14
- &#xD;
15
- 2.1.6 - Better catalog support in catalog feed generator.</notes>
16
  <authors><author><name>TurnTo</name><user>TurnTo</user><email>contact@turnto.com</email></author></authors>
17
- <date>2015-06-08</date>
18
- <time>16:02:55</time>
19
- <contents><target name="magecommunity"><dir name="Turnto"><dir name="Admin"><dir name="Block"><file name="CatalogFeed.php" hash="f974cfdc687bf5edb3fdccb879547200"/><file name="HistoricalFeed.php" hash="a4d2b29c6d8bb2ed59aa884e02abc23b"/><file name="Overview.php" hash="51c8ed09153f1dc3b3d02aa0ab83f195"/><file name="ShowTabsAdminBlock.php" hash="d904239a91cc367e93c138eff3e2b074"/></dir><dir name="Helper"><file name="Data.php" hash="78a1e318ccf05caac4ca7a8c2bd74e43"/></dir><dir name="controllers"><dir name="AdminControllers"><file name="TurntoController.php" hash="690057e9429e3454939976232f0ccb22"/></dir><file name="IndexController.php" hash="52729ba61be3d9bd1a5abcf3b111af1a"/><file name="VersionController.php" hash="60fb4a7d588c728166d11b5808cf2099"/><file name=".IndexController.php.swo" hash="9fe1be1d74e273018c523559e88f8950"/><file name=".VersionController.php.swo" hash="297b78fd627fc67e350325767bd33e9a"/><file name=".VersionController.php.swp" hash="2285964acc4ac6ecd381d38e64ce252b"/></dir><dir name="etc"><file name="config.xml" hash="0a15daa1aa6e619ffc0c3718cb768d7f"/><file name=".config.xml.swp" hash="91caa56be3f38be493b6028dfb87ec79"/></dir></dir><dir name="Login"><dir name="Block"><file name="Login.php" hash="a51bc0ee76d20a9f4cb32bb21420ecd9"/><file name="Reg.php" hash="4eece8d78391b6578b0ba5e2c764dba5"/></dir><dir name="Helper"><file name="Data.php" hash="e87f15957335101d5ae643befcc06817"/></dir><dir name="controllers"><file name="IndexController.php" hash="087867555ca6d8174fb1301f3b558720"/></dir><dir name="etc"><file name="config.xml" hash="2fcebddc4b687752f16860a3dd092d47"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Turnto_Admin.xml" hash="0932b63ab068e1e8b12ff7b997ae83ee"/><file name="Turnto_Login.xml" hash="734c463c75970bd14ac7d7a90fa2de11"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="turnto"><file name="catalog_feed_tab.phtml" hash="c7623db3227221f10a32de69322bead9"/><file name="historical_feed_tab.phtml" hash="510bee39f490fe289e28e796ba0d43f2"/><file name="overview.phtml" hash="4cc20b32c3b0cd36cd349f0be44e4615"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="turnto"><dir name="login"><file name="login.phtml" hash="7ec602a8ca09180f324229a77ea3e2db"/><file name="login_form.phtml" hash="a176124e54fc105d09e8a219114d9cfe"/><file name="reg.phtml" hash="7ec602a8ca09180f324229a77ea3e2db"/><file name="reg_form.phtml" hash="8d513aa7b9b582f748f5a484f2e81568"/></dir></dir></dir><dir name="layout"><file name="turnto_login.xml" hash="e9c1993c14add5a7be5c4079547d3609"/></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>socialcommerce_suite_by_turnto</name>
4
+ <version>2.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.turntonetworks.com/terms-of-use">TurnTo Networks</license>
7
  <channel>community</channel>
9
  <summary>Connect your shoppers to your customers</summary>
10
  <description>The TurnTo Social Commerce Suite helps you put the good will you have earned from your customers to work by opening direct communications between your shoppers and your past customers.</description>
11
  <notes>TurnTo Admin Extension&#xD;
12
+ &#xD;
13
  2.0 Adds support for Single Sign On&#xD;
14
  2.1 Re-wrote catalog feed generator&#xD;
15
+ 2.1.6 - Better catalog support in catalog feed generator.&#xD;
16
+ 2.2.0 - Support for sku average rating feed</notes>
17
  <authors><author><name>TurnTo</name><user>TurnTo</user><email>contact@turnto.com</email></author></authors>
18
+ <date>2015-07-20</date>
19
+ <time>14:26:12</time>
20
+ <contents><target name="magecommunity"><dir name="Turnto"><dir name="Admin"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Feed.php" hash="22479a47b415176c2900c953e957f391"/></dir></dir></dir><file name="CatalogFeed.php" hash="25329c99c5b3d55bb57e44b8be83b943"/><file name="HistoricalFeed.php" hash="519d9d464f4c82ba99daf1f70b32a69c"/><file name="Overview.php" hash="28a8867b752c3ec29ce2d9429a1329ed"/><file name="RatingsFeed.php" hash="264cf15842c2738f1b77bce6ff9b9f0a"/><dir name="Review"><file name="Helper.php" hash="57b86bbb935b6561984c365f9dece0e0"/></dir><file name="ShowTabsAdminBlock.php" hash="81798b82fce9de7e3329165aaf613a92"/></dir><dir name="Helper"><file name="Data.php" hash="ec13e17b86c2e0c50bbbc69b18b838c0"/></dir><dir name="Model"><file name="Observer.php" hash="f8bf79b983a8af1b28c547d28143d335"/><file name="Rating.php" hash="d679a1cba88eb5b39f5d922c9a86ab94"/><dir name="Resource"><dir name="Rating"><file name="Collection.php" hash="6a868845725df7b134853ae5615d355f"/></dir><file name="Rating.php" hash="c30ccb361bcd0822618c074e1d52e456"/></dir></dir><dir name="controllers"><dir name="AdminControllers"><file name="TurntoController.php" hash="ee857e9efafd342cb0b8ef44def9f8ff"/><file name="TurntoController.php.bkup" hash="72374095498b8f1d8d6aaee8e9abb7ce"/></dir><file name="IndexController.php" hash="7f0a5858c9fce288f7b10be2eea71e2a"/><file name="VersionController.php" hash="0d3880d8b8714ba64b8560cbce4a113e"/><file name=".IndexController.php.swo" hash="9fe1be1d74e273018c523559e88f8950"/><file name=".VersionController.php.swo" hash="297b78fd627fc67e350325767bd33e9a"/><file name=".VersionController.php.swp" hash="2285964acc4ac6ecd381d38e64ce252b"/></dir><dir name="etc"><file name="config.xml" hash="4908434e61e7810dc1cfb786973170b1"/><file name="system.xml" hash="c2fe73b3e0c4876709aa7625faca14da"/><file name=".config.xml.swp" hash="91caa56be3f38be493b6028dfb87ec79"/></dir><dir name="sql"><dir name="turnto_admin_setup"><file name="mysql4-install-2.2.0.php" hash="2dbc4b2569ae7cd9fdd2eb088dbfbd14"/></dir></dir></dir><dir name="Login"><dir name="Block"><file name="Login.php" hash="c5fd9e315641b8d12a1a6ed2334e93c9"/><file name="Reg.php" hash="d8a8a40388d8e9759c6e33d033b5548d"/></dir><dir name="Helper"><file name="Data.php" hash="0a91a4f0d680e349f580ae067d1df6e2"/></dir><dir name="controllers"><file name="IndexController.php" hash="94708c749d15a55b6954cc01543121f6"/></dir><dir name="etc"><file name="config.xml" hash="033dc3797bc9b3d41fdbc772598eaf5a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Turnto_Admin.xml" hash="8ff02a192ff5c2712972d2f095eb1e6c"/><file name="Turnto_Login.xml" hash="feff13bd2ef11833db4eddcb510879f8"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="turnto"><dir name="adminhtml"><dir name="system"><dir name="config"><file name="feed.phtml" hash="df53d78a80939964a4eb3f8710cd0af7"/></dir></dir></dir><file name="catalog_feed_tab.phtml" hash="79588624cd97da6afbb873c0006a971b"/><file name="historical_feed_tab.phtml" hash="5a8a1b6ddeacc91e06326f5da6751a6c"/><file name="overview.phtml" hash="79eec542652f64e6380dff6d19d16114"/><file name="product_ratings_feed_tab.phtml" hash="e592e47aac70161028be3e423fb82deb"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="turnto"><dir name="login"><file name="login.phtml" hash="55bb2ef93f07bbcd9ebdebe80e5a50a1"/><file name="login_form.phtml" hash="c0d4085d734620b5535a0352a831bb20"/><file name="reg.phtml" hash="55bb2ef93f07bbcd9ebdebe80e5a50a1"/><file name="reg_form.phtml" hash="66fdc4835e040e94094f8b5a6aae4588"/></dir></dir></dir><dir name="layout"><file name="turnto_login.xml" hash="12ade155511eb35a63a6e35e57067548"/></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>