Version Notes
Add Search Engine Schema Code
Download this release
Release Info
Developer | Shopper Approved |
Extension | ShprAprvd_ShopperApproved |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/community/ShprAprvd/ShopperApproved/Block/Schema.php +71 -0
- app/code/community/ShprAprvd/ShopperApproved/Block/Script.php +71 -0
- app/code/community/ShprAprvd/ShopperApproved/Helper/Data.php +26 -0
- app/code/community/ShprAprvd/ShopperApproved/etc/adminhtml.xml +21 -0
- app/code/community/ShprAprvd/ShopperApproved/etc/config.xml +37 -0
- app/code/community/ShprAprvd/ShopperApproved/etc/system.xml +100 -0
- app/design/frontend/base/default/layout/shopperapproved.xml +56 -0
- app/design/frontend/base/default/template/shopperapproved/schema.phtml +19 -0
- app/design/frontend/base/default/template/shopperapproved/script.phtml +13 -0
- app/etc/modules/ShprAprvd_ShopperApproved.xml +9 -0
- package.xml +23 -0
app/code/community/ShprAprvd/ShopperApproved/Block/Schema.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
|
10 |
+
class ShprAprvd_ShopperApproved_Block_Schema extends Mage_Core_Block_Template
|
11 |
+
{
|
12 |
+
/*
|
13 |
+
* Constructor method
|
14 |
+
*
|
15 |
+
* @access public
|
16 |
+
* @param null
|
17 |
+
* @return null
|
18 |
+
*/
|
19 |
+
public function _construct()
|
20 |
+
{
|
21 |
+
parent::_construct();
|
22 |
+
$website_id = Mage::helper('shopperapproved')->getAccountId();
|
23 |
+
if(Mage::helper('shopperapproved')->getEnabled() == true && !empty($website_id)) {
|
24 |
+
$this->setTemplate('shopperapproved/schema.phtml');
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/*
|
29 |
+
* Helper method
|
30 |
+
*
|
31 |
+
* @access public
|
32 |
+
* @param string $key
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getSetting($key = null)
|
36 |
+
{
|
37 |
+
static $data;
|
38 |
+
if(empty($data)) {
|
39 |
+
$data = array(
|
40 |
+
'account' => Mage::helper('shopperapproved')->getAccountId(),
|
41 |
+
'token' => Mage::helper('shopperapproved')->getAccountToken(),
|
42 |
+
'enabled' => Mage::helper('shopperapproved')->getEnabled()
|
43 |
+
);
|
44 |
+
|
45 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
46 |
+
if(!empty($customer)) {
|
47 |
+
$data['name'] = $customer->getName();
|
48 |
+
$data['email'] = $customer->getEmail();
|
49 |
+
$address = $customer->getDefaultBillingAddress();
|
50 |
+
if(!empty($address)) {
|
51 |
+
$address = $customer->getDefaultShippingAddress();
|
52 |
+
}
|
53 |
+
if(!empty($address)) {
|
54 |
+
$country = Mage::getModel('directory/country')->loadByCode($address->getCountry());
|
55 |
+
$data['country'] = $country->getName();
|
56 |
+
$data['state'] = $address->getRegion();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
61 |
+
if (!empty($lastOrderId)) {
|
62 |
+
$data['orderid'] = $lastOrderId;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
if(isset($data[$key])) {
|
66 |
+
return $data[$key];
|
67 |
+
} else {
|
68 |
+
return null;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
app/code/community/ShprAprvd/ShopperApproved/Block/Script.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
|
10 |
+
class ShprAprvd_ShopperApproved_Block_Script extends Mage_Core_Block_Template
|
11 |
+
{
|
12 |
+
/*
|
13 |
+
* Constructor method
|
14 |
+
*
|
15 |
+
* @access public
|
16 |
+
* @param null
|
17 |
+
* @return null
|
18 |
+
*/
|
19 |
+
public function _construct()
|
20 |
+
{
|
21 |
+
parent::_construct();
|
22 |
+
$website_id = Mage::helper('shopperapproved')->getAccountId();
|
23 |
+
if(Mage::helper('shopperapproved')->getEnabled() == true && !empty($website_id)) {
|
24 |
+
$this->setTemplate('shopperapproved/script.phtml');
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
/*
|
29 |
+
* Helper method
|
30 |
+
*
|
31 |
+
* @access public
|
32 |
+
* @param string $key
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getSetting($key = null)
|
36 |
+
{
|
37 |
+
static $data;
|
38 |
+
if(empty($data)) {
|
39 |
+
$data = array(
|
40 |
+
'account' => Mage::helper('shopperapproved')->getAccountId(),
|
41 |
+
'token' => Mage::helper('shopperapproved')->getAccountToken(),
|
42 |
+
'enabled' => Mage::helper('shopperapproved')->getEnabled()
|
43 |
+
);
|
44 |
+
|
45 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
46 |
+
if(!empty($customer)) {
|
47 |
+
$data['name'] = $customer->getName();
|
48 |
+
$data['email'] = $customer->getEmail();
|
49 |
+
$address = $customer->getDefaultBillingAddress();
|
50 |
+
if(!empty($address)) {
|
51 |
+
$address = $customer->getDefaultShippingAddress();
|
52 |
+
}
|
53 |
+
if(!empty($address)) {
|
54 |
+
$country = Mage::getModel('directory/country')->loadByCode($address->getCountry());
|
55 |
+
$data['country'] = $country->getName();
|
56 |
+
$data['state'] = $address->getRegion();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
61 |
+
if (!empty($lastOrderId)) {
|
62 |
+
$data['orderid'] = $lastOrderId;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
if(isset($data[$key])) {
|
66 |
+
return $data[$key];
|
67 |
+
} else {
|
68 |
+
return null;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
app/code/community/ShprAprvd/ShopperApproved/Helper/Data.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
|
10 |
+
class ShprAprvd_ShopperApproved_Helper_Data extends Mage_Core_Helper_Abstract
|
11 |
+
{
|
12 |
+
public function getAccountId()
|
13 |
+
{
|
14 |
+
return Mage::getStoreConfig('shpraprvd/shopperapproved/account_id');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getEnabled()
|
18 |
+
{
|
19 |
+
return (bool)Mage::getStoreConfig('shpraprvd/shopperapproved/enabled');
|
20 |
+
}
|
21 |
+
|
22 |
+
public function getAccountToken()
|
23 |
+
{
|
24 |
+
return Mage::getStoreConfig('shpraprvd/shopperapprovedschema/account_token');
|
25 |
+
}
|
26 |
+
}
|
app/code/community/ShprAprvd/ShopperApproved/etc/adminhtml.xml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<acl>
|
3 |
+
<resources>
|
4 |
+
<admin>
|
5 |
+
<children>
|
6 |
+
<system>
|
7 |
+
<children>
|
8 |
+
<config>
|
9 |
+
<children>
|
10 |
+
<shpraprvd translate="label" module="shopperapproved">
|
11 |
+
<title>ShprAprvd - All</title>
|
12 |
+
</shpraprvd>
|
13 |
+
</children>
|
14 |
+
</config>
|
15 |
+
</children>
|
16 |
+
</system>
|
17 |
+
</children>
|
18 |
+
</admin>
|
19 |
+
</resources>
|
20 |
+
</acl>
|
21 |
+
</config>
|
app/code/community/ShprAprvd/ShopperApproved/etc/config.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
-->
|
10 |
+
<config>
|
11 |
+
<modules>
|
12 |
+
<ShprAprvd_ShopperApproved>
|
13 |
+
<version>1.0.0</version>
|
14 |
+
</ShprAprvd_ShopperApproved>
|
15 |
+
</modules>
|
16 |
+
<global>
|
17 |
+
<blocks>
|
18 |
+
<shopperapproved>
|
19 |
+
<class>ShprAprvd_ShopperApproved_Block</class>
|
20 |
+
</shopperapproved>
|
21 |
+
</blocks>
|
22 |
+
<helpers>
|
23 |
+
<shopperapproved>
|
24 |
+
<class>ShprAprvd_ShopperApproved_Helper</class>
|
25 |
+
</shopperapproved>
|
26 |
+
</helpers>
|
27 |
+
</global>
|
28 |
+
<frontend>
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<shopperapproved>
|
32 |
+
<file>shopperapproved.xml</file>
|
33 |
+
</shopperapproved>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
</frontend>
|
37 |
+
</config>
|
app/code/community/ShprAprvd/ShopperApproved/etc/system.xml
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ShopperApproved Module for Magento
|
5 |
+
* @package ShprAprvd_ShopperApproved
|
6 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
8 |
+
* @license Open Software License
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
<config>
|
12 |
+
<tabs>
|
13 |
+
<shpraprvd translate="label" module="shopperapproved">
|
14 |
+
<label>Shopper Approved<![CDATA[®]]></label>
|
15 |
+
<sort_order>100</sort_order>
|
16 |
+
</shpraprvd>
|
17 |
+
</tabs>
|
18 |
+
<sections>
|
19 |
+
<shpraprvd translate="label" module="shopperapproved">
|
20 |
+
<label>Settings</label>
|
21 |
+
<tab>shpraprvd</tab>
|
22 |
+
<sort_order>1000</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<groups>
|
27 |
+
<!--<getting_started_1 translate="label" module="shopperapproved">
|
28 |
+
<label>Getting Started</label>
|
29 |
+
<frontend_type>text</frontend_type>
|
30 |
+
<sort_order>10</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
<expanded>1</expanded>
|
35 |
+
<comment><![CDATA[Welcome to the ShopperApproved setup. If you have not already setup an account then click below on<a onclick="Fieldset.toggleCollapse('shpraprvd_getting_started_2', ''); return false;" href="#" id="shpraprvd_getting_started_2-head" class="open">"No Previous Account"</a>.<br /><br />If you already have an account then<a href="https://www.shopperapproved.com/contact-us.php" target="_blank">click here to open a ticket</a>.<br />Send To: General Department<br />Title: Affiliate Credit for 18393<br />Message: We have setup the Magento ShopperApproved module and are requesting you credit affiliate 18393.<br /><br />Once complete with requesting the affiliate credit, click on<a onclick="Fieldset.toggleCollapse('shpraprvd_shopperapproved_setup', ''); return false;" href="#" id="shpraprvd_shopperapproved_setup-head" class="open">"ShopperApproved Setup"</a> below.]]></comment>
|
36 |
+
</getting_started_1>-->
|
37 |
+
<getting_started_2 translate="label" module="shopperapproved">
|
38 |
+
<label>No Previous Account</label>
|
39 |
+
<frontend_type>text</frontend_type>
|
40 |
+
<sort_order>10</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>1</show_in_store>
|
44 |
+
<expanded>1</expanded>
|
45 |
+
<comment><![CDATA[Don't have a Shopper Approved® account yet? No problem, just <a target="_blank" href="http://www.shopperapproved.com/">click here</a> to set it up and then come back to this page.]]></comment>
|
46 |
+
</getting_started_2>
|
47 |
+
<shopperapproved translate="label" module="shopperapproved">
|
48 |
+
<label>Shopper Approved<![CDATA[®]]> Setup</label>
|
49 |
+
<frontend_type>text</frontend_type>
|
50 |
+
<sort_order>20</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
<expanded>0</expanded>
|
55 |
+
<fields>
|
56 |
+
<enabled translate="label">
|
57 |
+
<label>Enable Module:</label>
|
58 |
+
<comment>Enable or disable Shopper Approved<![CDATA[®]]> Initial Survey.</comment>
|
59 |
+
<frontend_type>select</frontend_type>
|
60 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
61 |
+
<sort_order>10</sort_order>
|
62 |
+
<show_in_default>1</show_in_default>
|
63 |
+
<show_in_website>1</show_in_website>
|
64 |
+
<show_in_store>1</show_in_store>
|
65 |
+
</enabled>
|
66 |
+
<account_id translate="label">
|
67 |
+
<label>Shopper Approved<![CDATA[®]]> ID: </label>
|
68 |
+
<comment><![CDATA[You can find your Shopper Approved ID by going to <a href="https://www.shopperapproved.com/members/code.php?page=thankyou" target="_blank">this link</a> and looking at the "Link to Full Survey". At the end of the link you should see ?id=XXXX, enter the ID above.]]></comment>
|
69 |
+
<frontend_type>text</frontend_type>
|
70 |
+
<sort_order>20</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>1</show_in_store>
|
74 |
+
</account_id>
|
75 |
+
</fields>
|
76 |
+
</shopperapproved>
|
77 |
+
<shopperapprovedschema translate="label" module="shopperapproved">
|
78 |
+
<label>Search Engine Schema Code</label>
|
79 |
+
<frontend_type>text</frontend_type>
|
80 |
+
<sort_order>30</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>1</show_in_website>
|
83 |
+
<show_in_store>1</show_in_store>
|
84 |
+
<expanded>0</expanded>
|
85 |
+
<fields>
|
86 |
+
<account_token translate="label">
|
87 |
+
<label>Shopper Approved<![CDATA[®]]> Token: </label>
|
88 |
+
<comment><![CDATA[This will add the Schema code to all pages except your homepage allowing the search engines to put your ratings and stars directly in the search.<br /><i>Note: You can find your token inside your Shopper Approved Member area under Advanced Tools --> API.</i>]]></comment>
|
89 |
+
<frontend_type>text</frontend_type>
|
90 |
+
<sort_order>20</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
</account_token>
|
95 |
+
</fields>
|
96 |
+
</shopperapprovedschema>
|
97 |
+
</groups>
|
98 |
+
</shpraprvd>
|
99 |
+
</sections>
|
100 |
+
</config>
|
app/design/frontend/base/default/layout/shopperapproved.xml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ShopperApproved Module for Magento
|
5 |
+
* @package ShprAprvd_ShopperApproved
|
6 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
8 |
+
* @license Open Software License
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
<!--<layout>
|
12 |
+
<default>
|
13 |
+
<reference name="before_body_end">
|
14 |
+
<block type="shopperapproved/schema" name="shopperapproved" template="shopperapproved/schema.phtml"/>
|
15 |
+
</reference>
|
16 |
+
</default>
|
17 |
+
</layout>-->
|
18 |
+
<layout>
|
19 |
+
<default>
|
20 |
+
<reference name="before_body_end">
|
21 |
+
<block type="shopperapproved/schema" name="shopperapproved" as="shopperapproved" template="shopperapproved/schema.phtml"/>
|
22 |
+
</reference>
|
23 |
+
<reference name="head">
|
24 |
+
<block type="core/text" name="custom_css">
|
25 |
+
<action method="setText">
|
26 |
+
<text><![CDATA[
|
27 |
+
<style type="text/css">
|
28 |
+
.saSchema {
|
29 |
+
display: block;
|
30 |
+
font-size: 9px;
|
31 |
+
text-align: center;
|
32 |
+
width: 100%;
|
33 |
+
position: relative;
|
34 |
+
z-index: 999;
|
35 |
+
margin: -40px 0px 0px 0px;
|
36 |
+
}
|
37 |
+
body.cms-home .saSchema, body.cms-index-index .saSchema{
|
38 |
+
display: none;
|
39 |
+
}
|
40 |
+
</style> ]]>
|
41 |
+
</text>
|
42 |
+
</action>
|
43 |
+
</block>
|
44 |
+
</reference>
|
45 |
+
</default>
|
46 |
+
<checkout_multishipping_success>
|
47 |
+
<reference name="before_body_end">
|
48 |
+
<block type="shopperapproved/script" name="shopperapproved" as="shopperapproved" template="shopperapproved/script.phtml"/>
|
49 |
+
</reference>
|
50 |
+
</checkout_multishipping_success>
|
51 |
+
<checkout_onepage_success>
|
52 |
+
<reference name="before_body_end">
|
53 |
+
<block type="shopperapproved/script" name="shopperapproved" as="shopperapproved" template="shopperapproved/script.phtml"/>
|
54 |
+
</reference>
|
55 |
+
</checkout_onepage_success>
|
56 |
+
</layout>
|
app/design/frontend/base/default/template/shopperapproved/schema.phtml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<?php if($this->getSetting('enabled')) { ?>
|
11 |
+
<p class="saSchema">
|
12 |
+
<?php
|
13 |
+
ini_set('default_socket_timeout', 3);
|
14 |
+
$schemaURL = "https://www.shopperapproved.com/feeds/schema.php/?siteid=" . $this->getSetting('account') . "&token=" . $this->getSetting('token');
|
15 |
+
//echo $schemaURL;
|
16 |
+
echo file_get_contents($schemaURL);
|
17 |
+
?>
|
18 |
+
</p>
|
19 |
+
<?php } ?>
|
app/design/frontend/base/default/template/shopperapproved/script.phtml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopperApproved Module for Magento
|
4 |
+
* @package ShprAprvd_ShopperApproved
|
5 |
+
* @author ShprAprvd (http://www.shopperapproved.com/)
|
6 |
+
* @copyright Copyright (c) 2014 ShprAprvd (http://www.shopperapproved.com/)
|
7 |
+
* @license Open Software License
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
|
11 |
+
<?php if($this->getSetting('enabled')) { ?>
|
12 |
+
<script type="text/javascript"> var sa_values = { 'site':<?php echo $this->getSetting('account'); ?>, 'orderid':'<?php echo $this->getSetting('orderid'); ?>', 'name':'<?php echo $this->getSetting('name'); ?>', 'email':'<?php echo $this->getSetting('email'); ?>', 'country':'<?php echo $this->getSetting('country'); ?>', 'state':'<?php echo $this->getSetting('state'); ?>' }; function saLoadScript(src) { var js = window.document.createElement("script"); js.src = src; js.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(js); } var d = new Date(); if (d.getTime() - 172800000 > 1427423361000) saLoadScript("//www.shopperapproved.com/thankyou/rate/<?php echo $this->getSetting('account'); ?>.js"); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/<?php echo $this->getSetting('account'); ?>.js?d=" + d.getTime()); </script>
|
13 |
+
<?php } ?>
|
app/etc/modules/ShprAprvd_ShopperApproved.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<ShprAprvd_ShopperApproved>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</ShprAprvd_ShopperApproved>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ShprAprvd_ShopperApproved</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/OSL-3.0">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Customer ratings and reviews integration with Shopper Approved. Build reputation with customer surveys. </summary>
|
10 |
+
<description><p>Customer ratings and reviews integration with Shopper Approved. Boost traffic, profits, and online reputation with customer satisfaction surveys. Adds an on-page popup on checkout success to complete a short survey about the customers shopping experience with the option to complete a follow up survey after the goods are delivered.</p>
|
11 |
+
<p><a href="http://www.shopperapproved.com/18393">Learn more about Shopper Approved here.</a></p>
|
12 |
+
<p>Reviews are syndicated across Google, Bing, and Yahoo giving your site better visibility in organic and paid search results. Shopper Approved is the “all-in-one” system that completely automates the collection, management, and online promotion of customer ratings and reviews on your website, on social media sites, and in the major search engines. The more reviews collected, the more positive direct impact you can have on new potential customers buying decisions.</p>
|
13 |
+
<p><a href="http://www.shopperapproved.com/18393">Learn more about Shopper Approved here.</a></p>
|
14 |
+
<p>Super Fast Setup, be actively collecting ratings in 5 minutes. You don't need any special technical skills, and there are no files to upload or complicated databases to install or manage. All you have to do is add the Magento extension and enter your Shopper Approved ID and you'll be actively collecting ratings and reviews.</p>
|
15 |
+
<p><a href="http://www.shopperapproved.com/18393">Learn more about Shopper Approved here.</a></p></description>
|
16 |
+
<notes>Add Search Engine Schema Code</notes>
|
17 |
+
<authors><author><name>Shopper Approved</name><user>ShprAprvd</user><email>aubreybarker@gmail.com</email></author></authors>
|
18 |
+
<date>2015-03-31</date>
|
19 |
+
<time>04:22:03</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="ShprAprvd"><dir name="ShopperApproved"><dir name="Block"><file name="Script.php" hash="c26b8c21d5453a8ec0a70f27cb23aa8c"/><file name="Schema.php" hash="40ddd9967b68989159636dcd1c961f76"/></dir><dir name="Helper"><file name="Data.php" hash="3b4e2552938727f35bd0efa7876fecee"/></dir><dir name="etc"><file name="config.xml" hash="91fa9d1c8deba90aa127d1e978d959a0"/><file name="system.xml" hash="4a6130d691fa4ae0cdd5e878f5354075"/><file name="adminhtml.xml" hash="c9798475d4287bf86c0669d4ca46095f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shopperapproved.xml" hash="ff3677fa1c64458746af72125ed607e7"/></dir><dir name="template"><dir name="shopperapproved"><file name="script.phtml" hash="03b6881229124dc31ad1168da5a91d24"/><file name="schema.phtml" hash="083c348a9fbf82228eb9ac17f73249f1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ShprAprvd_ShopperApproved.xml" hash="eccf9347cb9cb379ef66fab53ef4a78c"/></dir></target></contents>
|
21 |
+
<compatible/>
|
22 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
+
</package>
|