Magmodules_Kiyohsnippets - Version 1.0.0

Version Notes

Kiyoh Snippets

Download this release

Release Info

Developer Magento Core Team
Extension Magmodules_Kiyohsnippets
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Magmodules/Core/Block/Adminhtml/System/Config/Form/Field/Heading.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magmodules.eu
4
+ * Http://www.magmodules.eu
5
+ * ========================
6
+ * @category Magmodules
7
+ * @package Magmodules_Core
8
+ * @author Magmodules <info@magmodules.eu)
9
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
10
+ * @license http://www.magmodules.eu/license-agreement/ [ Single domain license ]
11
+ */
12
+
13
+ class Magmodules_Core_Block_Adminhtml_System_Config_Form_Field_Heading extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
14
+ {
15
+
16
+ public function render(Varien_Data_Form_Element_Abstract $element)
17
+ {
18
+ $useContainerId = $element->getData('use_container_id');
19
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4>%s</h4></td></tr>',
20
+ $element->getHtmlId(), $element->getLabel()
21
+ );
22
+ }
23
+ }
app/code/local/Magmodules/Core/etc/config.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magmodules.eu
5
+ * Http://www.magmodules.eu
6
+ * ========================
7
+ * @category Magmodules
8
+ * @package Magmodules_Core
9
+ * @author Magmodules <info@magmodules.eu)
10
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
11
+ * @license http://www.magmodules.eu/license-agreement/ [ Single domain license ]
12
+ */
13
+ -->
14
+ <config>
15
+ <modules>
16
+ <Magmodules_Core>
17
+ <version>1.0.0</version>
18
+ </Magmodules_Core>
19
+ </modules>
20
+ <global>
21
+ <blocks>
22
+ <magmodules_core>
23
+ <class>Magmodules_Core_Block_Adminhtml</class>
24
+ </magmodules_core>
25
+ </blocks>
26
+ </global>
27
+ <adminhtml>
28
+ <layout>
29
+ <updates>
30
+ <magmodulescore>
31
+ <file>magmodules/core.xml</file>
32
+ </magmodulescore>
33
+ </updates>
34
+ </layout>
35
+ <translate>
36
+ <modules>
37
+ <Magmodules_Core>
38
+ <files>
39
+ <default>Magmodules_Core.csv</default>
40
+ </files>
41
+ </Magmodules_Core>
42
+ </modules>
43
+ </translate>
44
+ </adminhtml>
45
+ </config>
app/code/local/Magmodules/Core/etc/system.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magmodules.eu
5
+ * Http://www.magmodules.eu
6
+ * ========================
7
+ * @category Magmodules
8
+ * @package Magmodules_Core
9
+ * @author Magmodules <info@magmodules.eu)
10
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
11
+ * @license http://www.magmodules.eu/license-agreement/ [ Single domain license ]
12
+ */
13
+ -->
14
+ <config>
15
+ <tabs>
16
+ <magmodules>
17
+ <label>Magmodules</label>
18
+ <sort_order>200</sort_order>
19
+ </magmodules>
20
+ </tabs>
21
+ </config>
app/code/local/Magmodules/Kiyohsnippets/Block/Snippets.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magmodules.eu
4
+ * http://www.magmodules.eu
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@magmodules.eu so we can send you a copy immediately.
15
+ *
16
+ * @category Magmodules
17
+ * @package Magmodules_Kiyohsnippets
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Magmodules_Kiyohsnippets_Block_Snippets extends Mage_Core_Block_Template {
24
+
25
+ protected function _construct()
26
+ {
27
+ if(Mage::getStoreConfig('kiyohsnippets/api/enabled')) {
28
+ $this->setSnippetsEnabled(1);
29
+ } else {
30
+ $this->setSnippetsEnabled(0);
31
+ }
32
+
33
+ parent::_construct();
34
+ $this->setTemplate('magmodules/kiyohsnippets/block.phtml');
35
+ }
36
+
37
+ public function getSnapshopRequest()
38
+ {
39
+ return $this->helper('kiyohsnippets')->getSnapshopRequest();
40
+ }
41
+
42
+ public function getKiyohLink()
43
+ {
44
+ return $this->helper('kiyohsnippets')->getKiyohLink();
45
+ }
46
+
47
+ public function getShopName()
48
+ {
49
+ return Mage::getStoreConfig('kiyohsnippets/api/shop_name');
50
+ }
51
+
52
+ public function getKiyohStars($rating)
53
+ {
54
+ return $this->helper('kiyohsnippets')->getKiyohStars($rating);
55
+ }
56
+
57
+ }
app/code/local/Magmodules/Kiyohsnippets/Helper/Data.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magmodules.eu
4
+ * http://www.magmodules.eu
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@magmodules.eu so we can send you a copy immediately.
15
+ *
16
+ * @category Magmodules
17
+ * @package Magmodules_Kiyohsnippets
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Magmodules_Kiyohsnippets_Helper_Data extends Mage_Core_Helper_Abstract {
24
+
25
+ function getSnapshopRequest()
26
+ {
27
+ $kiyoh_shop_id = Mage::getStoreConfig('kiyohsnippets/api/shop_id');
28
+ $filename = 'https://www.kiyoh.nl/widgetfeed.php?company=';
29
+
30
+ if($kiyoh_shop_id) {
31
+ $xml = simplexml_load_file($filename . $kiyoh_shop_id);
32
+ if($xml) {
33
+ $data = $xml->channel->description;
34
+ $snippets = array();
35
+
36
+ // AVARAGE SCORE
37
+ if (preg_match("/[0-9]+%/", $data, $matches)) {
38
+ $snippets['avg'] = substr($matches[0], 0, -1);
39
+ }
40
+
41
+ // NUMBER OF REVIEWS
42
+ $pieces = explode(' ', $data);
43
+ $snippets['qty'] = array_pop($pieces);
44
+
45
+ // SHOPNAME
46
+ $snippets['shopname'] = 'shopname';
47
+
48
+ return $snippets;
49
+ } else {
50
+ return false;
51
+ }
52
+ } else {
53
+ return false;
54
+ }
55
+ }
56
+
57
+ function getKiyohLink() {
58
+ if(Mage::getStoreConfig('kiyohsnippets/api/show_link')) {
59
+ $kiyoh_link = Mage::getStoreConfig('kiyohsnippets/api/kiyoh_link');
60
+ return Mage::helper('kiyohsnippets')->__('on') . ' <a href="' . $kiyoh_link . '" target="_blank">Kiyoh</a>';
61
+ } else {
62
+ return false;
63
+ }
64
+ }
65
+
66
+ function getKiyohStars($rating)
67
+ {
68
+ if(Mage::getStoreConfig('kiyohsnippets/api/show_stars')) {
69
+ $perc = $rating;
70
+ $html = '<div class="rating-box">';
71
+ $html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
72
+ $html .= '</div>';
73
+ return $html;
74
+ } else {
75
+ return false;
76
+ }
77
+ }
78
+
79
+ }
app/code/local/Magmodules/Kiyohsnippets/etc/adminhtml.xml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magmodules.eu
5
+ * http://www.magmodules.eu
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to info@magmodules.eu so we can send you a copy immediately.
16
+ *
17
+ * @category Magmodules
18
+ * @package Magmodules_Kiyohsnippets
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <acl>
26
+ <resources>
27
+ <admin>
28
+ <children>
29
+ <system>
30
+ <children>
31
+ <config>
32
+ <children>
33
+ <kiyohsnippets translate="title" module="kiyohsnippets">
34
+ <title>Kiyoh Snippets</title>
35
+ </kiyohsnippets>
36
+ </children>
37
+ </config>
38
+ </children>
39
+ </system>
40
+ </children>
41
+ </admin>
42
+ </resources>
43
+ </acl>
44
+ </config>
app/code/local/Magmodules/Kiyohsnippets/etc/config.xml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magmodules.eu
5
+ * http://www.magmodules.eu
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to info@magmodules.eu so we can send you a copy immediately.
16
+ *
17
+ * @category Magmodules
18
+ * @package Magmodules_Kiyohsnippets
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <modules>
26
+ <Magmodules_Kiyohsnippets>
27
+ <version>1.0.0</version>
28
+ </Magmodules_Kiyohsnippets>
29
+ </modules>
30
+ <global>
31
+ <helpers>
32
+ <kiyohsnippets>
33
+ <class>Magmodules_Kiyohsnippets_Helper</class>
34
+ </kiyohsnippets>
35
+ </helpers>
36
+ <blocks>
37
+ <kiyohsnippets>
38
+ <class>Magmodules_Kiyohsnippets_Block</class>
39
+ </kiyohsnippets>
40
+ </blocks>
41
+ </global>
42
+ <frontend>
43
+ <layout>
44
+ <updates>
45
+ <magmodules_kiyohsnippets>
46
+ <file>magmodules_kiyohsnippets.xml</file>
47
+ </magmodules_kiyohsnippets>
48
+ </updates>
49
+ </layout>
50
+ <translate>
51
+ <modules>
52
+ <magmodules_kiyohsnippets>
53
+ <files>
54
+ <default>Magmodules_Kiyohsnippets.csv</default>
55
+ </files>
56
+ </magmodules_kiyohsnippets>
57
+ </modules>
58
+ </translate>
59
+ </frontend>
60
+ <adminhtml>
61
+ <translate>
62
+ <modules>
63
+ <magmodules_kiyohsnippets>
64
+ <files>
65
+ <default>Magmodules_Kiyohsnippets.csv</default>
66
+ </files>
67
+ </magmodules_kiyohsnippets>
68
+ </modules>
69
+ </translate>
70
+ </adminhtml>
71
+ <default>
72
+ <kiyoh_snippets>
73
+ <general>
74
+ <enabled>0</enabled>
75
+ </general>
76
+ </kiyoh_snippets>
77
+ </default>
78
+ </config>
app/code/local/Magmodules/Kiyohsnippets/etc/system.xml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magmodules.eu
5
+ * http://www.magmodules.eu
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to info@magmodules.eu so we can send you a copy immediately.
16
+ *
17
+ * @category Magmodules
18
+ * @package Magmodules_Kiyohsnippets
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <tabs>
26
+ <magmodules translate="label" module="kiyohsnippets">
27
+ <label>Magmodules</label>
28
+ <sort_order>200</sort_order>
29
+ </magmodules>
30
+ </tabs>
31
+ <sections>
32
+ <kiyohsnippets translate="label" module="kiyohsnippets">
33
+ <label>Kiyoh Snippets</label>
34
+ <tab>magmodules</tab>
35
+ <header_css>mm-moduleheader</header_css>
36
+ <frontend_type>text</frontend_type>
37
+ <sort_order>40</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ <groups>
42
+ <api translate="label" module="kiyohsnippets">
43
+ <label>General configuration</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>2</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
+ <expanded>1</expanded>
50
+ <comment>
51
+ <![CDATA[<p style="padding: 5px; border: 1px solid #ccc">Use: {{block type="kiyohsnippets/snippets" name="kiyohsnippets"}} to call the block on the homepage</p>]]>
52
+ </comment>
53
+ <fields>
54
+ <enabled translate="label">
55
+ <label>Enabled</label>
56
+ <frontend_type>select</frontend_type>
57
+ <source_model>adminhtml/system_config_source_yesno</source_model>
58
+ <sort_order>1</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ </enabled>
63
+ <heading_api translate="label">
64
+ <label>Shop ID</label>
65
+ <frontend_model>magmodules_core/system_config_form_field_heading</frontend_model>
66
+ <sort_order>2</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </heading_api>
71
+ <shop_id translate="label">
72
+ <label>Shop ID</label>
73
+ <frontend_type>text</frontend_type>
74
+ <sort_order>3</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
+ </shop_id>
79
+ <heading_design translate="label">
80
+ <label>Design</label>
81
+ <frontend_model>magmodules_core/system_config_form_field_heading</frontend_model>
82
+ <sort_order>5</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ </heading_design>
87
+ <shop_name translate="label">
88
+ <label>Shopname</label>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>6</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
+ </shop_name>
95
+ <show_stars translate="label">
96
+ <label>Show Stars</label>
97
+ <frontend_type>select</frontend_type>
98
+ <source_model>adminhtml/system_config_source_yesno</source_model>
99
+ <sort_order>7</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ </show_stars>
104
+ <show_link translate="label">
105
+ <label>Show Link to Kiyoh</label>
106
+ <frontend_type>select</frontend_type>
107
+ <source_model>adminhtml/system_config_source_yesno</source_model>
108
+ <sort_order>8</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
+ </show_link>
113
+ <kiyoh_link translate="label">
114
+ <label>Kiyoh Link</label>
115
+ <frontend_type>text</frontend_type>
116
+ <sort_order>9</sort_order>
117
+ <show_in_default>1</show_in_default>
118
+ <show_in_website>1</show_in_website>
119
+ <show_in_store>1</show_in_store>
120
+ <depends><show_link>1</show_link></depends>
121
+ </kiyoh_link>
122
+ </fields>
123
+ </api>
124
+ </groups>
125
+ </kiyohsnippets>
126
+ </sections>
127
+ </config>
app/design/frontend/base/default/layout/magmodules_kiyohsnippets.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <cms_index_index>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>magmodules/kiyohsnippets/style.css</stylesheet></action>
6
+ </reference>
7
+ </cms_index_index>
8
+ </layout>
app/design/frontend/base/default/template/magmodules/kiyohsnippets/block.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magmodules.eu
4
+ * http://www.magmodules.eu
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@magmodules.eu so we can send you a copy immediately.
15
+ *
16
+ * @category Magmodules
17
+ * @package Magmodules_Kiyohsnippets
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ if($this->getSnippetsEnabled()) {
24
+ $snippets = $this->getSnapshopRequest();
25
+ $kiyohlink = $this->getKiyohLink();
26
+ $shopname = $this->getShopname();
27
+ if($snippets) {
28
+ ?>
29
+ <div class="kiyoh-shop-snippets">
30
+ <?php echo $this->getKiyohStars($snippets['avg']); ?>
31
+ <div class="kiyoh-schema" itemscope="itemscope" itemtype="http://schema.org/Product">
32
+ <meta itemprop="name" content="<?php echo $shopname; ?>">
33
+ <div itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
34
+ <meta itemprop="bestRating" content="100">
35
+ <p><?php echo Mage::helper('kiyohsnippets')->__('Rating %s based on %s customer reviews', '<span itemprop="ratingValue">' . $snippets['avg'] . '</span>%', '<span itemprop="reviewCount">' . $snippets['qty'] . '</span>') ?> <?php echo $kiyohlink; ?> </p>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <?php } ?>
40
+ <?php } ?>
app/etc/modules/Magmodules_Core.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magmodules_Core>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Magmodules_Core>
8
+ </modules>
9
+ </config>
app/etc/modules/Magmodules_Kiyohsnippets.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magmodules_Kiyohsnippets>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Magmodules_Kiyohsnippets>
8
+ </modules>
9
+ </config>
app/locale/en_US/Magmodules_Kiyohsnippets.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ "Design","Design"
2
+ "Shopname","Shopname"
3
+ "Show Stars","Show Stars"
4
+ "Show Link to Kiyoh","Show Link to Kiyoh"
5
+ "Kiyoh Link","Kiyoh Link"
6
+ "on","on"
7
+ "Shop ID","Shop ID"
8
+ "Rating %s based on %s customer reviews","Rating %s based on %s customer reviews"
9
+ "Use: {{block type="kiyohsnippets/snippets" name="kiyohsnippets"}} to call the block on the homepage","Use: {{block type="kiyohsnippets/snippets" name="kiyohsnippets"}} to call the block on the homepage"
app/locale/nl_NL/Magmodules_Kiyohsnippets.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ "Design","Ontwerp"
2
+ "Shopname","Winkelnaam"
3
+ "Show Stars","Toon Sterren"
4
+ "Show Link to Kiyoh","Toon link naar Kiyoh"
5
+ "Kiyoh Link","Kiyoh link"
6
+ "on","op"
7
+ "Shop ID","Winkel ID"
8
+ "Rating %s based on %s customer reviews","Beoordeling %s gebaseerd op %s individuele klant beoordelingen"
9
+ "Use: {{block type=""kiyohsnippets/snippets" name=""kiyohsnippets""}} to call the block on the homepage","Gebruik: {{block type=""kiyohsnippets/snippets"" name=""kiyohsnippets""}} om het Rich Snippets blok op de homepage te plaatsen"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Magmodules_Kiyohsnippets</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Add Kiyoh rich snippets to Magento Homepage</summary>
10
+ <description>Add Kiyoh rich snippets to Magento Homepage</description>
11
+ <notes>Kiyoh Snippets</notes>
12
+ <authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.nl</email></author></authors>
13
+ <date>2014-03-19</date>
14
+ <time>15:58:31</time>
15
+ <contents><target name="magelocal"><dir name="Magmodules"><dir name="Kiyohsnippets"><dir name="Block"><file name="Snippets.php" hash="01f1fda7f593accb9ae8a81aeed7cc2c"/></dir><dir name="Helper"><file name="Data.php" hash="b6d8176c1d9506413fbc179cf3e95cc0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="deebba0af25cc03f79742c36b4c12203"/><file name="config.xml" hash="21f1917bc4a3fbfa0750014dd5e082b1"/><file name="system.xml" hash="e00db72d4b7ec2d464f1067e92a2b3d9"/></dir></dir><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Heading.php" hash="225f6b0c38c0416999bca84ed585f8a0"/></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="00d42a8d48f8990f6df2baf5e35227cc"/><file name="system.xml" hash="a6af45002ccaf73cca5bdff49704d100"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_kiyohsnippets.xml" hash="ff4cecb86f54f809dca5d1fd40b58b1a"/></dir><dir name="template"><dir name="magmodules"><dir name="kiyohsnippets"><file name="block.phtml" hash="c0f9ba1557b5070cb5790091232a6d4e"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="magmodules"><file name="comments.png" hash="f187231e161acd185dbb918c8d9b7b6d"/><file name="logo-small.png" hash="b7f5334665d500cd6068a0ce55cd6d74"/></dir></dir><file name="magmodules.css" hash="7cd6b3eca521f94eba537d89e772fc9c"/></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="magmodules"><dir name="kiyohsnippets"><dir name="images"><file name="bkg_rating.gif" hash="0a8777c815350ddf1e316a537ad0c335"/></dir><file name="style.css" hash="be40fa36dd6bb6c3bdfdedb569e5932c"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Magmodules_Kiyohsnippets.csv" hash="5150919e5bbe895d7f52ea2d8c5c9fbb"/></dir><dir name="nl_NL"><file name="Magmodules_Kiyohsnippets.csv" hash="5f44c5752e32be0cc928da68034d0959"/></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Kiyohsnippets.xml" hash="71256b4e72ddf5170b139515dc80a54b"/><file name="Magmodules_Core.xml" hash="2697672510696f9cc390b995103c89c7"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>
skin/adminhtml/default/default/images/magmodules/comments.png ADDED
Binary file
skin/adminhtml/default/default/images/magmodules/logo-small.png ADDED
Binary file
skin/adminhtml/default/default/magmodules.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magmodules.eu
3
+ * http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-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 info@magmodules.eu so we can send you a copy immediately.
14
+ *
15
+ * @category Magmodules
16
+ * @package Magmodules_Core
17
+ * @author Magmodules <info@magmodules.eu>
18
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ h3.mm-moduleheader {
23
+ background: url("images/magmodules/logo-small.png") no-repeat scroll 4px 0 transparent;
24
+ padding: 18px 0 2px 160px;
25
+ height: 20px;
26
+ font-size: 16px;
27
+ color: #6C6C6C;
28
+ }
29
+
30
+ p.mm-info {
31
+ border: 1px solid #ccc;
32
+ padding: 5px;
33
+ }
34
+
35
+ a.magtooltip span {
36
+ display:none;
37
+ padding:2px 3px;
38
+ margin-left:8px;
39
+ width:550px;
40
+ }
41
+
42
+ a.magtooltip:hover span {
43
+ display:inline;
44
+ position:absolute;
45
+ background:#ffffff;
46
+ border:1px solid #cccccc;
47
+ color:#6c6c6c;
48
+ }
49
+
50
+ .magtooltip hr {
51
+ height:1px;
52
+ border: 1px dotted #606;
53
+ }
skin/frontend/base/default/magmodules/kiyohsnippets/images/bkg_rating.gif ADDED
Binary file
skin/frontend/base/default/magmodules/kiyohsnippets/style.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magmodules.eu
3
+ * http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-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 info@magmodules.eu so we can send you a copy immediately.
14
+ *
15
+ * @category Magmodules
16
+ * @package Magmodules_Kiyohsnippets
17
+ * @author Magmodules <info@magmodules.eu)
18
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ .kiyoh-shop-snippets .rating-box {
23
+ float: left;
24
+ margin-right: 4px;
25
+ margin-top: 0px;
26
+ width:69px;
27
+ height:13px;
28
+ font-size:0;
29
+ line-height:0;
30
+ background:url('images/bkg_rating.gif') 0 0 repeat-x;
31
+ text-indent:-999em;
32
+ overflow:hidden;
33
+ }
34
+
35
+ .kiyoh-shop-snippets .rating {
36
+ float:left;
37
+ height:13px;
38
+ background:url('images/bkg_rating.gif') 0 100% repeat-x;
39
+ }
40
+
41
+ /** FOR DEFAULT USE OF RATING STARTS, REMOVE BOTH CLASSES FROM CSS **/