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
2.2.2 - Minor bug fix
2.2.5 - Catalog Feed tweaks
Download this release
Release Info
Developer | TurnTo Networks |
Extension | socialcommerce_suite_by_turnto |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.5
- app/code/community/Turnto/Admin/Block/Adminhtml/System/Config/Feed.php +38 -37
- app/code/community/Turnto/Admin/Block/CatalogFeed.php +10 -10
- app/code/community/Turnto/Admin/Block/HistoricalFeed.php +10 -10
- app/code/community/Turnto/Admin/Block/Overview.php +10 -10
- app/code/community/Turnto/Admin/Block/Review/Helper.php +71 -89
- app/code/community/Turnto/Admin/Block/ShowTabsAdminBlock.php +48 -48
- app/code/community/Turnto/Admin/Helper/Data.php +168 -125
- app/code/community/Turnto/Admin/Model/Catalog/Product.php +40 -0
- app/code/community/Turnto/Admin/Model/Observer.php +15 -15
- app/code/community/Turnto/Admin/Model/Rating.php +8 -8
- app/code/community/Turnto/Admin/Model/Resource/Rating.php +8 -8
- app/code/community/Turnto/Admin/Model/Resource/Rating/Collection.php +8 -8
- app/code/community/Turnto/Admin/controllers/.IndexController.php.swo +0 -0
- app/code/community/Turnto/Admin/controllers/.VersionController.php.swo +0 -0
- app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php +259 -259
- app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php.bkup +0 -227
- app/code/community/Turnto/Admin/controllers/IndexController.php +156 -138
- app/code/community/Turnto/Admin/controllers/VersionController.php +7 -7
- app/code/community/Turnto/Admin/etc/config.xml +157 -152
- app/code/community/Turnto/Admin/etc/system.xml +88 -87
- app/code/community/Turnto/Admin/sql/turnto_admin_setup/mysql4-install-2.2.0.php +43 -43
- app/code/community/Turnto/Login/Block/Login.php +11 -11
- app/code/community/Turnto/Login/Block/Reg.php +11 -11
- app/code/community/Turnto/Login/Helper/Data.php +6 -6
- app/code/community/Turnto/Login/controllers/IndexController.php +243 -243
- app/code/community/Turnto/Login/etc/config.xml +41 -41
- app/design/adminhtml/default/default/template/turnto/adminhtml/system/config/feed.phtml +12 -12
- app/design/adminhtml/default/default/template/turnto/catalog_feed_tab.phtml +72 -72
- app/design/adminhtml/default/default/template/turnto/historical_feed_tab.phtml +49 -49
- app/design/adminhtml/default/default/template/turnto/overview.phtml +37 -37
- app/design/adminhtml/default/default/template/turnto/product_ratings_feed_tab.phtml +49 -47
- app/design/frontend/default/default/layout/turnto_login.xml +80 -80
- app/design/frontend/default/default/template/turnto/login/login.phtml +8 -8
- app/design/frontend/default/default/template/turnto/login/login_form.phtml +116 -116
- app/design/frontend/default/default/template/turnto/login/reg.phtml +8 -8
- app/design/frontend/default/default/template/turnto/login/reg_form.phtml +186 -186
- app/etc/modules/Turnto_Admin.xml +10 -10
- app/etc/modules/Turnto_Login.xml +10 -10
- package.xml +6 -5
app/code/community/Turnto/Admin/Block/Adminhtml/System/Config/Feed.php
CHANGED
@@ -1,38 +1,39 @@
|
|
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 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
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 |
+
// don't load the process the entire feed on config page load.
|
18 |
+
// $this->_activated = Mage::helper('adminhelper1')
|
19 |
+
// ->isFeedActivated();
|
20 |
+
//
|
21 |
+
// if($this->_activated)
|
22 |
+
// Mage::helper('adminhelper1')->loadRatings();
|
23 |
+
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
28 |
+
{
|
29 |
+
|
30 |
+
return $this->toHtml();
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
public function isFeedActivated()
|
35 |
+
{
|
36 |
+
return $this->_activated;
|
37 |
+
}
|
38 |
+
|
39 |
}
|
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/Review/Helper.php
CHANGED
@@ -1,89 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*
|
7 |
-
*
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
*
|
12 |
-
*
|
13 |
-
*
|
14 |
-
*
|
15 |
-
*
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
*
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
if(Mage::getStoreConfig('turnto_admin/feedconfig/enabled')){
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
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 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category Turnto
|
5 |
+
* @package Turnto_Admin
|
6 |
+
* @copyright
|
7 |
+
* @license
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Review helper
|
12 |
+
*
|
13 |
+
* @category Turnto
|
14 |
+
* @package Turnto_Admin
|
15 |
+
* @author nanowebgroup.com
|
16 |
+
*/
|
17 |
+
class Turnto_Admin_Block_Review_Helper extends Mage_Review_Block_Helper
|
18 |
+
{
|
19 |
+
|
20 |
+
protected $_turnto_rating = null;
|
21 |
+
|
22 |
+
public function getRatingSummary()
|
23 |
+
{
|
24 |
+
// if(Mage::getStoreConfig('turnto_admin/feedconfig/enabled')){
|
25 |
+
|
26 |
+
|
27 |
+
$rating = $this->_getTurntoRating();
|
28 |
+
$rating_value = is_numeric($rating->getRating()) && (double)$rating->getRating() > 0 ? $rating->getRating() : 0;
|
29 |
+
|
30 |
+
return $rating_value*20;
|
31 |
+
|
32 |
+
// }else{
|
33 |
+
// return parent::getRatingSummary();
|
34 |
+
// }
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
public function getReviewsCount()
|
39 |
+
{
|
40 |
+
|
41 |
+
|
42 |
+
// if(Mage::getStoreConfig('turnto_admin/feedconfig/enabled')){
|
43 |
+
|
44 |
+
|
45 |
+
$rating = $this->_getTurntoRating();
|
46 |
+
|
47 |
+
if($rating->getReviewCount()){
|
48 |
+
|
49 |
+
return $rating->getReviewCount();
|
50 |
+
}else{
|
51 |
+
|
52 |
+
return 0;
|
53 |
+
}
|
54 |
+
|
55 |
+
// }else{
|
56 |
+
// return parent::getReviewsCount();
|
57 |
+
// }
|
58 |
+
}
|
59 |
+
|
60 |
+
protected function _getTurntoRating()
|
61 |
+
{
|
62 |
+
|
63 |
+
return Mage::getModel('turnto_admin/rating')
|
64 |
+
->getCollection()
|
65 |
+
->addFieldToFilter('product_id', $this->getProduct()->getId())
|
66 |
+
->getFirstItem();
|
67 |
+
|
68 |
+
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Turnto/Admin/Block/ShowTabsAdminBlock.php
CHANGED
@@ -1,49 +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 |
-
$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 |
}
|
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,126 +1,169 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Turnto_Admin_Helper_Data extends Mage_Core_Helper_Data
|
4 |
-
{
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
$active =
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
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 |
+
$feed_url = $this->getFeedUrl();
|
12 |
+
return $this->checkFeed($feed_url);
|
13 |
+
}
|
14 |
+
|
15 |
+
public function checkFeed($url = null)
|
16 |
+
{
|
17 |
+
|
18 |
+
if (!$url)
|
19 |
+
return null;
|
20 |
+
|
21 |
+
if (!$xml = simplexml_load_file($url)) {
|
22 |
+
|
23 |
+
$active = false;
|
24 |
+
} else {
|
25 |
+
$this->_feed = simplexml_load_file($url);
|
26 |
+
$active = true;
|
27 |
+
}
|
28 |
+
|
29 |
+
return $active;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getFeedUrl()
|
33 |
+
{
|
34 |
+
|
35 |
+
$url = Mage::getStoreConfig('turnto_admin/feedconfig/url');
|
36 |
+
$site_key = Mage::getStoreConfig('turnto_admin/feedconfig/site_key');
|
37 |
+
$site_auth = Mage::getStoreConfig('turnto_admin/feedconfig/site_auth');
|
38 |
+
|
39 |
+
if (!$url || !$site_key || !$site_auth)
|
40 |
+
return null;
|
41 |
+
|
42 |
+
$feed_url = rtrim($url, '/') . '/' . $site_key . '/' . $site_auth . '/turnto-skuaveragerating.xml';
|
43 |
+
//var_dump($feed_url);
|
44 |
+
|
45 |
+
return $feed_url;
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
public function loadRatings($url = null)
|
50 |
+
{
|
51 |
+
|
52 |
+
if (!$this->_feed) {
|
53 |
+
|
54 |
+
if (!$url)
|
55 |
+
$url = $this->getFeedUrl();
|
56 |
+
|
57 |
+
if (!$this->checkFeed($url))
|
58 |
+
return null;
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
$key_field = 'sku';
|
63 |
+
|
64 |
+
foreach ($this->_feed->products->product as $prod_rating) {
|
65 |
+
|
66 |
+
if (!$prod_rating[$key_field]) {
|
67 |
+
Mage::log('Product sku (id) is missing in the feed. Feed product record is invalid...', null, 'turnto_product_ratings.log');
|
68 |
+
continue;
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
$rating = Mage::getModel('turnto_admin/rating')
|
73 |
+
->getCollection()
|
74 |
+
// ->addFieldToFilter('product_id', $prod_rating[$key_field])
|
75 |
+
->addFieldToFilter($key_field, $prod_rating[$key_field])
|
76 |
+
->getFirstItem();
|
77 |
+
|
78 |
+
try {
|
79 |
+
|
80 |
+
|
81 |
+
# udpate bv_average_rating attribute
|
82 |
+
|
83 |
+
$bvProductExternalId = $prod_rating[$key_field];
|
84 |
+
|
85 |
+
$productAverageRating = (string)$prod_rating;
|
86 |
+
// echo $productAverageRating; echo '<br>';
|
87 |
+
$productReviewCount = $prod_rating['review_count'];
|
88 |
+
$productRatingRange = 5;
|
89 |
+
|
90 |
+
// $product = Bazaarvoice_Helper_Data::getProductFromProductExternalId($bvProductExternalId);
|
91 |
+
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $bvProductExternalId);
|
92 |
+
|
93 |
+
if ($product) {
|
94 |
+
|
95 |
+
$productAverageRating = (int)round($productAverageRating);
|
96 |
+
|
97 |
+
$attribute = Mage::getModel('catalog/product')->getResource()->getAttribute("bv_average_rating");
|
98 |
+
|
99 |
+
if ($attribute) {
|
100 |
+
|
101 |
+
$productAverageRating = $attribute->getSource()->getOptionId($productAverageRating);
|
102 |
+
$product->setBvAverageRating($productAverageRating);
|
103 |
+
$product->setBvReviewCount($productReviewCount);
|
104 |
+
$product->setBvRatingRange($productRatingRange);
|
105 |
+
$product->getResource()->saveAttribute($product, 'bv_average_rating');
|
106 |
+
$product->getResource()->saveAttribute($product, 'bv_review_count');
|
107 |
+
$product->getResource()->saveAttribute($product, 'bv_rating_range');
|
108 |
+
}
|
109 |
+
|
110 |
+
# save rating for tne product
|
111 |
+
if (!$rating->getCreatedAt())
|
112 |
+
$rating->setCreatedAt(Mage::getModel('core/date')->date('Y-m-d H:i:s'));
|
113 |
+
|
114 |
+
$rating->setSku($prod_rating[$key_field])
|
115 |
+
->setProductId($product->getId())
|
116 |
+
->setReviewCount($prod_rating['review_count'])
|
117 |
+
->setUpdatedAt(Mage::getModel('core/date')->date('Y-m-d H:i:s'))
|
118 |
+
->setRating((string)$prod_rating)
|
119 |
+
->save();
|
120 |
+
|
121 |
+
|
122 |
+
} else {
|
123 |
+
Mage::log('Could not find Magento product for xml file product id:' . $bvProductExternalId, null, 'turnto_product_ratings.log');
|
124 |
+
}
|
125 |
+
|
126 |
+
} catch (Exception $e) {
|
127 |
+
Mage::log('Error updating product rating for product id:' . $prod_rating[$key_field] . '. Error details:' . $e->getMessage(), null, 'turnto_product_ratings.log');
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
#cleanup turnto_product_ratings table
|
134 |
+
$resource = Mage::getSingleton('core/resource');
|
135 |
+
$write = $resource->getConnection('core_write');
|
136 |
+
|
137 |
+
$table_name = Mage::getConfig()->getTablePrefix() . 'turnto_products_ratings';
|
138 |
+
|
139 |
+
$sql = "DELETE FROM " . $table_name . " WHERE sku = ''";
|
140 |
+
|
141 |
+
try {
|
142 |
+
$result = $write->query($sql);
|
143 |
+
|
144 |
+
} catch (Exception $e) {
|
145 |
+
Mage::log('Error:' . $e->getMessage(), null, 'turnto_product_ratings.log');
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
public function getLastUpdated()
|
151 |
+
{
|
152 |
+
|
153 |
+
$updated = null;
|
154 |
+
|
155 |
+
$resource = Mage::getSingleton('core/resource');
|
156 |
+
$read = $resource->getConnection('core_read');
|
157 |
+
|
158 |
+
$query = "SELECT MAX(updated_at) as updated FROM " . Mage::getSingleton('core/resource')->getTableName('turnto_admin/rating');
|
159 |
+
|
160 |
+
$result = $read->fetchAll($query);
|
161 |
+
|
162 |
+
if ($result[0]['updated'])
|
163 |
+
$updated = $result[0]['updated'];
|
164 |
+
|
165 |
+
// var_dump($query); var_dump($result); exit;
|
166 |
+
|
167 |
+
return $updated;
|
168 |
+
}
|
169 |
}
|
app/code/community/Turnto/Admin/Model/Catalog/Product.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @category Turnto
|
5 |
+
* @package Turnto_Admin
|
6 |
+
* @copyright
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Catalog product model
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* @category Turnto
|
14 |
+
* @package Turnto_Admin
|
15 |
+
* @author nanowebgroup.com
|
16 |
+
*/
|
17 |
+
class Turnto_Admin_Model_Catalog_Product extends Mage_Catalog_Model_Product
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Returns rating summary
|
22 |
+
*
|
23 |
+
* @return mixed
|
24 |
+
*/
|
25 |
+
public function getRatingSummary()
|
26 |
+
{
|
27 |
+
|
28 |
+
$rating = Mage::getModel('turnto_admin/rating')
|
29 |
+
->getCollection()
|
30 |
+
->addFieldToFilter('product_id', $this->getId())
|
31 |
+
->getFirstItem();
|
32 |
+
|
33 |
+
// var_dump("prod id:".$this->getId()." review count:".$rating->getReviewCount());
|
34 |
+
|
35 |
+
if($rating->getReviewCount())
|
36 |
+
return true;
|
37 |
+
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
}
|
app/code/community/Turnto/Admin/Model/Observer.php
CHANGED
@@ -1,16 +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 |
}
|
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
CHANGED
@@ -1,9 +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 |
}
|
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
CHANGED
@@ -1,9 +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 |
}
|
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
CHANGED
@@ -1,9 +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 |
}
|
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/.IndexController.php.swo
DELETED
Binary file
|
app/code/community/Turnto/Admin/controllers/.VersionController.php.swo
DELETED
Binary file
|
app/code/community/Turnto/Admin/controllers/AdminControllers/TurntoController.php
CHANGED
@@ -1,259 +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 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 "Download historical feed" 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 "Download catalog feed" 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 |
-
}
|
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 "Download historical feed" 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 "Download catalog feed" 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
DELETED
@@ -1,227 +0,0 @@
|
|
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 "Download historical feed" 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 "Download catalog feed" 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,138 +1,156 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Turnto_Admin_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Admin_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
header('Content-type: text/plain; charset=utf-8');
|
8 |
+
try {
|
9 |
+
$resource = Mage::getSingleton('core/resource');
|
10 |
+
$readConnection = $resource->getConnection('core_read');
|
11 |
+
$params = $this->getRequest()->getParams();
|
12 |
+
$storeId = $params['storeId'];
|
13 |
+
$websiteId = $params['websiteId'];
|
14 |
+
$baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
15 |
+
$baseMediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';
|
16 |
+
if (!isset($storeId)) {
|
17 |
+
$storeId = 1;
|
18 |
+
}
|
19 |
+
$baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
20 |
+
$baseMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';
|
21 |
+
|
22 |
+
if (!isset($websiteId)) {
|
23 |
+
$websiteId = 1;
|
24 |
+
}
|
25 |
+
|
26 |
+
echo "SKU\tIMAGEURL\tTITLE\tPRICE\tCURRENCY\tACTIVE\tITEMURL\tCATEGORY\tKEYWORDS\tREPLACEMENTSKU\tINSTOCK\tVIRTUALPARENTCODE\tCATEGORYPATHJSON\tISCATEGORY";
|
27 |
+
echo "\n";
|
28 |
+
|
29 |
+
$pageSize = 1;
|
30 |
+
$ids = Mage::getModel('catalog/product')
|
31 |
+
->getCollection()
|
32 |
+
->addStoreFilter($storeId)
|
33 |
+
->addWebsiteFilter($websiteId)
|
34 |
+
->getAllIds();
|
35 |
+
$page = 1;
|
36 |
+
$pages = ceil(count($ids) / $pageSize);
|
37 |
+
do {
|
38 |
+
$collection = Mage::getModel('catalog/product')
|
39 |
+
->getCollection()
|
40 |
+
->addAttributeToSelect('*')
|
41 |
+
->addWebsiteFilter($websiteId)
|
42 |
+
->addStoreFilter($storeId)
|
43 |
+
->setPageSize($pageSize)
|
44 |
+
->setCurPage($page);
|
45 |
+
|
46 |
+
foreach ($collection as $product) {
|
47 |
+
$parents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
|
48 |
+
if (isset($parents[0])) {
|
49 |
+
// skip products with a parent
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
//SKU
|
53 |
+
echo $product->getSku();
|
54 |
+
echo "\t";
|
55 |
+
//echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );
|
56 |
+
// IMAGEURL
|
57 |
+
$imageUrl = null;
|
58 |
+
if ($product->getImage() != null && $product->getImage() != "no_selection") {
|
59 |
+
$imageUrl = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
|
60 |
+
} else if ($product->getSmallImage() != null && $product->getSmallImage() != "no_selection") {
|
61 |
+
$imageUrl = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getSmallImage());
|
62 |
+
} else if ($product->getThumbnail() != null && $product->getThumbnail() != "no_selection") {
|
63 |
+
$imageUrl = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getThumbnail());
|
64 |
+
}
|
65 |
+
if (!$imageUrl) {
|
66 |
+
echo $product->getImageUrl();
|
67 |
+
} else {
|
68 |
+
echo $imageUrl;
|
69 |
+
}
|
70 |
+
|
71 |
+
echo "\t";
|
72 |
+
//TITLE
|
73 |
+
echo $product->getName();
|
74 |
+
echo "\t";
|
75 |
+
//PRICE
|
76 |
+
echo $product->getPrice();
|
77 |
+
echo "\t";
|
78 |
+
//CURRENCY
|
79 |
+
echo "\t";
|
80 |
+
//ACTIVE
|
81 |
+
echo 'Y';
|
82 |
+
echo "\t";
|
83 |
+
//ITEMURL
|
84 |
+
echo $product->getProductUrl();
|
85 |
+
echo "\t";
|
86 |
+
//CATEGORY
|
87 |
+
$ids = $product->getCategoryIds();
|
88 |
+
echo(isset($ids[0]) ? $ids[0] : '');
|
89 |
+
echo "\t";
|
90 |
+
// KEYWORDS
|
91 |
+
echo "\t";
|
92 |
+
// REPLACEMENTSKU
|
93 |
+
echo "\t";
|
94 |
+
//VIRTUALPARENTCODE
|
95 |
+
echo "\t";
|
96 |
+
//CATEGORYPATHJSON
|
97 |
+
echo "\t";
|
98 |
+
//ISCATEGORY
|
99 |
+
echo "n";
|
100 |
+
echo "\n";
|
101 |
+
}
|
102 |
+
$page++;
|
103 |
+
$collection->clear();
|
104 |
+
} while ($page <= $pages);
|
105 |
+
|
106 |
+
$categories = Mage::getModel('catalog/category')->setStoreId($storeId)->getCollection()->addAttributeToSelect('*');
|
107 |
+
if ($categories) {
|
108 |
+
foreach ($categories as $category) {
|
109 |
+
if ($category->getId() == 1) {
|
110 |
+
continue;
|
111 |
+
}
|
112 |
+
$category->setStoreId($storeId);
|
113 |
+
echo $category->getId();
|
114 |
+
echo "\t";
|
115 |
+
//IMAGEURL
|
116 |
+
echo "\t";
|
117 |
+
//TITLE
|
118 |
+
echo $category->getName();
|
119 |
+
echo "\t";
|
120 |
+
//PRICE
|
121 |
+
echo "\t";
|
122 |
+
//CURRENCY
|
123 |
+
echo "\t";
|
124 |
+
//ACTIVE
|
125 |
+
echo "Y";
|
126 |
+
echo "\t";
|
127 |
+
//ITEMURL
|
128 |
+
echo $category->getUrl();
|
129 |
+
echo "\t";
|
130 |
+
//CATEGORY
|
131 |
+
echo $category->getParentCategory()->getId();
|
132 |
+
echo "\t";
|
133 |
+
//KEYWORDS
|
134 |
+
echo "\t";
|
135 |
+
//REPLACEMENTSKU
|
136 |
+
echo "\t";
|
137 |
+
//VIRTUALPARENTCODE
|
138 |
+
echo "\t";
|
139 |
+
//CATEGORYPATHJSON
|
140 |
+
echo "\t";
|
141 |
+
//ISCATEGORY
|
142 |
+
echo "Y";
|
143 |
+
echo "\n";
|
144 |
+
}
|
145 |
+
}
|
146 |
+
} catch (Exception $e) {
|
147 |
+
echo $e->getMessage();
|
148 |
+
}
|
149 |
+
|
150 |
+
return;
|
151 |
+
|
152 |
+
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
|
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,152 +1,157 @@
|
|
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 |
-
<
|
28 |
-
<
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
<
|
98 |
-
<title>
|
99 |
-
<action>samplerouter1/Turnto
|
100 |
-
<sort_order>
|
101 |
-
</
|
102 |
-
<
|
103 |
-
<title>
|
104 |
-
<action>samplerouter1/Turnto/redirect</action>
|
105 |
-
<sort_order>
|
106 |
-
</
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
</
|
|
|
|
|
|
|
|
|
|
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 |
+
<catalog>
|
28 |
+
<rewrite>
|
29 |
+
<product>Turnto_Admin_Model_Catalog_Product</product>
|
30 |
+
</rewrite>
|
31 |
+
</catalog>
|
32 |
+
<turnto_admin>
|
33 |
+
<class>Turnto_Admin_Model</class>
|
34 |
+
<resourceModel>turnto_admin_resource</resourceModel>
|
35 |
+
</turnto_admin>
|
36 |
+
<turnto_admin_resource>
|
37 |
+
<class>Turnto_Admin_Model_Resource</class>
|
38 |
+
<entities>
|
39 |
+
<rating>
|
40 |
+
<table>turnto_products_ratings</table>
|
41 |
+
</rating>
|
42 |
+
</entities>
|
43 |
+
</turnto_admin_resource>
|
44 |
+
</models>
|
45 |
+
<resources>
|
46 |
+
<turnto_admin_setup>
|
47 |
+
<setup>
|
48 |
+
<module>Turnto_Admin</module>
|
49 |
+
</setup>
|
50 |
+
</turnto_admin_setup>
|
51 |
+
</resources>
|
52 |
+
</global>
|
53 |
+
|
54 |
+
<frontend>
|
55 |
+
<routers>
|
56 |
+
<turntocatfeed>
|
57 |
+
<use>standard</use>
|
58 |
+
<args>
|
59 |
+
<module>Turnto_Admin</module>
|
60 |
+
<frontName>turntocatalogfeed</frontName>
|
61 |
+
</args>
|
62 |
+
</turntocatfeed>
|
63 |
+
<turntoversion>
|
64 |
+
<use>standard</use>
|
65 |
+
<args>
|
66 |
+
<module>Turnto_Admin</module>
|
67 |
+
<frontName>turnto</frontName>
|
68 |
+
</args>
|
69 |
+
</turntoversion>
|
70 |
+
</routers>
|
71 |
+
</frontend>
|
72 |
+
|
73 |
+
<admin>
|
74 |
+
<routers>
|
75 |
+
<samplerouter1>
|
76 |
+
<use>admin</use>
|
77 |
+
<args>
|
78 |
+
<module>Turnto_Admin_AdminControllers</module>
|
79 |
+
<frontName>adminturnto</frontName>
|
80 |
+
|
81 |
+
<modules>
|
82 |
+
<sintax after="Turnto_Admin_AdminControllers">Mage_Adminhtml</sintax>
|
83 |
+
</modules>
|
84 |
+
</args>
|
85 |
+
</samplerouter1>
|
86 |
+
</routers>
|
87 |
+
</admin>
|
88 |
+
|
89 |
+
<adminhtml>
|
90 |
+
<menu>
|
91 |
+
<menu1 translate="title" module="adminhelper1">
|
92 |
+
<title>TurnTo</title>
|
93 |
+
<sort_order>200</sort_order>
|
94 |
+
<children>
|
95 |
+
<!-- Note the misleading "module" attribute.
|
96 |
+
It actualy refers to one of the declared helpers -->
|
97 |
+
<item1 translate="title" module="adminhelper1">
|
98 |
+
<title>Integration</title>
|
99 |
+
<action>samplerouter1/Turnto</action>
|
100 |
+
<sort_order>1</sort_order>
|
101 |
+
</item1>
|
102 |
+
<item2 translate="title" module="adminhelper1">
|
103 |
+
<title>Moderation</title>
|
104 |
+
<action>samplerouter1/Turnto/redirect</action>
|
105 |
+
<sort_order>2</sort_order>
|
106 |
+
</item2>
|
107 |
+
<item3 translate="title" module="adminhelper1">
|
108 |
+
<title>Reporting</title>
|
109 |
+
<action>samplerouter1/Turnto/redirect</action>
|
110 |
+
<sort_order>3</sort_order>
|
111 |
+
</item3>
|
112 |
+
</children>
|
113 |
+
</menu1>
|
114 |
+
</menu>
|
115 |
+
<acl>
|
116 |
+
<resources>
|
117 |
+
<all>
|
118 |
+
<title>Allow Everything</title>
|
119 |
+
</all>
|
120 |
+
<admin>
|
121 |
+
<children>
|
122 |
+
<system>
|
123 |
+
<children>
|
124 |
+
<config>
|
125 |
+
<children>
|
126 |
+
<turnto_admin>
|
127 |
+
<title>Turnto Products Ratings</title>
|
128 |
+
</turnto_admin>
|
129 |
+
</children>
|
130 |
+
</config>
|
131 |
+
</children>
|
132 |
+
</system>
|
133 |
+
</children>
|
134 |
+
</admin>
|
135 |
+
</resources>
|
136 |
+
</acl>
|
137 |
+
</adminhtml>
|
138 |
+
<default>
|
139 |
+
<turnto_admin>
|
140 |
+
<feedconfig>
|
141 |
+
<url>http://static.www.turnto.com/static/export/</url>
|
142 |
+
</feedconfig>
|
143 |
+
</turnto_admin>
|
144 |
+
</default>
|
145 |
+
<crontab>
|
146 |
+
<jobs>
|
147 |
+
<turnto_products_ratings>
|
148 |
+
<schedule>
|
149 |
+
<cron_expr>0 4 * * *</cron_expr>
|
150 |
+
</schedule>
|
151 |
+
<run>
|
152 |
+
<model>turnto_admin/observer::getProductsRatingsFeed</model>
|
153 |
+
</run>
|
154 |
+
</turnto_products_ratings>
|
155 |
+
</jobs>
|
156 |
+
</crontab>
|
157 |
+
</config>
|
app/code/community/Turnto/Admin/etc/system.xml
CHANGED
@@ -1,87 +1,88 @@
|
|
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>
|
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 |
-
|
70 |
-
|
71 |
-
<
|
72 |
-
<
|
73 |
-
<
|
74 |
-
<
|
75 |
-
<
|
76 |
-
<
|
77 |
-
<
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
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>261</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 |
+
<!--
|
70 |
+
<enabled translate="label">
|
71 |
+
<label>Show Turnto Products Ratings</label>
|
72 |
+
<frontend_type>select</frontend_type>
|
73 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
74 |
+
<sort_order>40</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
<comment>When set to Yes, Turnto products ratings will be shown.</comment>
|
79 |
+
</enabled>
|
80 |
+
-->
|
81 |
+
</fields>
|
82 |
+
</feedconfig>
|
83 |
+
|
84 |
+
</groups>
|
85 |
+
|
86 |
+
</turnto_admin>
|
87 |
+
</sections>
|
88 |
+
</config>
|
app/code/community/Turnto/Admin/sql/turnto_admin_setup/mysql4-install-2.2.0.php
CHANGED
@@ -1,44 +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();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$table = $installer->getConnection()
|
8 |
+
->newTable($installer->getTable('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
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
?>
|
5 |
-
<div style="margin-left:215px;">
|
6 |
-
|
7 |
-
<p style="margin-bottom:0; color:green;"><b
|
8 |
-
|
9 |
-
<p style="margin-bottom:0; color:red;"><b
|
10 |
-
|
11 |
-
|
12 |
-
</div>
|
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"> </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"> </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'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'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
CHANGED
@@ -1,47 +1,49 @@
|
|
1 |
-
<h4>Product Ratings Feed</h4>
|
2 |
-
<p style="margin-top:10px;width:600px">
|
3 |
-
|
4 |
-
|
5 |
-
|
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
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 this text, 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 |
+
<!--<a href="<?php //echo $this->getBaseUrl().'admin/system_config/edit/section/turnto_admin/ ?>" alt="Products Ratings Feed Configuration">here</a>-->
|
42 |
+
<input id="submit" name="submit" value="Configure" type="submit" /></td>
|
43 |
+
</form>
|
44 |
+
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
|
48 |
+
<br /><br />
|
49 |
+
</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>« </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>« </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.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.turntonetworks.com/terms-of-use">TurnTo Networks</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,12 @@
|
|
14 |
2.1 Re-wrote catalog feed generator
|
15 |
2.1.6 - Better catalog support in catalog feed generator.
|
16 |
2.2.0 - Support for sku average rating feed
|
17 |
-
2.2.
|
|
|
18 |
<authors><author><name>TurnTo</name><user>TurnTo</user><email>contact@turnto.com</email></author></authors>
|
19 |
-
<date>2015-
|
20 |
-
<time>
|
21 |
-
<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="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>socialcommerce_suite_by_turnto</name>
|
4 |
+
<version>2.2.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.turntonetworks.com/terms-of-use">TurnTo Networks</license>
|
7 |
<channel>community</channel>
|
14 |
2.1 Re-wrote catalog feed generator
|
15 |
2.1.6 - Better catalog support in catalog feed generator.
|
16 |
2.2.0 - Support for sku average rating feed
|
17 |
+
2.2.2 - Minor bug fix
|
18 |
+
2.2.5 - Catalog Feed tweaks</notes>
|
19 |
<authors><author><name>TurnTo</name><user>TurnTo</user><email>contact@turnto.com</email></author></authors>
|
20 |
+
<date>2015-09-25</date>
|
21 |
+
<time>12:48:30</time>
|
22 |
+
<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="84d005b13b3e39da048078bfc275bdf5"/></dir></dir></dir><file name="CatalogFeed.php" hash="f974cfdc687bf5edb3fdccb879547200"/><file name="HistoricalFeed.php" hash="a4d2b29c6d8bb2ed59aa884e02abc23b"/><file name="Overview.php" hash="51c8ed09153f1dc3b3d02aa0ab83f195"/><file name="RatingsFeed.php" hash="264cf15842c2738f1b77bce6ff9b9f0a"/><dir name="Review"><file name="Helper.php" hash="2ecc1a9252af9d40666b4f3a6603b522"/></dir><file name="ShowTabsAdminBlock.php" hash="403c3a8f95c65e361471b28fae25d2e3"/></dir><dir name="Helper"><file name="Data.php" hash="a21f9a4fa19aead436b4ad9e6b6351bf"/></dir><dir name="Model"><dir name="Catalog"><file name="Product.php" hash="5325442b4449b7eb75547f50698400a6"/></dir><file name="Observer.php" hash="50d0a3ff030e0a20cd080003891aa167"/><file name="Rating.php" hash="2f3d43beb74018b394d7bf6ba1098e5c"/><dir name="Resource"><dir name="Rating"><file name="Collection.php" hash="2f0709f0f5f3bde0725c2db266f16e7d"/></dir><file name="Rating.php" hash="0a7f9415ba76c6e121e0f3281479a4df"/></dir></dir><dir name="controllers"><dir name="AdminControllers"><file name="TurntoController.php" hash="ac9bfc16fe6ea6bf25bcf8ae18b28829"/></dir><file name="IndexController.php" hash="cdcaf77ff9a7cfc22f9645615b3a6a4b"/><file name="VersionController.php" hash="60fb4a7d588c728166d11b5808cf2099"/></dir><dir name="etc"><file name="config.xml" hash="8f27cb0fd9aec8cf56210c2481e06fc0"/><file name="system.xml" hash="fa128936c177c3a09ea1df2951f4de64"/></dir><dir name="sql"><dir name="turnto_admin_setup"><file name="mysql4-install-2.2.0.php" hash="747fc729ae7587b41c3f3cce62aba82b"/></dir></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"><dir name="adminhtml"><dir name="system"><dir name="config"><file name="feed.phtml" hash="c4b453ab154a34408bc34021630653bf"/></dir></dir></dir><file name="catalog_feed_tab.phtml" hash="c7623db3227221f10a32de69322bead9"/><file name="historical_feed_tab.phtml" hash="510bee39f490fe289e28e796ba0d43f2"/><file name="overview.phtml" hash="4cc20b32c3b0cd36cd349f0be44e4615"/><file name="product_ratings_feed_tab.phtml" hash="8404547e452f382c2ec02cef4c7d71b4"/></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>
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
25 |
</package>
|