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.4 - Fixed excessive load time on configuration screen.
2.2.5 - Catalog Feed tweaks
2.2.7 - Support for Magento Security Patch (SUPEE-6788)
2.2.9 - Historical Feed bug fix
2.2.10 - Minor bug fix for historical feed exporter
2.2.11 - Fixed circular reference in category tree. Optimized memory usage in catalog feed generator.
2.3.0 - Added ability to push the historical feed nightly
3.0 - Refactored all code into blocks that can easily be added to templates. Almost all TurnTo functionality can now be easily configured from the Magento Admin Panel Configuration page.
3.0.1 - Minor bug fixes
3.0.2 - Minor bug fixes
3.0.3 - Allow users to deselect GTINs
3.0.4 - Allow users to configure attribute used as brand
3.0.5 - Fixed security warning on checkout success page caused by using http instead of https
Release Info
Developer | TurnTo Networks |
Extension | socialcommerce_suite_by_turnto |
Version | 3.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 3.0.5
- app/code/community/Turnto/Admin/Block/Adminhtml/System/Config/Setuptype.php +17 -0
- app/code/community/Turnto/Admin/controllers/IndexController.php +1 -1
- app/code/community/Turnto/Admin/etc/config.xml +84 -1
- app/code/community/Turnto/Admin/etc/system.xml +190 -0
- app/code/community/Turnto/Client/Block/Qacontent.php +45 -0
- app/code/community/Turnto/Client/Block/Qateaser.php +30 -0
- app/code/community/Turnto/Client/Block/Reviewscontent.php +46 -0
- app/code/community/Turnto/Client/Block/Reviewsteaser.php +30 -0
- app/code/community/Turnto/Client/Helper/Data.php +76 -0
- app/code/community/Turnto/Client/etc/config.xml +35 -0
- app/code/community/Turnto/Login/controllers/IndexController.php +46 -45
- app/code/community/Turnto/Login/etc/config.xml +1 -1
- app/code/community/Turnto/Mobile/Block/Landing.php +11 -0
- app/code/community/Turnto/Mobile/Helper/Data.php +33 -0
- app/code/community/Turnto/Mobile/controllers/IndexController.php +12 -0
- app/code/community/Turnto/Mobile/etc/config.xml +41 -0
- app/design/frontend/base/default/layout/turnto_client.xml +26 -0
- app/design/frontend/base/default/layout/turnto_mobile.xml +18 -0
- app/design/frontend/base/default/template/turnto/client/checkout.tra_js.phtml +50 -0
- app/design/frontend/base/default/template/turnto/client/qa.phtml +2 -0
- app/design/frontend/base/default/template/turnto/client/qa.teaser.phtml +1 -0
- app/design/frontend/base/default/template/turnto/client/reviews.phtml +2 -0
- app/design/frontend/base/default/template/turnto/client/reviews.teaser.phtml +1 -0
- app/design/frontend/base/default/template/turnto/client/tra_js.phtml +43 -0
- app/design/frontend/base/default/template/turnto/mobile/landing.phtml +27 -0
- app/etc/modules/Turnto_Client.xml +13 -0
- app/etc/modules/Turnto_Mobile.xml +10 -0
- package.xml +7 -5
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Admin_Block_Adminhtml_System_Config_Setuptype
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
public function toOptionArray() {
|
11 |
+
return array(
|
12 |
+
array('value' => 'overlay', 'label' => Mage::helper('adminhtml')->__('Overlay')),
|
13 |
+
array('value' => 'dynamicEmbed', 'label' => Mage::helper('adminhtml')->__('Dynamic Embed')),
|
14 |
+
array('value' => 'staticEmbed', 'label' => Mage::helper('adminhtml')->__('Static Embed')),
|
15 |
+
);
|
16 |
+
}
|
17 |
+
}
|
@@ -180,7 +180,7 @@ class Turnto_Admin_IndexController extends Mage_Core_Controller_Front_Action
|
|
180 |
if (!$attributeText) {
|
181 |
$attributeText = $product->getData($code);
|
182 |
}
|
183 |
-
if ($attributeText != null) {
|
184 |
return $attributeText;
|
185 |
}
|
186 |
}
|
180 |
if (!$attributeText) {
|
181 |
$attributeText = $product->getData($code);
|
182 |
}
|
183 |
+
if ($attributeText != null && strcasecmp($attributeText, 'NULL') != 0) {
|
184 |
return $attributeText;
|
185 |
}
|
186 |
}
|
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Turnto_Admin>
|
6 |
-
<version>
|
7 |
</Turnto_Admin>
|
8 |
</modules>
|
9 |
|
@@ -141,6 +141,10 @@
|
|
141 |
<general>
|
142 |
<static_url>http://static.www.turnto.com</static_url>
|
143 |
<url>http://www.turnto.com</url>
|
|
|
|
|
|
|
|
|
144 |
<upc_attribute nil="true"/>
|
145 |
<mpn_attribute nil="true"/>
|
146 |
<isbn_attribute nil="true"/>
|
@@ -149,6 +153,85 @@
|
|
149 |
<asin_attribute nil="true"/>
|
150 |
<brand_attribute nil="true"/>
|
151 |
</general>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
</turnto_admin>
|
153 |
</default>
|
154 |
<crontab>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Turnto_Admin>
|
6 |
+
<version>3.0.5</version>
|
7 |
</Turnto_Admin>
|
8 |
</modules>
|
9 |
|
141 |
<general>
|
142 |
<static_url>http://static.www.turnto.com</static_url>
|
143 |
<url>http://www.turnto.com</url>
|
144 |
+
<image_store_base>wac.edgecastcdn.net/001A39/prod</image_store_base>
|
145 |
+
<static_cache_time>900</static_cache_time>
|
146 |
+
<teaser_cache_time>900</teaser_cache_time>
|
147 |
+
<version>4.3</version>
|
148 |
<upc_attribute nil="true"/>
|
149 |
<mpn_attribute nil="true"/>
|
150 |
<isbn_attribute nil="true"/>
|
153 |
<asin_attribute nil="true"/>
|
154 |
<brand_attribute nil="true"/>
|
155 |
</general>
|
156 |
+
<checkoutcomments>
|
157 |
+
<checkoutcomments_enabled>1</checkoutcomments_enabled>
|
158 |
+
</checkoutcomments>
|
159 |
+
<qa>
|
160 |
+
<qa_setup_type>overlay</qa_setup_type>
|
161 |
+
<qa_teaser_custom_enabled>1</qa_teaser_custom_enabled>
|
162 |
+
<qa_teaser_custom><![CDATA[
|
163 |
+
<script type="text/javascript">
|
164 |
+
/**
|
165 |
+
*
|
166 |
+
* This is a way to implement a teaser function that returns the html of the actual teaser.
|
167 |
+
* This is called with the parameter TurnToItemData, which contains the item counts.
|
168 |
+
* The clicks are calling clickQaTabFromTeaser() in this example.
|
169 |
+
*
|
170 |
+
*/
|
171 |
+
function itemTeaserDisplay(data) {
|
172 |
+
var iteaserhtml = '<h2>Get FAST answers from customers</h2><a class="TurntoItemTeaserClick" href="javascript:clickQaTabFromTeaser()">Ask a Question</a>';
|
173 |
+
iteaserhtml += '<div id="TT2ILTcount-line">';
|
174 |
+
if (data.counts.q > 0 || data.counts.a > 0) {
|
175 |
+
iteaserhtml += '<p><a class="TurntoItemTeaserClick TurnToIteaSee" href="javascript:clickQaTabFromTeaser()">See ';
|
176 |
+
if (data.counts.q > 0) {
|
177 |
+
iteaserhtml += '<strong>' + data.counts.q + '</strong>' + (data.counts.q > 1 ? ' questions' : ' question');
|
178 |
+
}
|
179 |
+
if (data.counts.a > 0) {
|
180 |
+
iteaserhtml += ' <strong>' + data.counts.a + '</strong>' + (data.counts.a > 1 ? ' answers' : ' answer');
|
181 |
+
}
|
182 |
+
iteaserhtml += '</a></p>';
|
183 |
+
}
|
184 |
+
iteaserhtml += '</div>';
|
185 |
+
return iteaserhtml;
|
186 |
+
}
|
187 |
+
|
188 |
+
// todo: this should handle opening the tab if Q&A is under a tab.
|
189 |
+
function clickQaTabFromTeaser() {
|
190 |
+
var qa = TurnTojQuery('#TurnToContent')
|
191 |
+
window.scrollTo(0,qa.offset().top);
|
192 |
+
}
|
193 |
+
</script>
|
194 |
+
]]></qa_teaser_custom>
|
195 |
+
<qa_teaser_custom_function_name>itemTeaserDisplay</qa_teaser_custom_function_name>
|
196 |
+
</qa>
|
197 |
+
<reviews>
|
198 |
+
<reviews_setup_type>overlay</reviews_setup_type>
|
199 |
+
<reviews_teaser_custom_enabled>1</reviews_teaser_custom_enabled>
|
200 |
+
<reviews_teaser_custom><![CDATA[
|
201 |
+
<script type="text/javascript">
|
202 |
+
/**
|
203 |
+
*
|
204 |
+
*
|
205 |
+
*/
|
206 |
+
function reviewsItemTeaserDisplay(clazz, data) {
|
207 |
+
var clazzNam = clazz || "TurnToReviewsTeaser";
|
208 |
+
|
209 |
+
var iteasers = TurnTojQuery("." + clazzNam);
|
210 |
+
|
211 |
+
// round the average rating to the nearest tenth
|
212 |
+
var rating = Math.round((TurnToItemData.counts.ar + 0.25) * 100.0) / 100.0;
|
213 |
+
rating = rating.toString();
|
214 |
+
var decimal = parseInt(rating.substring(2, 3))
|
215 |
+
rating = rating.substring(0, 1) + "-" + (decimal >= 5 ? '5' : '0')
|
216 |
+
|
217 |
+
iteasers.html(TurnToHTML.reviewTeaser({rating: rating}));
|
218 |
+
|
219 |
+
//if in multi-sku page, TurnToItemData.sku is defined
|
220 |
+
var teaserSku = TurnToItemData.sku;
|
221 |
+
|
222 |
+
iteasers.find('.TTreadReviews').click(function() {clickReviewsTabFromTeaser();});
|
223 |
+
iteasers.find('.TTwriteReview').click(function(){clickReviewsTabFromTeaser();TurnTo.writeReview();});
|
224 |
+
}
|
225 |
+
|
226 |
+
// todo: this should handle opening the tab if reviews are under a tab AND scrolling to the content
|
227 |
+
function clickReviewsTabFromTeaser() {
|
228 |
+
var rev = TurnTojQuery('#TurnToReviewsContent')
|
229 |
+
window.scrollTo(0,rev.offset().top);
|
230 |
+
}
|
231 |
+
</script>
|
232 |
+
]]></reviews_teaser_custom>
|
233 |
+
<reviews_teaser_custom_function_name>reviewsItemTeaserDisplay</reviews_teaser_custom_function_name>
|
234 |
+
</reviews>
|
235 |
</turnto_admin>
|
236 |
</default>
|
237 |
<crontab>
|
@@ -49,6 +49,16 @@
|
|
49 |
<show_in_store>1</show_in_store>
|
50 |
<validate>required-entry</validate>
|
51 |
</site_auth>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<static_url>
|
53 |
<label>Static URL</label>
|
54 |
<frontend_type>text</frontend_type>
|
@@ -69,6 +79,40 @@
|
|
69 |
<validate>required-entry</validate>
|
70 |
<comment>Default is http://www.turnto.com. Should not ever be changed, unless instructed by TurnTo.</comment>
|
71 |
</url>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
<!-- UPC -->
|
73 |
<upc_attribute>
|
74 |
<label>UPC Attribute</label>
|
@@ -141,6 +185,152 @@
|
|
141 |
</brand_attribute>
|
142 |
</fields>
|
143 |
</general>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
<feedconfig translate="label" >
|
145 |
<label>Turnto Feed Configuration</label>
|
146 |
<frontend_type>text</frontend_type>
|
49 |
<show_in_store>1</show_in_store>
|
50 |
<validate>required-entry</validate>
|
51 |
</site_auth>
|
52 |
+
<version>
|
53 |
+
<label>Version</label>
|
54 |
+
<frontend_type>text</frontend_type>
|
55 |
+
<sort_order>35</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
<validate>required-entry</validate>
|
60 |
+
<comment>TurnTo version. Default is 4.3. Should be in the (major).(minor) form. Examples: 4.0, 4.1, 4.2, etc...</comment>
|
61 |
+
</version>
|
62 |
<static_url>
|
63 |
<label>Static URL</label>
|
64 |
<frontend_type>text</frontend_type>
|
79 |
<validate>required-entry</validate>
|
80 |
<comment>Default is http://www.turnto.com. Should not ever be changed, unless instructed by TurnTo.</comment>
|
81 |
</url>
|
82 |
+
<image_store_base>
|
83 |
+
<label>Image Store Base</label>
|
84 |
+
<frontend_type>text</frontend_type>
|
85 |
+
<sort_order>60</sort_order>
|
86 |
+
<show_in_default>1</show_in_default>
|
87 |
+
<show_in_website>1</show_in_website>
|
88 |
+
<show_in_store>1</show_in_store>
|
89 |
+
<validate>required-entry</validate>
|
90 |
+
<comment>Default is wac.edgecastcdn.net/001A39/prod. Should not ever be changed, unless instructed by TurnTo.</comment>
|
91 |
+
</image_store_base>
|
92 |
+
<static_cache_time>
|
93 |
+
<label>Static Content Cache Time</label>
|
94 |
+
<frontend_type>text</frontend_type>
|
95 |
+
<validate>validate-number</validate>
|
96 |
+
<sort_order>90</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>1</show_in_store>
|
100 |
+
<comment>This setting only applies when using a Setup Type of Static Embed. Value is in
|
101 |
+
seconds. Default is 900 (15 minutes).
|
102 |
+
</comment>
|
103 |
+
</static_cache_time>
|
104 |
+
<teaser_cache_time>
|
105 |
+
<label>Teaser Cache Time</label>
|
106 |
+
<frontend_type>text</frontend_type>
|
107 |
+
<validate>validate-number</validate>
|
108 |
+
<sort_order>100</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>1</show_in_store>
|
112 |
+
<comment>The amount of time to cache the TurnTo teasers. Value is in seconds. Default is 900
|
113 |
+
(15 minutes)
|
114 |
+
</comment>
|
115 |
+
</teaser_cache_time>
|
116 |
<!-- UPC -->
|
117 |
<upc_attribute>
|
118 |
<label>UPC Attribute</label>
|
185 |
</brand_attribute>
|
186 |
</fields>
|
187 |
</general>
|
188 |
+
<checkoutcomments>
|
189 |
+
<label>TurnTo Checkout Comments Configuration</label>
|
190 |
+
<frontend_type>text</frontend_type>
|
191 |
+
<sort_order>2</sort_order>
|
192 |
+
<show_in_default>1</show_in_default>
|
193 |
+
<show_in_website>1</show_in_website>
|
194 |
+
<show_in_store>1</show_in_store>
|
195 |
+
<expanded>1</expanded>
|
196 |
+
<fields>
|
197 |
+
<checkoutcomments_enabled>
|
198 |
+
<label>Enabled Checkout Comments</label>
|
199 |
+
<frontend_type>select</frontend_type>
|
200 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
201 |
+
<sort_order>1</sort_order>
|
202 |
+
<show_in_default>1</show_in_default>
|
203 |
+
<show_in_website>1</show_in_website>
|
204 |
+
<show_in_store>1</show_in_store>
|
205 |
+
</checkoutcomments_enabled>
|
206 |
+
</fields>
|
207 |
+
</checkoutcomments>
|
208 |
+
<qa>
|
209 |
+
<label>TurnTo Q&A Configuration</label>
|
210 |
+
<frontend_type>text</frontend_type>
|
211 |
+
<sort_order>3</sort_order>
|
212 |
+
<show_in_default>1</show_in_default>
|
213 |
+
<show_in_website>1</show_in_website>
|
214 |
+
<show_in_store>1</show_in_store>
|
215 |
+
<expanded>1</expanded>
|
216 |
+
<fields>
|
217 |
+
<qa_setup_type>
|
218 |
+
<label>Q&A Setup Type</label>
|
219 |
+
<frontend_type>select</frontend_type>
|
220 |
+
<source_model>Turnto_Admin_Block_Adminhtml_System_Config_Setuptype</source_model>
|
221 |
+
<sort_order>80</sort_order>
|
222 |
+
<show_in_default>1</show_in_default>
|
223 |
+
<show_in_website>1</show_in_website>
|
224 |
+
<show_in_store>1</show_in_store>
|
225 |
+
</qa_setup_type>
|
226 |
+
<qa_teaser_custom_enabled>
|
227 |
+
<label>Use Custom Q&A Teaser</label>
|
228 |
+
<frontend_type>select</frontend_type>
|
229 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
230 |
+
<sort_order>105</sort_order>
|
231 |
+
<show_in_default>1</show_in_default>
|
232 |
+
<show_in_website>1</show_in_website>
|
233 |
+
<show_in_store>1</show_in_store>
|
234 |
+
</qa_teaser_custom_enabled>
|
235 |
+
<qa_teaser_custom translate="label comment">
|
236 |
+
<label>Custom Q&A teaser function definition</label>
|
237 |
+
<comment>
|
238 |
+
<![CDATA[Place custom javascript here to be used as the custom Q&A teaser function. Should be surrounded in a <script> tag]]></comment>
|
239 |
+
<frontend_type>textarea</frontend_type>
|
240 |
+
<sort_order>110</sort_order>
|
241 |
+
<show_in_default>1</show_in_default>
|
242 |
+
<show_in_website>1</show_in_website>
|
243 |
+
<show_in_store>1</show_in_store>
|
244 |
+
<depends>
|
245 |
+
<qa_teaser_custom_enabled>1</qa_teaser_custom_enabled>
|
246 |
+
</depends>
|
247 |
+
</qa_teaser_custom>
|
248 |
+
<qa_teaser_custom_function_name>
|
249 |
+
<label>Custom Q&A teaser function name</label>
|
250 |
+
<comment>The name of the function defined in the "Custom Q&A teaser function code"
|
251 |
+
field
|
252 |
+
</comment>
|
253 |
+
<frontend_type>text</frontend_type>
|
254 |
+
<sort_order>120</sort_order>
|
255 |
+
<show_in_default>1</show_in_default>
|
256 |
+
<show_in_website>1</show_in_website>
|
257 |
+
<show_in_store>1</show_in_store>
|
258 |
+
<depends>
|
259 |
+
<qa_teaser_custom_enabled>1</qa_teaser_custom_enabled>
|
260 |
+
</depends>
|
261 |
+
</qa_teaser_custom_function_name>
|
262 |
+
</fields>
|
263 |
+
</qa>
|
264 |
+
<reviews>
|
265 |
+
<label>Turnto Reviews Configuration</label>
|
266 |
+
<frontend_type>text</frontend_type>
|
267 |
+
<sort_order>4</sort_order>
|
268 |
+
<show_in_default>1</show_in_default>
|
269 |
+
<show_in_website>1</show_in_website>
|
270 |
+
<show_in_store>1</show_in_store>
|
271 |
+
<expanded>1</expanded>
|
272 |
+
<fields>
|
273 |
+
<reviews_setup_type>
|
274 |
+
<label>Reviews Setup Type</label>
|
275 |
+
<frontend_type>select</frontend_type>
|
276 |
+
<source_model>Turnto_Admin_Block_Adminhtml_System_Config_Setuptype</source_model>
|
277 |
+
<sort_order>10</sort_order>
|
278 |
+
<show_in_default>1</show_in_default>
|
279 |
+
<show_in_website>1</show_in_website>
|
280 |
+
<show_in_store>1</show_in_store>
|
281 |
+
</reviews_setup_type>
|
282 |
+
<reviews_teaser_custom_enabled>
|
283 |
+
<label>Use Custom Reviews Teaser</label>
|
284 |
+
<frontend_type>select</frontend_type>
|
285 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
286 |
+
<sort_order>125</sort_order>
|
287 |
+
<show_in_default>1</show_in_default>
|
288 |
+
<show_in_website>1</show_in_website>
|
289 |
+
<show_in_store>1</show_in_store>
|
290 |
+
</reviews_teaser_custom_enabled>
|
291 |
+
<reviews_teaser_custom translate="label comment">
|
292 |
+
<label>Custom reviews teaser function definition</label>
|
293 |
+
<comment><![CDATA[Place custom javascript here to be used as the custom Reviews teaser function. Should be surrounded in a <script> tag]]></comment>
|
294 |
+
<frontend_type>textarea</frontend_type>
|
295 |
+
<sort_order>130</sort_order>
|
296 |
+
<show_in_default>1</show_in_default>
|
297 |
+
<show_in_website>1</show_in_website>
|
298 |
+
<show_in_store>1</show_in_store>
|
299 |
+
<depends><reviews_teaser_custom_enabled>1</reviews_teaser_custom_enabled></depends>
|
300 |
+
</reviews_teaser_custom>
|
301 |
+
<reviews_teaser_custom_function_name>
|
302 |
+
<label>Custom Reviews teaser function name</label>
|
303 |
+
<comment>The name of the function defined in the "Custom reviews teaser function definition" field</comment>
|
304 |
+
<frontend_type>text</frontend_type>
|
305 |
+
<sort_order>140</sort_order>
|
306 |
+
<show_in_default>1</show_in_default>
|
307 |
+
<show_in_website>1</show_in_website>
|
308 |
+
<show_in_store>1</show_in_store>
|
309 |
+
<depends><reviews_teaser_custom_enabled>1</reviews_teaser_custom_enabled></depends>
|
310 |
+
</reviews_teaser_custom_function_name>
|
311 |
+
</fields>
|
312 |
+
</reviews>
|
313 |
+
<mobileconfig>
|
314 |
+
<label>Turnto Mobile Configuration</label>
|
315 |
+
<comment><![CDATA[The default mobile landing page URL is <baseurl>/turntomobile]]></comment>
|
316 |
+
<frontend_type>text</frontend_type>
|
317 |
+
<sort_order>10</sort_order>
|
318 |
+
<show_in_default>1</show_in_default>
|
319 |
+
<show_in_website>1</show_in_website>
|
320 |
+
<show_in_store>1</show_in_store>
|
321 |
+
<expanded>1</expanded>
|
322 |
+
<fields>
|
323 |
+
<title translate="label">
|
324 |
+
<label>Mobile Landing Page Title</label>
|
325 |
+
<frontend_type>text</frontend_type>
|
326 |
+
<sort_order>10</sort_order>
|
327 |
+
<show_in_default>1</show_in_default>
|
328 |
+
<show_in_website>1</show_in_website>
|
329 |
+
<show_in_store>1</show_in_store>
|
330 |
+
<validate>required-entry</validate>
|
331 |
+
</title>
|
332 |
+
</fields>
|
333 |
+
</mobileconfig>
|
334 |
<feedconfig translate="label" >
|
335 |
<label>Turnto Feed Configuration</label>
|
336 |
<frontend_type>text</frontend_type>
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Client_Block_Qacontent extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
const TURNTO_QA_STATIC_CACHE_TAG = 'TURNTO_QA_STATIC_CACHE_TAG';
|
6 |
+
const TURNTO_QA_STATIC_CACHE_KEY = 'TURNTO_QA_STATIC_CACHE_KEY';
|
7 |
+
|
8 |
+
const TURNTO_STATIC_EMBED = 'staticEmbed';
|
9 |
+
const TURNTO_DYNAMIC_EMBED = 'dynamicEmbed';
|
10 |
+
|
11 |
+
public function __construct()
|
12 |
+
{
|
13 |
+
$helper = Mage::helper('turnto_client_helper/data');
|
14 |
+
//parent::construct();
|
15 |
+
$this->addData(array(
|
16 |
+
// defaults to 15 minutes
|
17 |
+
'cache_lifetime' => Mage::getStoreConfig('turnto_admin/general/static_cache_time') ? intval(Mage::getStoreConfig('turnto_admin/general/static_cache_time')) : 900,
|
18 |
+
'cache_tags' => array(
|
19 |
+
$this::TURNTO_QA_STATIC_CACHE_TAG,
|
20 |
+
Mage_Catalog_Model_Product::CACHE_TAG,
|
21 |
+
Mage::app()->getStore()->getId(),
|
22 |
+
(int)Mage::app()->getStore()->isCurrentlySecure(),
|
23 |
+
Mage::getDesign()->getPackageName(),
|
24 |
+
Mage::getDesign()->getTheme('template'),
|
25 |
+
Mage::getStoreConfig('turnto_admin/qa/qa_setup_type')
|
26 |
+
// todo: add tra version so that it clears the cache with the version is changed?
|
27 |
+
),
|
28 |
+
'cache_key' => $this::TURNTO_QA_STATIC_CACHE_KEY . $helper->getProduct()->getId()
|
29 |
+
));
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getQAHtml()
|
33 |
+
{
|
34 |
+
$setupType = Mage::getStoreConfig('turnto_admin/qa/qa_setup_type');
|
35 |
+
if ($setupType == $this::TURNTO_DYNAMIC_EMBED) {
|
36 |
+
return '<div id="TurnToContent"></div>';
|
37 |
+
} else if ($setupType == $this::TURNTO_STATIC_EMBED) {
|
38 |
+
$helper = Mage::helper('turnto_client_helper/data');
|
39 |
+
$sku = $helper->getSku($this->getProduct());
|
40 |
+
return $helper->loadFile(Mage::getStoreConfig('turnto_admin/general/static_url') . '/sitedata/' . Mage::getStoreConfig('turnto_admin/general/site_key') . '/v' . $helper->getVersionForPath() . '/' . $sku . '/d/catitemhtml');
|
41 |
+
}
|
42 |
+
|
43 |
+
return '';
|
44 |
+
}
|
45 |
+
}
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Client_Block_Qateaser extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
const TURNTO_QA_TEASERS_CACHE_TAG = 'TURNTO_QA_TEASERS_CACHE_TAG';
|
6 |
+
const TURNTO_QA_TEASERS_CACHE_KEY = 'TURNTO_QA_TEASERS_CACHE_KEY';
|
7 |
+
|
8 |
+
public function __construct()
|
9 |
+
{
|
10 |
+
// cache by store, http(s), package, theme
|
11 |
+
$this->addData(array(
|
12 |
+
// defaults to 15 minutes
|
13 |
+
'cache_lifetime' => Mage::getStoreConfig('turnto_admin/general/teaser_cache_time') ? intval(Mage::getStoreConfig('turnto_admin/general/teaser_cache_time')) : 900,
|
14 |
+
'cache_tags' => array(
|
15 |
+
$this::TURNTO_QA_TEASERS_CACHE_TAG,
|
16 |
+
Mage_Catalog_Model_Product::CACHE_TAG,
|
17 |
+
Mage::app()->getStore()->getId(),
|
18 |
+
(int)Mage::app()->getStore()->isCurrentlySecure(),
|
19 |
+
Mage::getDesign()->getPackageName(),
|
20 |
+
Mage::getDesign()->getTheme('template')
|
21 |
+
),
|
22 |
+
'cache_key' => $this::TURNTO_QA_TEASERS_CACHE_KEY . $this->getProduct()->getId()
|
23 |
+
));
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getProduct()
|
27 |
+
{
|
28 |
+
return Mage::registry('current_product');
|
29 |
+
}
|
30 |
+
}
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Client_Block_Reviewscontent extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
const TURNTO_REVIEWS_STATIC_CACHE_TAG = 'TURNTO_REVIEWS_STATIC_CACHE_TAG';
|
6 |
+
const TURNTO_REVIEW_STATIC_CACHE_KEY = 'TURNTO_REVIEW_STATIC_CACHE_KEY';
|
7 |
+
const TURNTO_STATIC_EMBED = 'staticEmbed';
|
8 |
+
const TURNTO_DYNAMIC_EMBED = 'dynamicEmbed';
|
9 |
+
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
$helper = Mage::helper('turnto_client_helper/data');
|
13 |
+
//parent::construct();
|
14 |
+
$this->addData(array(
|
15 |
+
// defaults to 15 minutes
|
16 |
+
'cache_lifetime' => Mage::getStoreConfig('turnto_admin/general/static_cache_time') ? intval(Mage::getStoreConfig('turnto_admin/general/static_cache_time')) : 900,
|
17 |
+
'cache_tags' => array(
|
18 |
+
$this::TURNTO_REVIEWS_STATIC_CACHE_TAG,
|
19 |
+
Mage_Catalog_Model_Product::CACHE_TAG,
|
20 |
+
Mage::app()->getStore()->getId(),
|
21 |
+
(int)Mage::app()->getStore()->isCurrentlySecure(),
|
22 |
+
Mage::getDesign()->getPackageName(),
|
23 |
+
Mage::getDesign()->getTheme('template'),
|
24 |
+
Mage::getStoreConfig('turnto_admin/reviews/reviews_setup_type')
|
25 |
+
),
|
26 |
+
'cache_key' => $this::TURNTO_REVIEW_STATIC_CACHE_KEY . $helper->getProduct()->getId()
|
27 |
+
));
|
28 |
+
}
|
29 |
+
|
30 |
+
public function getReviewsHtml()
|
31 |
+
{
|
32 |
+
$setupType = Mage::getStoreConfig('turnto_admin/reviews/reviews_setup_type');
|
33 |
+
Mage::log('setupType: ' . $setupType . ', dynamicEmbed='.$this::TURNTO_DYNAMIC_EMBED.', staticEmbed='.$this::TURNTO_STATIC_EMBED, null, 'reviewscontent.log');
|
34 |
+
if ($setupType == $this::TURNTO_DYNAMIC_EMBED) {
|
35 |
+
return '<div id="TurnToReviewsContent"></div>';
|
36 |
+
} else if ($setupType == $this::TURNTO_STATIC_EMBED) {
|
37 |
+
Mage::log('HERE', null, 'reviewscontent.log');
|
38 |
+
$helper = Mage::helper('turnto_client_helper/data');
|
39 |
+
$sku = $helper->getSku($this->getProduct());
|
40 |
+
$reviewsUrl = Mage::getStoreConfig('turnto_admin/general/static_url') . '/sitedata/' . Mage::getStoreConfig('turnto_admin/general/site_key') . '/v' . $helper->getVersionForPath() . '/' . $sku . '/d/catitemreviewshtml';
|
41 |
+
return $helper->loadFile($reviewsUrl);
|
42 |
+
}
|
43 |
+
|
44 |
+
return '';
|
45 |
+
}
|
46 |
+
}
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Client_Block_Reviewsteaser extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
const TURNTO_REVIEW_TEASERS_CACHE_TAG = 'TURNTO_REVIEW_TEASERS_CACHE_TAG';
|
6 |
+
const TURNTO_REVIEW_TEASERS_CACHE_KEY = 'TURNTO_REVIEW_TEASERS_CACHE_KEY';
|
7 |
+
|
8 |
+
public function __construct()
|
9 |
+
{
|
10 |
+
// cache by store, http(s), package, theme
|
11 |
+
$this->addData(array(
|
12 |
+
// defaults to 15 minutes
|
13 |
+
'cache_lifetime' => Mage::getStoreConfig('turnto_admin/general/teaser_cache_time') ? intval(Mage::getStoreConfig('turnto_admin/general/teaser_cache_time')) : 900,
|
14 |
+
'cache_tags' => array(
|
15 |
+
$this::TURNTO_REVIEW_TEASERS_CACHE_TAG,
|
16 |
+
Mage_Catalog_Model_Product::CACHE_TAG,
|
17 |
+
Mage::app()->getStore()->getId(),
|
18 |
+
(int)Mage::app()->getStore()->isCurrentlySecure(),
|
19 |
+
Mage::getDesign()->getPackageName(),
|
20 |
+
Mage::getDesign()->getTheme('template')
|
21 |
+
),
|
22 |
+
'cache_key' => $this::TURNTO_REVIEW_TEASERS_CACHE_KEY . $this->getProduct()->getId()
|
23 |
+
));
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getProduct()
|
27 |
+
{
|
28 |
+
return Mage::registry('current_product');
|
29 |
+
}
|
30 |
+
}
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Client_Helper_Data extends Mage_Core_Helper_Data
|
4 |
+
{
|
5 |
+
|
6 |
+
public function getStaticHostWithoutProtocol() {
|
7 |
+
return $this->removeHttp(Mage::getStoreConfig('turnto_admin/general/static_url'));
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getHostWithoutProtocol() {
|
11 |
+
return $this->removeHttp(Mage::getStoreConfig('turnto_admin/general/url'));
|
12 |
+
}
|
13 |
+
|
14 |
+
function removeHttp($url) {
|
15 |
+
$disallowed = array('http://', 'https://');
|
16 |
+
foreach($disallowed as $d) {
|
17 |
+
if(strpos($url, $d) === 0) {
|
18 |
+
return str_replace($d, '', $url);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
return $url;
|
22 |
+
}
|
23 |
+
|
24 |
+
function getSku()
|
25 |
+
{
|
26 |
+
$product = $this->getProduct();
|
27 |
+
$sku = null;
|
28 |
+
$parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
|
29 |
+
if (isset($parentIds[0])) {
|
30 |
+
$parent = Mage::getModel('catalog/product')->load($parentIds[0]);
|
31 |
+
$sku = $this->escapeHtml($parent->getSku());
|
32 |
+
} else {
|
33 |
+
$product = Mage::getModel('catalog/product')->load($product->getId());
|
34 |
+
$sku = $this->escapeHtml($product->getSku());
|
35 |
+
}
|
36 |
+
|
37 |
+
return $sku;
|
38 |
+
}
|
39 |
+
|
40 |
+
function loadFile($url)
|
41 |
+
{
|
42 |
+
$ch = curl_init();
|
43 |
+
|
44 |
+
// Set query data here with the URL
|
45 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
46 |
+
|
47 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
48 |
+
//todo: add config to system config to adjust timeout
|
49 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, '4');
|
50 |
+
$content = trim(curl_exec($ch));
|
51 |
+
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
52 |
+
curl_close($ch);
|
53 |
+
|
54 |
+
if ($http_status == 200) {
|
55 |
+
return $content;
|
56 |
+
} else {
|
57 |
+
return "";
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getProduct()
|
62 |
+
{
|
63 |
+
return Mage::registry('current_product');
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Converts the version to the path string. For instance, version 4.3 becomes 4_3.
|
68 |
+
*
|
69 |
+
* @return string
|
70 |
+
*/
|
71 |
+
public function getVersionForPath() {
|
72 |
+
$version = Mage::getStoreConfig('turnto_admin/general/version');
|
73 |
+
$explodedVersion = explode('.', $version, 2);
|
74 |
+
return $explodedVersion[0] . '_' . $explodedVersion[1];
|
75 |
+
}
|
76 |
+
}
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Turnto_Admin>
|
6 |
+
<version>3.0.5</version>
|
7 |
+
</Turnto_Admin>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<global>
|
11 |
+
<helpers>
|
12 |
+
<turnto_client_helper>
|
13 |
+
<class>Turnto_Client_Helper</class>
|
14 |
+
</turnto_client_helper>
|
15 |
+
</helpers>
|
16 |
+
<blocks>
|
17 |
+
<turnto_client_block>
|
18 |
+
<class>Turnto_Client_Block</class>
|
19 |
+
</turnto_client_block>
|
20 |
+
</blocks>
|
21 |
+
</global>
|
22 |
+
|
23 |
+
<frontend>
|
24 |
+
<layout>
|
25 |
+
<updates>
|
26 |
+
<catalog_product_view>
|
27 |
+
<file>turnto_client.xml</file>
|
28 |
+
</catalog_product_view>
|
29 |
+
<checkout_cart_index>
|
30 |
+
<file>turnto_client.xml</file>
|
31 |
+
</checkout_cart_index>
|
32 |
+
</updates>
|
33 |
+
</layout>
|
34 |
+
</frontend>
|
35 |
+
</config>
|
@@ -1,28 +1,29 @@
|
|
1 |
<?php
|
2 |
-
class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
3 |
-
public function indexAction()
|
4 |
-
{
|
5 |
-
$this->loadLayout();
|
6 |
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
$this->loadLayout();
|
13 |
|
14 |
-
|
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
|
@@ -33,7 +34,7 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
33 |
}
|
34 |
|
35 |
|
36 |
-
|
37 |
* Login post action
|
38 |
*/
|
39 |
public function loginAction()
|
@@ -42,10 +43,10 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
42 |
|
43 |
//$this->getResponse()->setHeader('Content-Type', 'application/json');
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
}
|
50 |
$session = $this->_getSession();
|
51 |
|
@@ -57,8 +58,8 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
57 |
if ($session->getCustomer()->getIsJustConfirmed()) {
|
58 |
$this->_welcomeCustomer($session->getCustomer(), true);
|
59 |
}
|
60 |
-
$this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure'=>false)));
|
61 |
-
|
62 |
} catch (Mage_Core_Exception $e) {
|
63 |
switch ($e->getCode()) {
|
64 |
case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
|
@@ -72,7 +73,7 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
72 |
break;
|
73 |
default:
|
74 |
//$result["error"] = 1;
|
75 |
-
|
76 |
}
|
77 |
$session->addError($message);
|
78 |
$session->setUsername($login['username']);
|
@@ -80,7 +81,7 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
80 |
// Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
|
81 |
}
|
82 |
} else {
|
83 |
-
|
84 |
$session->addError($this->__('Login and password are required.'));
|
85 |
}
|
86 |
}
|
@@ -92,9 +93,9 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
92 |
|
93 |
public function getUserStatusAction()
|
94 |
{
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
$customer = $session->getCustomer();
|
99 |
$result = array();
|
100 |
|
@@ -104,14 +105,14 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
104 |
$result['email'] = $customer->getEmail();
|
105 |
$result['email_confirmed'] = true;
|
106 |
$result['nickname'] = null;
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
-
|
113 |
|
114 |
-
|
115 |
* Customer logout action
|
116 |
*/
|
117 |
public function logoutAction()
|
@@ -158,8 +159,8 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
158 |
$addressForm->setFormCode('customer_register_address')
|
159 |
->setEntity($address);
|
160 |
|
161 |
-
$addressData
|
162 |
-
$addressErrors
|
163 |
if ($addressErrors === true) {
|
164 |
$address->setId(null)
|
165 |
->setIsDefaultBilling($this->getRequest()->getParam('default_billing', false))
|
@@ -179,7 +180,7 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
179 |
try {
|
180 |
$customerErrors = $customerForm->validateData($customerData);
|
181 |
if ($customerErrors !== true) {
|
182 |
-
|
183 |
} else {
|
184 |
$customerForm->compactData($customerData);
|
185 |
$customer->setPassword($this->getRequest()->getPost('password'));
|
@@ -198,29 +199,29 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
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 |
-
|
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 |
-
|
210 |
-
|
211 |
}
|
212 |
} else {
|
213 |
$session->setCustomerFormData($this->getRequest()->getPost());
|
214 |
if (is_array($errors)) {
|
215 |
foreach ($errors as $errorMessage) {
|
216 |
-
|
217 |
}
|
218 |
} else {
|
219 |
$session->addError($this->__('Invalid customer data'));
|
220 |
}
|
221 |
}
|
222 |
} catch (Mage_Core_Exception $e) {
|
223 |
-
|
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);
|
@@ -235,7 +236,7 @@ class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action {
|
|
235 |
}
|
236 |
}
|
237 |
|
238 |
-
|
239 |
$this->_redirectError(Mage::getUrl('*/*/reg', array('_secure' => true)));
|
240 |
}
|
241 |
}
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
class Turnto_Login_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout();
|
8 |
|
9 |
+
$this->renderLayout();
|
10 |
+
}
|
|
|
11 |
|
12 |
+
public function regAction()
|
13 |
+
{
|
14 |
+
$this->loadLayout();
|
15 |
|
16 |
+
$this->renderLayout();
|
17 |
+
}
|
18 |
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
public function successAction()
|
21 |
+
{
|
22 |
+
echo '<html><head></head><body><script type="text/javascript">parent.TurnTo.localAuthenticationComplete();</script><h3>Loading...</h3></body></html>';
|
23 |
+
}
|
24 |
|
25 |
|
26 |
+
/**
|
27 |
* Retrieve customer session model object
|
28 |
*
|
29 |
* @return Mage_Customer_Model_Session
|
34 |
}
|
35 |
|
36 |
|
37 |
+
/**
|
38 |
* Login post action
|
39 |
*/
|
40 |
public function loginAction()
|
43 |
|
44 |
//$this->getResponse()->setHeader('Content-Type', 'application/json');
|
45 |
|
46 |
+
if ($this->_getSession()->isLoggedIn()) {
|
47 |
+
//$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
48 |
+
$this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure' => false)));
|
49 |
+
return;
|
50 |
}
|
51 |
$session = $this->_getSession();
|
52 |
|
58 |
if ($session->getCustomer()->getIsJustConfirmed()) {
|
59 |
$this->_welcomeCustomer($session->getCustomer(), true);
|
60 |
}
|
61 |
+
$this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure' => false)));
|
62 |
+
return;
|
63 |
} catch (Mage_Core_Exception $e) {
|
64 |
switch ($e->getCode()) {
|
65 |
case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
|
73 |
break;
|
74 |
default:
|
75 |
//$result["error"] = 1;
|
76 |
+
$message = $e->getMessage();
|
77 |
}
|
78 |
$session->addError($message);
|
79 |
$session->setUsername($login['username']);
|
81 |
// Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
|
82 |
}
|
83 |
} else {
|
84 |
+
//$result["error"] = 1;
|
85 |
$session->addError($this->__('Login and password are required.'));
|
86 |
}
|
87 |
}
|
93 |
|
94 |
public function getUserStatusAction()
|
95 |
{
|
96 |
+
$session = Mage::getSingleton('customer/session');
|
97 |
+
$this->getResponse()->setHeader('Content-Type', 'application/json');
|
98 |
+
if ($session->isLoggedIn()) {
|
99 |
$customer = $session->getCustomer();
|
100 |
$result = array();
|
101 |
|
105 |
$result['email'] = $customer->getEmail();
|
106 |
$result['email_confirmed'] = true;
|
107 |
$result['nickname'] = null;
|
108 |
+
} else {
|
109 |
+
$result['error'] = "User is logged out";
|
110 |
+
}
|
111 |
|
112 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
113 |
+
}
|
114 |
|
115 |
+
/**
|
116 |
* Customer logout action
|
117 |
*/
|
118 |
public function logoutAction()
|
159 |
$addressForm->setFormCode('customer_register_address')
|
160 |
->setEntity($address);
|
161 |
|
162 |
+
$addressData = $addressForm->extractData($this->getRequest(), 'address', false);
|
163 |
+
$addressErrors = $addressForm->validateData($addressData);
|
164 |
if ($addressErrors === true) {
|
165 |
$address->setId(null)
|
166 |
->setIsDefaultBilling($this->getRequest()->getParam('default_billing', false))
|
180 |
try {
|
181 |
$customerErrors = $customerForm->validateData($customerData);
|
182 |
if ($customerErrors !== true) {
|
183 |
+
$errors = array_merge($customerErrors, $errors);
|
184 |
} else {
|
185 |
$customerForm->compactData($customerData);
|
186 |
$customer->setPassword($this->getRequest()->getPost('password'));
|
199 |
if ($customer->isConfirmationRequired()) {
|
200 |
$customer->sendNewAccountEmail('confirmation', $session->getBeforeAuthUrl());
|
201 |
$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())));
|
202 |
+
$this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure' => false)));
|
203 |
+
//$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
204 |
return;
|
205 |
} else {
|
206 |
$session->setCustomerAsLoggedIn($customer);
|
207 |
//$url = $this->_welcomeCustomer($customer);
|
208 |
//$this->_redirectSuccess($url);
|
209 |
+
$this->_redirectSuccess(Mage::getUrl('*/*/success', array('_secure' => false)));
|
210 |
+
//$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
211 |
+
return;
|
212 |
}
|
213 |
} else {
|
214 |
$session->setCustomerFormData($this->getRequest()->getPost());
|
215 |
if (is_array($errors)) {
|
216 |
foreach ($errors as $errorMessage) {
|
217 |
+
$session->addError($errorMessage);
|
218 |
}
|
219 |
} else {
|
220 |
$session->addError($this->__('Invalid customer data'));
|
221 |
}
|
222 |
}
|
223 |
} catch (Mage_Core_Exception $e) {
|
224 |
+
$session->setCustomerFormData($this->getRequest()->getPost());
|
225 |
if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
|
226 |
$url = Mage::getUrl('customer/account/forgotpassword');
|
227 |
$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);
|
236 |
}
|
237 |
}
|
238 |
|
239 |
+
//$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
240 |
$this->_redirectError(Mage::getUrl('*/*/reg', array('_secure' => true)));
|
241 |
}
|
242 |
}
|
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Turnto_Login>
|
6 |
-
<version>
|
7 |
</Turnto_Login>
|
8 |
</modules>
|
9 |
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Turnto_Login>
|
6 |
+
<version>3.0.5</version>
|
7 |
</Turnto_Login>
|
8 |
</modules>
|
9 |
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Mobile_Block_Landing extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
//$this->setTemplate('turnto/mobile/landing.phtml');
|
10 |
+
}
|
11 |
+
}
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Mobile_Helper_Data extends Mage_Core_Helper_Data
|
4 |
+
{
|
5 |
+
public function getStaticHostWithoutProtocol() {
|
6 |
+
return $this->removeHttp(Mage::getStoreConfig('turnto_admin/general/static_url'));
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getHostWithoutProtocol() {
|
10 |
+
return $this->removeHttp(Mage::getStoreConfig('turnto_admin/general/url'));
|
11 |
+
}
|
12 |
+
|
13 |
+
function removeHttp($url) {
|
14 |
+
$disallowed = array('http://', 'https://');
|
15 |
+
foreach($disallowed as $d) {
|
16 |
+
if(strpos($url, $d) === 0) {
|
17 |
+
return str_replace($d, '', $url);
|
18 |
+
}
|
19 |
+
}
|
20 |
+
return $url;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Converts the version to the path string. For instance, version 4.3 becomes 4_3.
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function getVersionForPath() {
|
29 |
+
$version = Mage::getStoreConfig('turnto_admin/general/version');
|
30 |
+
$explodedVersion = explode('.', $version, 2);
|
31 |
+
return $explodedVersion[0] . '_' . $explodedVersion[1];
|
32 |
+
}
|
33 |
+
}
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Turnto_Mobile_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout();
|
8 |
+
$this->renderLayout();
|
9 |
+
|
10 |
+
//Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());
|
11 |
+
}
|
12 |
+
}
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Turnto_Mobile>
|
6 |
+
<version>3.0.5</version>
|
7 |
+
</Turnto_Mobile>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<global>
|
11 |
+
<blocks>
|
12 |
+
<turnto_mobile_block>
|
13 |
+
<class>Turnto_Mobile_Block</class>
|
14 |
+
</turnto_mobile_block>
|
15 |
+
</blocks>
|
16 |
+
<helpers>
|
17 |
+
<turnto_mobile_helper>
|
18 |
+
<class>Turnto_Mobile_Helper</class>
|
19 |
+
</turnto_mobile_helper>
|
20 |
+
</helpers>
|
21 |
+
</global>
|
22 |
+
|
23 |
+
<frontend>
|
24 |
+
<routers>
|
25 |
+
<turnto_mobile>
|
26 |
+
<use>standard</use>
|
27 |
+
<args>
|
28 |
+
<module>Turnto_Mobile</module>
|
29 |
+
<frontName>turntomobile</frontName>
|
30 |
+
</args>
|
31 |
+
</turnto_mobile>
|
32 |
+
</routers>
|
33 |
+
<layout>
|
34 |
+
<updates>
|
35 |
+
<turnto_mobile>
|
36 |
+
<file>turnto_mobile.xml</file>
|
37 |
+
</turnto_mobile>
|
38 |
+
</updates>
|
39 |
+
</layout>
|
40 |
+
</frontend>
|
41 |
+
</config>
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<catalog_product_view>
|
4 |
+
<reference name="head">
|
5 |
+
<block type="core/template" name="trajs" template="turnto/client/tra_js.phtml" />
|
6 |
+
</reference>
|
7 |
+
<reference name="product.info">
|
8 |
+
<block type="turnto_client_block/qateaser" name="turnto_qa_teaser" as="turnto_qa_teaser" template="turnto/client/qa.teaser.phtml"/>
|
9 |
+
<block type="turnto_client_block/reviewsteaser" name="turnto_reviews_teaser" as="turnto_reviews_teaser" template="turnto/client/reviews.teaser.phtml"/>
|
10 |
+
</reference>
|
11 |
+
<reference name="product.info">
|
12 |
+
<block type="turnto_client_block/reviewscontent" name="turnto_reviews_content" as="turnto_reviews_content" template="turnto/client/reviews.phtml"/>
|
13 |
+
<block type="turnto_client_block/qacontent" name="turnto_qa_content" as="turnto_qa_content" template="turnto/client/qa.phtml"/>
|
14 |
+
</reference>
|
15 |
+
</catalog_product_view>
|
16 |
+
<checkout_onepage_success>
|
17 |
+
<reference name="head">
|
18 |
+
<block type="core/template" name="checkout_trajs" template="turnto/client/checkout.tra_js.phtml" />
|
19 |
+
</reference>
|
20 |
+
</checkout_onepage_success>
|
21 |
+
<checkout_multishipping_success>
|
22 |
+
<reference name="head">
|
23 |
+
<block type="core/template" name="checkout_trajs" template="turnto/client/checkout.tra_js.phtml" />
|
24 |
+
</reference>
|
25 |
+
</checkout_multishipping_success>
|
26 |
+
</layout>
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<!--<default>-->
|
4 |
+
<!--<reference name="root">-->
|
5 |
+
<!--<action method="setTemplate">-->
|
6 |
+
<!--<template>turnto/mobile/landing.phtml</template>-->
|
7 |
+
<!--</action>-->
|
8 |
+
<!--</reference>-->
|
9 |
+
<!--</default>-->
|
10 |
+
|
11 |
+
<turnto_mobile_index_index>
|
12 |
+
<reference name="root">
|
13 |
+
<action method="setTemplate">
|
14 |
+
<template>turnto/mobile/landing.phtml</template>
|
15 |
+
</action>
|
16 |
+
</reference>
|
17 |
+
</turnto_mobile_index_index>
|
18 |
+
</layout>
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if(Mage::getStoreConfig('turnto_admin/checkoutcomments/checkoutcomments_enabled') == 1) : ?>
|
2 |
+
<?php $helper = Mage::helper('turnto_client_helper/data'); ?>
|
3 |
+
<script type="text/javascript">
|
4 |
+
// turnto extension
|
5 |
+
var turnToConfig = {
|
6 |
+
siteKey: "<?php echo Mage::getStoreConfig('turnto_admin/general/site_key'); ?>",
|
7 |
+
host: "<?php echo $helper->getHostWithoutProtocol(); ?>",
|
8 |
+
staticHost: "<?php echo $helper->getStaticHostWithoutProtocol(); ?>",
|
9 |
+
postPurchaseFlow:true
|
10 |
+
};
|
11 |
+
</script>
|
12 |
+
|
13 |
+
<script type="text/javascript" src="//<?php echo $helper->getStaticHostWithoutProtocol(); ?>/tra<?php echo $helper->getVersionForPath()?>/turntoFeed.js"></script>
|
14 |
+
<script type="text/javascript" src="//<?php echo $helper->getStaticHostWithoutProtocol(); ?>/traServer<?php echo $helper->getVersionForPath()?>/trajs/<?php echo Mage::getStoreConfig('turnto_admin/general/site_key'); ?>/tra.js"></script>
|
15 |
+
|
16 |
+
<?php
|
17 |
+
$TTorderId = Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastOrderId();
|
18 |
+
$TTorder = Mage::getModel('sales/order')->load($TTorderId);
|
19 |
+
$TTemail = $TTorder->getCustomerEmail();
|
20 |
+
$TTcustomerId = Mage::getSingleton('customer/session')->getCustomerId();
|
21 |
+
$TTaddress = Mage::getModel('sales/order_address')->load($TTorder->billing_address_id);
|
22 |
+
$TTfirstName = $TTaddress->getFirstname();
|
23 |
+
$TTlastName = $TTaddress->getLastname();
|
24 |
+
$TTpostalCode = $TTaddress->getPostcode();
|
25 |
+
?>
|
26 |
+
|
27 |
+
<script type="text/javascript">
|
28 |
+
<?php
|
29 |
+
echo 'var deliveryDate = new Date();';
|
30 |
+
echo 'deliveryDate.setDate(deliveryDate.getDate() + 30);';
|
31 |
+
echo 'TurnToFeed.addFeedPurchaseOrder({orderId:"'.$TTorderId.'",email:"'.$TTemail.'",postalCode: "'.$TTpostalCode.'",firstName: "'.$TTfirstName.'", lastName: "'.$TTlastName.'", "deliveryDate": deliveryDate });';
|
32 |
+
|
33 |
+
foreach ($TTorder->getAllItems() as $item) {
|
34 |
+
$TTproduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
35 |
+
$TTparents = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($TTproduct->getId());
|
36 |
+
if(isset($TTparents[0]))
|
37 |
+
{
|
38 |
+
// skip products with a parent, they are in the feed separately
|
39 |
+
continue;
|
40 |
+
}
|
41 |
+
$TTurl= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'index.php/' . $TTproduct->getUrlPath();
|
42 |
+
$TTimageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'media/catalog/product'.$TTproduct->getImage();
|
43 |
+
echo 'TurnToFeed.addFeedLineItem({title: "'.$this->escapeHtml($TTproduct->getName()).'", url: "'.$TTurl.'",sku:"'.$this->escapeHtml($TTproduct->getSku()).'", price:"'.$this->escapeHtml($TTproduct->getPrice()).'",itemImageUrl:"'.$this->escapeHtml($TTimageUrl).'"});';
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
?>
|
48 |
+
TurnToFeed.sendFeed();
|
49 |
+
</script>
|
50 |
+
<?php endif; ?>
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php echo '<!-- cached time: ' . time() . ' -->' ?>
|
2 |
+
<?php echo $this->getQAHtml(); ?>
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<span class="TurnToItemTeaser"></span>
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php echo '<!-- cached time: ' . time() . ' -->' ?>
|
2 |
+
<?php echo $this->getReviewsHtml(); ?>
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<span class="TurnToReviewsTeaser"></span>
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- custom teaser code-->
|
2 |
+
<?php if (intval(Mage::getStoreConfig('turnto_admin/qa/qa_teaser_custom_enabled')) == 1): ?>
|
3 |
+
<?php echo Mage::getStoreConfig('turnto_admin/qa/qa_teaser_custom') ?>
|
4 |
+
<?php endif; ?>
|
5 |
+
|
6 |
+
<?php if (intval(Mage::getStoreConfig('turnto_admin/reviews/reviews_teaser_custom_enabled')) == 1): ?>
|
7 |
+
<?php echo Mage::getStoreConfig('turnto_admin/reviews/reviews_teaser_custom') ?>
|
8 |
+
<?php endif; ?>
|
9 |
+
|
10 |
+
<script type="text/javascript">
|
11 |
+
<?php
|
12 |
+
$helper = Mage::helper('turnto_client_helper/data');
|
13 |
+
$TTSKU = $helper->getSku();
|
14 |
+
?>
|
15 |
+
|
16 |
+
var turnToConfig = {
|
17 |
+
siteKey: "<?php echo Mage::getStoreConfig('turnto_admin/general/site_key'); ?>",
|
18 |
+
host: "<?php echo $helper->getHostWithoutProtocol(); ?>",
|
19 |
+
staticHost: "<?php echo $helper->getStaticHostWithoutProtocol(); ?>",
|
20 |
+
//imageStoreBase: 'wac.edgecastcdn.net/001A39/qa',
|
21 |
+
setupType: "<?php echo Mage::getStoreConfig('turnto_admin/qa/qa_setup_type') ?>",
|
22 |
+
reviewsSetupType: "<?php echo Mage::getStoreConfig('turnto_admin/reviews/reviews_setup_type') ?>"
|
23 |
+
<?php if (intval(Mage::getStoreConfig('turnto_admin/qa/qa_teaser_custom_enabled')) == 1): ?>
|
24 |
+
,iTeaserFunc: <?php echo Mage::getStoreConfig('turnto_admin/qa/qa_teaser_custom_function_name'); ?>
|
25 |
+
<?php endif; ?>
|
26 |
+
<?php if (intval(Mage::getStoreConfig('turnto_admin/reviews/reviews_teaser_custom_enabled')) == 1): ?>
|
27 |
+
,reviewsTeaserFunc: <?php echo Mage::getStoreConfig('turnto_admin/reviews/reviews_teaser_custom_function_name'); ?>
|
28 |
+
<?php endif; ?>
|
29 |
+
};
|
30 |
+
(function () {
|
31 |
+
var tt = document.createElement('script');
|
32 |
+
tt.type = 'text/javascript';
|
33 |
+
tt.async = true;
|
34 |
+
tt.src = "<?php echo Mage::getStoreConfig('turnto_admin/general/static_url')?>/traServer<?php echo $helper->getVersionForPath()?>/trajs/" + turnToConfig.siteKey + "/tra.js";
|
35 |
+
var s = document.getElementsByTagName('script')[0];
|
36 |
+
s.parentNode.insertBefore(tt, s);
|
37 |
+
})();
|
38 |
+
|
39 |
+
var TurnToItemSku = "<?php echo $TTSKU ?>";
|
40 |
+
</script>
|
41 |
+
|
42 |
+
<script type="text/javascript" src="<?php echo Mage::getStoreConfig('turnto_admin/general/static_url')?>/sitedata/<?php echo Mage::getStoreConfig('turnto_admin/general/site_key'); ?>/v4_2/<?php echo $TTSKU?>/d/itemjs"></script>
|
43 |
+
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title><?php echo Mage::getStoreConfig('turnto_admin/mobileconfig/title'); ?></title>
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
6 |
+
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
7 |
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
8 |
+
|
9 |
+
<?php $helper = Mage::helper('turnto_mobile_helper/data'); ?>
|
10 |
+
|
11 |
+
<script type="text/javascript">
|
12 |
+
var turnToConfig = {
|
13 |
+
siteKey: "<?php echo Mage::getStoreConfig('turnto_admin/general/site_key'); ?>",
|
14 |
+
host: "<?php echo $helper->getHostWithoutProtocol(); ?>",
|
15 |
+
staticHost: "<?php echo $helper->getStaticHostWithoutProtocol(); ?>",
|
16 |
+
imageStoreBase:'<?php echo Mage::getStoreConfig('turnto_admin/general/image_store_base'); ?>',
|
17 |
+
setupType: "mobileTT"
|
18 |
+
};
|
19 |
+
</script>
|
20 |
+
<script type="text/javascript" src="<?php echo Mage::getStoreConfig('turnto_admin/general/url')?>/tra<?php echo $helper->getVersionForPath(); ?>/mobile-landing.js"></script>
|
21 |
+
<link rel="stylesheet" href="<?php echo Mage::getStoreConfig('turnto_admin/general/static_url')?>/tra<?php echo $helper->getVersionForPath(); ?>/tra.css" type="text/css"/>
|
22 |
+
</head>
|
23 |
+
|
24 |
+
<body>
|
25 |
+
<div id="mobileTT-content"></div>
|
26 |
+
</body>
|
27 |
+
</html>
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Turnto_Client>
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>community</codePool>
|
8 |
+
<depends>
|
9 |
+
<Turnto_Admin />
|
10 |
+
</depends>
|
11 |
+
</Turnto_Client>
|
12 |
+
</modules>
|
13 |
+
</config>
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Turnto_Mobile>
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>community</codePool>
|
8 |
+
</Turnto_Mobile>
|
9 |
+
</modules>
|
10 |
+
</config>
|
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<package><name>socialcommerce_suite_by_turnto</name><version>
|
3 |
|
4 |
2.0 Adds support for Single Sign On
|
5 |
2.1 Re-wrote catalog feed generator
|
@@ -13,7 +13,9 @@
|
|
13 |
2.2.10 - Minor bug fix for historical feed exporter
|
14 |
2.2.11 - Fixed circular reference in category tree. Optimized memory usage in catalog feed generator.
|
15 |
2.3.0 - Added ability to push the historical feed nightly
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
1 |
<?xml version="1.0"?>
|
2 |
+
<package><name>socialcommerce_suite_by_turnto</name><version>3.0.5</version><stability>stable</stability><license>MIT</license><channel>community</channel><extends></extends><summary>Connect your shoppers to your customers</summary><description>The TurnTo Social Commerce Suite helps you put the good will you have earned from your customers to work by opening direct communications between your shoppers and your past customers.</description><notes>TurnTo Admin Extension
|
3 |
|
4 |
2.0 Adds support for Single Sign On
|
5 |
2.1 Re-wrote catalog feed generator
|
13 |
2.2.10 - Minor bug fix for historical feed exporter
|
14 |
2.2.11 - Fixed circular reference in category tree. Optimized memory usage in catalog feed generator.
|
15 |
2.3.0 - Added ability to push the historical feed nightly
|
16 |
+
3.0 - Refactored all code into blocks that can easily be added to templates. Almost all TurnTo functionality can now be easily configured from the Magento Admin Panel Configuration page.
|
17 |
+
3.0.1 - Minor bug fixes
|
18 |
+
3.0.2 - Minor bug fixes
|
19 |
+
3.0.3 - Allow users to deselect GTINs
|
20 |
+
3.0.4 - Allow users to configure attribute used as brand
|
21 |
+
3.0.5 - Fixed security warning on checkout success page caused by using http instead of https</notes><authors><author><name>TurnTo</name><user>TurnTo</user><email>contact@turnto.com</email></author></authors><date>2016-06-21</date><time>6:32:53</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Turnto"><dir name="Admin"><dir name="Block"><file name="CatalogFeed.php" hash="f974cfdc687bf5edb3fdccb879547200"/><file name="HistoricalFeed.php" hash="a4d2b29c6d8bb2ed59aa884e02abc23b"/><file name="Overview.php" hash="51c8ed09153f1dc3b3d02aa0ab83f195"/><file name="RatingsFeed.php" hash="264cf15842c2738f1b77bce6ff9b9f0a"/><file name="ShowTabsAdminBlock.php" hash="403c3a8f95c65e361471b28fae25d2e3"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Attributes.php" hash="07f84525b23f32db1eac6bd77318c067"/><file name="AttributesAll.php" hash="ea7cbaadf904db6c09a26175b8de3919"/><file name="Feed.php" hash="84d005b13b3e39da048078bfc275bdf5"/><file name="Setuptype.php" hash="4a22ad8563457cf16785ba5e6b621b82"/></dir></dir></dir><dir name="Review"><file name="Helper.php" hash="2ecc1a9252af9d40666b4f3a6603b522"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="532642a4048636f9b1e42334a4f7dc52"/><dir name="Adminhtml"><file name="IndexController.php" hash="d78518e5502f5c19ff02892e2fa9fe78"/><file name="TurntoController.php" hash="f8c35059af46ed080a7a2d28c917042b"/></dir></dir><dir name="etc"><file name="config.xml" hash="8d60b6737a31103bc5c2236ae0c0e107"/><file name="system.xml" hash="e15402fb71b7b5e00b375cac37bdb74f"/></dir><dir name="Helper"><file name="Data.php" hash="a314c55de2898e5bcca63c464d6f198f"/></dir><dir name="Model"><file name="Observer.php" hash="ab972bf9ec9edb07345828fb4e69141d"/><file name="Rating.php" hash="2f3d43beb74018b394d7bf6ba1098e5c"/><dir name="Catalog"><file name="Product.php" hash="5325442b4449b7eb75547f50698400a6"/></dir><dir name="Resource"><file name="Rating.php" hash="0a7f9415ba76c6e121e0f3281479a4df"/><dir name="Rating"><file name="Collection.php" hash="2f0709f0f5f3bde0725c2db266f16e7d"/></dir></dir></dir><dir name="sql"><dir name="turnto_admin_setup"><file name="mysql4-install-2.2.0.php" hash="747fc729ae7587b41c3f3cce62aba82b"/></dir></dir></dir><dir name="Client"><dir name="Block"><file name="Qacontent.php" hash="a855a19924a8567ea3711ed5194038da"/><file name="Qateaser.php" hash="05171123ca8ddf26a80a7f4ffed16947"/><file name="Reviewscontent.php" hash="68f01e42d28f9c4b695e555e184d64fb"/><file name="Reviewsteaser.php" hash="302394ffc6e14f65a108726348ee350a"/></dir><dir name="etc"><file name="config.xml" hash="5d0a57119b723bd1a8cc4bc3e8665b90"/></dir><dir name="Helper"><file name="Data.php" hash="1bf5a62ffaa09ebb3ff5962737662ad6"/></dir></dir><dir name="Login"><dir name="Block"><file name="Login.php" hash="a51bc0ee76d20a9f4cb32bb21420ecd9"/><file name="Reg.php" hash="4eece8d78391b6578b0ba5e2c764dba5"/></dir><dir name="controllers"><file name="IndexController.php" hash="245a41408a8c593f8c1fefaee9890d6b"/></dir><dir name="etc"><file name="config.xml" hash="dd0c14c2719c59565a5f340cc4f59b58"/></dir><dir name="Helper"><file name="Data.php" hash="e87f15957335101d5ae643befcc06817"/></dir></dir><dir name="Mobile"><dir name="Block"><file name="Landing.php" hash="b4b57c0b56f275e644fad5290ee44f02"/></dir><dir name="controllers"><file name="IndexController.php" hash="304ebc607cc3d25103b1a2354da0a890"/></dir><dir name="etc"><file name="config.xml" hash="80f56758c815cd0e38d8e198b2341594"/></dir><dir name="Helper"><file name="Data.php" hash="12e07ea9d92ab8e90886104e08c96c8a"/></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="turnto"><file name="catalog_feed_tab.phtml" hash="2a37f6daa5261ee972d4938a9f328893"/><file name="historical_feed_tab.phtml" hash="14b3a1940e98f3f44db732afd1c81946"/><file name="overview.phtml" hash="4cc20b32c3b0cd36cd349f0be44e4615"/><file name="product_ratings_feed_tab.phtml" hash="3733a056ab45f0af0b6a93ea30e257e0"/><dir name="adminhtml"><dir name="system"><dir name="config"><file name="feed.phtml" hash="c4b453ab154a34408bc34021630653bf"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="turnto_client.xml" hash="9b0557dbd292649659b01dc1ae69ebb7"/><file name="turnto_login.xml" hash="618272fcb19620431cd7b27369e34eb4"/><file name="turnto_mobile.xml" hash="2a40a08b07570c9b8585b7715cc5b831"/></dir><dir name="template"><dir name="turnto"><dir name="client"><file name="checkout.tra_js.phtml" hash="e3d1a2dfb29eb71856aa9ef7cc0620de"/><file name="qa.phtml" hash="076489bac4fc7a7c6b266c9028b2a264"/><file name="qa.teaser.phtml" hash="b177958f3275e2c5e0246896bc630092"/><file name="reviews.phtml" hash="f7bab2adcb3c700830903f758af75f48"/><file name="reviews.teaser.phtml" hash="525e1fa2fed50187f418fedcd5f7ef17"/><file name="tra_js.phtml" hash="2bd969443be18763b6e9f0aba87e7a30"/></dir><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 name="mobile"><file name="landing.phtml" hash="169ed8421ff2d36dbbb1eb98d1b27dcb"/></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Turnto_Admin.xml" hash="0932b63ab068e1e8b12ff7b997ae83ee"/><file name="Turnto_Client.xml" hash="8c68147ee810f2b61d3fd50874b19efa"/><file name="Turnto_Login.xml" hash="734c463c75970bd14ac7d7a90fa2de11"/><file name="Turnto_Mobile.xml" hash="57cc2be45fb4ccd836e8953b5305aa58"/></dir></dir></dir></target></contents></package>
|