Version Notes
Ekomi Snippets
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magmodules_Ekomisnippets |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1.0
- app/code/local/Magmodules/Core/Block/Adminhtml/System/Config/Form/Field/Heading.php +11 -6
- app/code/local/Magmodules/Core/Block/Adminhtml/Versions.php +72 -0
- app/code/local/Magmodules/Core/Block/Adminhtml/Widget/Info/Info.php +56 -0
- app/code/local/Magmodules/Core/Helper/Data.php +20 -0
- app/code/local/Magmodules/Core/etc/adminhtml.xml +42 -0
- app/code/local/Magmodules/Core/etc/config.xml +40 -8
- app/code/local/Magmodules/Core/etc/system.xml +42 -7
- app/code/local/Magmodules/Ekomisnippets/Block/Adminhtml/Widget/Info/Info.php +55 -0
- app/code/local/Magmodules/Ekomisnippets/Block/Snippets.php +16 -26
- app/code/local/Magmodules/Ekomisnippets/Helper/Data.php +18 -19
- app/code/local/Magmodules/Ekomisnippets/Model/System/Config/Flushcache.php +28 -0
- app/code/local/Magmodules/Ekomisnippets/etc/adminhtml.xml +3 -3
- app/code/local/Magmodules/Ekomisnippets/etc/config.xml +9 -4
- app/code/local/Magmodules/Ekomisnippets/etc/system.xml +24 -18
- app/design/adminhtml/default/default/layout/magmodules_core.xml +30 -0
- app/design/frontend/base/default/layout/magmodules_ekomisnippets.xml +3 -3
- app/design/frontend/base/default/template/magmodules/ekomisnippets/block.phtml +5 -15
- package.xml +6 -6
- skin/frontend/base/default/magmodules/ekomisnippets.css +0 -9
- skin/frontend/base/default/magmodules/ekomisnippets/style.css +30 -0
app/code/local/Magmodules/Core/Block/Adminhtml/System/Config/Form/Field/Heading.php
CHANGED
@@ -1,13 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
*
|
5 |
-
*
|
|
|
|
|
|
|
|
|
6 |
* @category Magmodules
|
7 |
* @package Magmodules_Core
|
8 |
-
* @author Magmodules <info@magmodules.eu
|
9 |
-
* @copyright Copyright (c)
|
10 |
-
* @license http://www.magmodules.eu/license-agreement/
|
|
|
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
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
* @category Magmodules
|
11 |
* @package Magmodules_Core
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
*/
|
17 |
|
18 |
class Magmodules_Core_Block_Adminhtml_System_Config_Form_Field_Heading extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
app/code/local/Magmodules/Core/Block/Adminhtml/Versions.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Core
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Core_Block_Adminhtml_Versions extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
19 |
+
{
|
20 |
+
|
21 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
22 |
+
{
|
23 |
+
$html = $this->_getHeaderHtml($element);
|
24 |
+
$modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
|
25 |
+
sort($modules);
|
26 |
+
|
27 |
+
foreach($modules as $moduleName) {
|
28 |
+
|
29 |
+
if(strstr($moduleName, 'Magmodules_') === false) {
|
30 |
+
continue;
|
31 |
+
}
|
32 |
+
|
33 |
+
if($moduleName == 'Magmodules_Core'){
|
34 |
+
continue;
|
35 |
+
}
|
36 |
+
|
37 |
+
$html.= $this->_getFieldHtml($element, $moduleName);
|
38 |
+
}
|
39 |
+
$html .= $this->_getFooterHtml($element);
|
40 |
+
|
41 |
+
return $html;
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _getFieldRenderer()
|
45 |
+
{
|
46 |
+
if(empty($this->_fieldRenderer)) {
|
47 |
+
$this->_fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');
|
48 |
+
}
|
49 |
+
|
50 |
+
return $this->_fieldRenderer;
|
51 |
+
}
|
52 |
+
|
53 |
+
protected function _getFieldHtml($fieldset, $moduleCode)
|
54 |
+
{
|
55 |
+
$currentVer = Mage::getConfig()->getModuleConfig($moduleCode)->version;
|
56 |
+
|
57 |
+
if(!$currentVer) {
|
58 |
+
return '';
|
59 |
+
}
|
60 |
+
|
61 |
+
$moduleName = substr($moduleCode, strpos($moduleCode, '_') + 1);
|
62 |
+
|
63 |
+
$field = $fieldset->addField($moduleCode, 'label', array(
|
64 |
+
'name' => 'dummy',
|
65 |
+
'label' => $moduleName,
|
66 |
+
'value' => $currentVer,
|
67 |
+
))->setRenderer($this->_getFieldRenderer());
|
68 |
+
|
69 |
+
return $field->toHtml();
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
app/code/local/Magmodules/Core/Block/Adminhtml/Widget/Info/Info.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Webwinkelkeur
|
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_Core_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
24 |
+
|
25 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
26 |
+
{
|
27 |
+
$html = '<div style="background:url(\'http://www.magmodules.eu/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
|
28 |
+
<h4>About Magmodules.eu</h4>
|
29 |
+
<p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
|
30 |
+
<br />
|
31 |
+
<table width="500px" border="0">
|
32 |
+
<tr>
|
33 |
+
<td width="58%">View more extensions from us:</td>
|
34 |
+
<td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td>Question about this extension?</td>
|
38 |
+
<td><a href="http://www.magmodules.eu/contactus">Contact us</a></td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td> </td>
|
42 |
+
<td> </td>
|
43 |
+
</tr>
|
44 |
+
<td>Send us an E-mail:
|
45 |
+
<td><a href="mailto:info@magmodules.eu">info@magmodules.eu</a></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td height="30">Visit our website:</td>
|
49 |
+
<td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</div>';
|
53 |
+
|
54 |
+
return $html;
|
55 |
+
}
|
56 |
+
}
|
app/code/local/Magmodules/Core/Helper/Data.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
4 |
+
* =============================================================
|
5 |
+
* NOTICE OF LICENSE [Single domain license]
|
6 |
+
* This source file is subject to the EULA that is
|
7 |
+
* available through the world-wide-web at:
|
8 |
+
* http://www.magmodules.eu/license-agreement/
|
9 |
+
* =============================================================
|
10 |
+
* @category Magmodules
|
11 |
+
* @package Magmodules_Core
|
12 |
+
* @author Magmodules <info@magmodules.eu>
|
13 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
14 |
+
* @license http://www.magmodules.eu/license-agreement/
|
15 |
+
* =============================================================
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Magmodules_Core_Helper_Data extends Mage_Core_Helper_Abstract {
|
19 |
+
|
20 |
+
}
|
app/code/local/Magmodules/Core/etc/adminhtml.xml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
+
* @category Magmodules
|
12 |
+
* @package Magmodules_Core
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
+
*/
|
18 |
+
-->
|
19 |
+
<config>
|
20 |
+
<acl>
|
21 |
+
<resources>
|
22 |
+
<all>
|
23 |
+
<title>Allow Everything</title>
|
24 |
+
</all>
|
25 |
+
<admin>
|
26 |
+
<children>
|
27 |
+
<system>
|
28 |
+
<children>
|
29 |
+
<config>
|
30 |
+
<children>
|
31 |
+
<magmodules_core>
|
32 |
+
<title>Magmodules - Extensions Information</title>
|
33 |
+
</magmodules_core>
|
34 |
+
</children>
|
35 |
+
</config>
|
36 |
+
</children>
|
37 |
+
</system>
|
38 |
+
</children>
|
39 |
+
</admin>
|
40 |
+
</resources>
|
41 |
+
</acl>
|
42 |
+
</config>
|
app/code/local/Magmodules/Core/etc/config.xml
CHANGED
@@ -1,20 +1,25 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
* Magmodules.eu
|
5 |
-
*
|
6 |
-
*
|
|
|
|
|
|
|
|
|
7 |
* @category Magmodules
|
8 |
* @package Magmodules_Core
|
9 |
-
* @author Magmodules <info@magmodules.eu
|
10 |
-
* @copyright Copyright (c)
|
11 |
-
* @license http://www.magmodules.eu/license-agreement/
|
|
|
12 |
*/
|
13 |
-->
|
14 |
<config>
|
15 |
<modules>
|
16 |
<Magmodules_Core>
|
17 |
-
<version>1.0.
|
18 |
</Magmodules_Core>
|
19 |
</modules>
|
20 |
<global>
|
@@ -23,12 +28,39 @@
|
|
23 |
<class>Magmodules_Core_Block_Adminhtml</class>
|
24 |
</magmodules_core>
|
25 |
</blocks>
|
|
|
|
|
|
|
|
|
|
|
26 |
</global>
|
27 |
<adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<layout>
|
29 |
<updates>
|
30 |
<magmodulescore>
|
31 |
-
<file>
|
32 |
</magmodulescore>
|
33 |
</updates>
|
34 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
* @category Magmodules
|
12 |
* @package Magmodules_Core
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
*/
|
18 |
-->
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magmodules_Core>
|
22 |
+
<version>1.0.1</version>
|
23 |
</Magmodules_Core>
|
24 |
</modules>
|
25 |
<global>
|
28 |
<class>Magmodules_Core_Block_Adminhtml</class>
|
29 |
</magmodules_core>
|
30 |
</blocks>
|
31 |
+
<helpers>
|
32 |
+
<magmodules_core>
|
33 |
+
<class>Magmodules_Core_Helper</class>
|
34 |
+
</magmodules_core>
|
35 |
+
</helpers>
|
36 |
</global>
|
37 |
<adminhtml>
|
38 |
+
<acl>
|
39 |
+
<resources>
|
40 |
+
<all>
|
41 |
+
<title>Allow Everything</title>
|
42 |
+
</all>
|
43 |
+
<admin>
|
44 |
+
<children>
|
45 |
+
<system>
|
46 |
+
<children>
|
47 |
+
<config>
|
48 |
+
<children>
|
49 |
+
<magmodules_core>
|
50 |
+
<title>Magmodules - Extensions Information</title>
|
51 |
+
</magmodules_core>
|
52 |
+
</children>
|
53 |
+
</config>
|
54 |
+
</children>
|
55 |
+
</system>
|
56 |
+
</children>
|
57 |
+
</admin>
|
58 |
+
</resources>
|
59 |
+
</acl>
|
60 |
<layout>
|
61 |
<updates>
|
62 |
<magmodulescore>
|
63 |
+
<file>magmodules_core.xml</file>
|
64 |
</magmodulescore>
|
65 |
</updates>
|
66 |
</layout>
|
app/code/local/Magmodules/Core/etc/system.xml
CHANGED
@@ -1,14 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
* Magmodules.eu
|
5 |
-
*
|
6 |
-
*
|
|
|
|
|
|
|
|
|
7 |
* @category Magmodules
|
8 |
* @package Magmodules_Core
|
9 |
-
* @author Magmodules <info@magmodules.eu
|
10 |
-
* @copyright Copyright (c)
|
11 |
-
* @license http://www.magmodules.eu/license-agreement/
|
|
|
12 |
*/
|
13 |
-->
|
14 |
<config>
|
@@ -18,4 +23,34 @@
|
|
18 |
<sort_order>200</sort_order>
|
19 |
</magmodules>
|
20 |
</tabs>
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
|
5 |
+
* =============================================================
|
6 |
+
* NOTICE OF LICENSE [Single domain license]
|
7 |
+
* This source file is subject to the EULA that is
|
8 |
+
* available through the world-wide-web at:
|
9 |
+
* http://www.magmodules.eu/license-agreement/
|
10 |
+
* =============================================================
|
11 |
* @category Magmodules
|
12 |
* @package Magmodules_Core
|
13 |
+
* @author Magmodules <info@magmodules.eu>
|
14 |
+
* @copyright Copyright (c) 2014 (http://www.magmodules.eu)
|
15 |
+
* @license http://www.magmodules.eu/license-agreement/
|
16 |
+
* =============================================================
|
17 |
*/
|
18 |
-->
|
19 |
<config>
|
23 |
<sort_order>200</sort_order>
|
24 |
</magmodules>
|
25 |
</tabs>
|
26 |
+
<sections>
|
27 |
+
<magmodules_core translate="label">
|
28 |
+
<label>General</label>
|
29 |
+
<tab>magmodules</tab>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>10</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<expanded>1</expanded>
|
36 |
+
<groups>
|
37 |
+
<info>
|
38 |
+
<frontend_model>magmodules_core/widget_info_info</frontend_model>
|
39 |
+
<sort_order>1</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
</info>
|
44 |
+
<versions translate="label">
|
45 |
+
<label>Installed Extensions</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<frontend_model>magmodules_core/versions</frontend_model>
|
48 |
+
<sort_order>2</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>1</show_in_store>
|
52 |
+
</versions>
|
53 |
+
</groups>
|
54 |
+
</magmodules_core>
|
55 |
+
</sections>
|
56 |
+
</config>
|
app/code/local/Magmodules/Ekomisnippets/Block/Adminhtml/Widget/Info/Info.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Ekomisnippets
|
18 |
+
* @author Magmodules <info@magmodules.eu)
|
19 |
+
* @copyright Copyright (c) 2015 (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_Ekomisnippets_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
24 |
+
|
25 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
26 |
+
$html = '<div style="background:url(\'http://www.magmodules.eu/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
|
27 |
+
<h4>About Magmodules.eu</h4>
|
28 |
+
<p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
|
29 |
+
<br />
|
30 |
+
<table width="500px" border="0">
|
31 |
+
<tr>
|
32 |
+
<td width="58%">View more extensions from us:</td>
|
33 |
+
<td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
|
34 |
+
</tr>
|
35 |
+
<td>Send us an E-mail:
|
36 |
+
<td><a href="mailto:info@magmodules.eu">info@magmodules.eu</a></td>
|
37 |
+
</tr>
|
38 |
+
<tr>
|
39 |
+
<td height="30">Visit our website:</td>
|
40 |
+
<td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td> </td>
|
44 |
+
<td> </td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td height="30"><strong>Need help?</strong></td>
|
48 |
+
<td><strong><a href="http://www.magmodules.eu/help/ekomi-rich-snippets" target="_blank">Online manual</a></strong></td>
|
49 |
+
</tr>
|
50 |
+
</table>
|
51 |
+
</div>';
|
52 |
+
return $html;
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
app/code/local/Magmodules/Ekomisnippets/Block/Snippets.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -16,42 +15,33 @@
|
|
16 |
* @category Magmodules
|
17 |
* @package Magmodules_Ekomisnippets
|
18 |
* @author Magmodules <info@magmodules.eu)
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
23 |
-
class Magmodules_Ekomisnippets_Block_Snippets extends Mage_Core_Block_Template
|
24 |
-
{
|
25 |
|
26 |
-
protected function _construct()
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
28 |
if(Mage::getStoreConfig('ekomisnippets/api/enabled')) {
|
29 |
-
|
30 |
-
|
31 |
-
$this->setSnippetsEnabled(0);
|
32 |
-
}
|
33 |
-
|
34 |
-
parent::_construct();
|
35 |
-
$this->setTemplate('magmodules/ekomisnippets/block.phtml');
|
36 |
}
|
37 |
-
|
38 |
-
public function getSnapshopRequest()
|
39 |
-
{
|
40 |
return $this->helper('ekomisnippets')->getSnapshopRequest();
|
41 |
}
|
42 |
|
43 |
-
public function getEkomiLink()
|
44 |
-
{
|
45 |
return $this->helper('ekomisnippets')->getEkomiLink();
|
46 |
}
|
47 |
|
48 |
-
public function
|
49 |
-
{
|
50 |
-
return Mage::getStoreConfig('ekomisnippets/api/shop_name');
|
51 |
-
}
|
52 |
-
|
53 |
-
public function getEkomiStars($rating)
|
54 |
-
{
|
55 |
return $this->helper('ekomisnippets')->getEkomiStars($rating);
|
56 |
}
|
57 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
15 |
* @category Magmodules
|
16 |
* @package Magmodules_Ekomisnippets
|
17 |
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
+
class Magmodules_Ekomisnippets_Block_Snippets extends Mage_Core_Block_Template {
|
|
|
23 |
|
24 |
+
protected function _construct() {
|
25 |
+
parent::_construct();
|
26 |
+
$this->addData(array(
|
27 |
+
'cache_lifetime' => 7200,
|
28 |
+
'cache_tags' => array(Mage_Cms_Model_Block::CACHE_TAG, 'ekomisnippets_block'),
|
29 |
+
'cache_key' => 'ekomisnippets-snippets-block',
|
30 |
+
));
|
31 |
if(Mage::getStoreConfig('ekomisnippets/api/enabled')) {
|
32 |
+
$this->setTemplate('magmodules/ekomisnippets/block.phtml');
|
33 |
+
}
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
+
|
36 |
+
public function getSnapshopRequest() {
|
|
|
37 |
return $this->helper('ekomisnippets')->getSnapshopRequest();
|
38 |
}
|
39 |
|
40 |
+
public function getEkomiLink() {
|
|
|
41 |
return $this->helper('ekomisnippets')->getEkomiLink();
|
42 |
}
|
43 |
|
44 |
+
public function getEkomiStars($rating) {
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
return $this->helper('ekomisnippets')->getEkomiStars($rating);
|
46 |
}
|
47 |
|
app/code/local/Magmodules/Ekomisnippets/Helper/Data.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -16,15 +15,13 @@
|
|
16 |
* @category Magmodules
|
17 |
* @package Magmodules_Ekomisnippets
|
18 |
* @author Magmodules <info@magmodules.eu)
|
19 |
-
* @copyright Copyright (c)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
23 |
-
class Magmodules_Ekomisnippets_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
-
{
|
25 |
|
26 |
-
function getSnapshopRequest()
|
27 |
-
{
|
28 |
$ekomi_api_id = Mage::getStoreConfig('ekomisnippets/api/api_id');
|
29 |
$ekomi_api_key = Mage::getStoreConfig('ekomisnippets/api/api_key');
|
30 |
$ekomi_version = 'cust-1.0.0';
|
@@ -34,29 +31,31 @@ class Magmodules_Ekomisnippets_Helper_Data extends Mage_Core_Helper_Abstract
|
|
34 |
$client = new SoapClient($api, array('exceptions' => 0));
|
35 |
$send_snapshot_request = $client->getSnapshot($ekomi_api_id.'|'.$ekomi_api_key, $ekomi_version);
|
36 |
$ret = unserialize(utf8_decode($send_snapshot_request));
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
-
function getEkomiLink()
|
44 |
-
{
|
45 |
if(Mage::getStoreConfig('ekomisnippets/api/show_link')) {
|
46 |
$ekomi_link = Mage::getStoreConfig('ekomisnippets/api/ekomi_link');
|
47 |
-
return Mage::helper('ekomisnippets')->__('customer reviews on') . '<a href="' . $ekomi_link . '">
|
48 |
} else {
|
49 |
return false;
|
50 |
}
|
51 |
}
|
52 |
|
53 |
-
function getEkomiStars($rating)
|
54 |
-
{
|
55 |
$perc = round(($rating * 20), 0);
|
56 |
-
$html
|
57 |
$html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
|
58 |
$html .= '</div>';
|
59 |
return $html;
|
60 |
}
|
61 |
-
|
62 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
15 |
* @category Magmodules
|
16 |
* @package Magmodules_Ekomisnippets
|
17 |
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
+
class Magmodules_Ekomisnippets_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
|
23 |
|
24 |
+
function getSnapshopRequest() {
|
|
|
25 |
$ekomi_api_id = Mage::getStoreConfig('ekomisnippets/api/api_id');
|
26 |
$ekomi_api_key = Mage::getStoreConfig('ekomisnippets/api/api_key');
|
27 |
$ekomi_version = 'cust-1.0.0';
|
31 |
$client = new SoapClient($api, array('exceptions' => 0));
|
32 |
$send_snapshot_request = $client->getSnapshot($ekomi_api_id.'|'.$ekomi_api_key, $ekomi_version);
|
33 |
$ret = unserialize(utf8_decode($send_snapshot_request));
|
34 |
+
if($ret['done']) {
|
35 |
+
$snippets = $ret['info'];
|
36 |
+
if($snippets['fb_count'] > 0) {
|
37 |
+
return $snippets;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
return false;
|
42 |
}
|
43 |
|
44 |
+
function getEkomiLink() {
|
|
|
45 |
if(Mage::getStoreConfig('ekomisnippets/api/show_link')) {
|
46 |
$ekomi_link = Mage::getStoreConfig('ekomisnippets/api/ekomi_link');
|
47 |
+
return Mage::helper('ekomisnippets')->__('customer reviews on') . ' <a href="' . $ekomi_link . '" target="_blank">Ekomi</a>';
|
48 |
} else {
|
49 |
return false;
|
50 |
}
|
51 |
}
|
52 |
|
53 |
+
function getEkomiStars($rating) {
|
|
|
54 |
$perc = round(($rating * 20), 0);
|
55 |
+
$html = '<div class="rating-box">';
|
56 |
$html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
|
57 |
$html .= '</div>';
|
58 |
return $html;
|
59 |
}
|
60 |
+
|
61 |
+
}
|
app/code/local/Magmodules/Ekomisnippets/Model/System/Config/Flushcache.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - 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_Ekomisnippets
|
17 |
+
* @author Magmodules <info@magmodules.eu)
|
18 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Magmodules_Ekomisnippets_Model_System_Config_Flushcache extends Mage_Core_Model_Config_Data {
|
23 |
+
|
24 |
+
protected function _afterSave() {
|
25 |
+
Mage::app()->cleanCache('ekomisnippets_block');
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/local/Magmodules/Ekomisnippets/etc/adminhtml.xml
CHANGED
@@ -15,9 +15,9 @@
|
|
15 |
* to info@magmodules.eu so we can send you a copy immediately.
|
16 |
*
|
17 |
* @category Magmodules
|
18 |
-
* @package
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
-
* @copyright Copyright (c)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
@@ -31,7 +31,7 @@
|
|
31 |
<config>
|
32 |
<children>
|
33 |
<ekomisnippets translate="title" module="ekomisnippets">
|
34 |
-
<title>Ekomi Snippets</title>
|
35 |
</ekomisnippets>
|
36 |
</children>
|
37 |
</config>
|
15 |
* to info@magmodules.eu so we can send you a copy immediately.
|
16 |
*
|
17 |
* @category Magmodules
|
18 |
+
* @package Magmodules_Ekomisnippets
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
31 |
<config>
|
32 |
<children>
|
33 |
<ekomisnippets translate="title" module="ekomisnippets">
|
34 |
+
<title>Ekomi Rich Snippets</title>
|
35 |
</ekomisnippets>
|
36 |
</children>
|
37 |
</config>
|
app/code/local/Magmodules/Ekomisnippets/etc/config.xml
CHANGED
@@ -15,16 +15,16 @@
|
|
15 |
* to info@magmodules.eu so we can send you a copy immediately.
|
16 |
*
|
17 |
* @category Magmodules
|
18 |
-
* @package
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
-
* @copyright Copyright (c)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Magmodules_Ekomisnippets>
|
27 |
-
<version>1.
|
28 |
</Magmodules_Ekomisnippets>
|
29 |
</modules>
|
30 |
<global>
|
@@ -37,7 +37,12 @@
|
|
37 |
<ekomisnippets>
|
38 |
<class>Magmodules_Ekomisnippets_Block</class>
|
39 |
</ekomisnippets>
|
40 |
-
</blocks>
|
|
|
|
|
|
|
|
|
|
|
41 |
</global>
|
42 |
<frontend>
|
43 |
<layout>
|
15 |
* to info@magmodules.eu so we can send you a copy immediately.
|
16 |
*
|
17 |
* @category Magmodules
|
18 |
+
* @package Magmodules_Ekomisnippets
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
+
* @copyright Copyright (c) 2015 (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_Ekomisnippets>
|
27 |
+
<version>1.1.0</version>
|
28 |
</Magmodules_Ekomisnippets>
|
29 |
</modules>
|
30 |
<global>
|
37 |
<ekomisnippets>
|
38 |
<class>Magmodules_Ekomisnippets_Block</class>
|
39 |
</ekomisnippets>
|
40 |
+
</blocks>
|
41 |
+
<models>
|
42 |
+
<ekomisnippets>
|
43 |
+
<class>Magmodules_Ekomisnippets_Model</class>
|
44 |
+
</ekomisnippets>
|
45 |
+
</models>
|
46 |
</global>
|
47 |
<frontend>
|
48 |
<layout>
|
app/code/local/Magmodules/Ekomisnippets/etc/system.xml
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @category Magmodules
|
18 |
* @package Magmodules_Ekomisnippets
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
-
* @copyright Copyright (c)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
@@ -30,15 +30,21 @@
|
|
30 |
</tabs>
|
31 |
<sections>
|
32 |
<ekomisnippets translate="label" module="ekomisnippets">
|
33 |
-
<label>Ekomi Snippets</label>
|
34 |
<tab>magmodules</tab>
|
35 |
-
<header_css>mm-moduleheader</header_css>
|
36 |
<frontend_type>text</frontend_type>
|
37 |
-
<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="ekomisnippets">
|
43 |
<label>General configuration</label>
|
44 |
<frontend_type>text</frontend_type>
|
@@ -47,14 +53,12 @@
|
|
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="ekomisnippets/snippets" name="ekomisnippets" template="magmodules/ekomisnippets/block.phtml"}} 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>
|
@@ -91,15 +95,7 @@
|
|
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 |
-
</heading_design>
|
95 |
-
<shop_name translate="label">
|
96 |
-
<label>Shopname</label>
|
97 |
-
<frontend_type>text</frontend_type>
|
98 |
-
<sort_order>6</sort_order>
|
99 |
-
<show_in_default>1</show_in_default>
|
100 |
-
<show_in_website>1</show_in_website>
|
101 |
-
<show_in_store>1</show_in_store>
|
102 |
-
</shop_name>
|
103 |
<show_link translate="label">
|
104 |
<label>Show Link to Ekomi</label>
|
105 |
<frontend_type>select</frontend_type>
|
@@ -128,7 +124,17 @@
|
|
128 |
<show_in_store>1</show_in_store>
|
129 |
</show_stars>
|
130 |
</fields>
|
131 |
-
</api>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
</groups>
|
133 |
</ekomisnippets>
|
134 |
</sections>
|
17 |
* @category Magmodules
|
18 |
* @package Magmodules_Ekomisnippets
|
19 |
* @author Magmodules <info@magmodules.eu)
|
20 |
+
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
-->
|
30 |
</tabs>
|
31 |
<sections>
|
32 |
<ekomisnippets translate="label" module="ekomisnippets">
|
33 |
+
<label>Ekomi Rich Snippets</label>
|
34 |
<tab>magmodules</tab>
|
|
|
35 |
<frontend_type>text</frontend_type>
|
36 |
+
<sort_order>15</sort_order>
|
37 |
<show_in_default>1</show_in_default>
|
38 |
<show_in_website>1</show_in_website>
|
39 |
<show_in_store>1</show_in_store>
|
40 |
+
<groups>
|
41 |
+
<info>
|
42 |
+
<frontend_model>ekomisnippets/adminhtml_widget_info_info</frontend_model>
|
43 |
+
<sort_order>1</sort_order>
|
44 |
+
<show_in_default>1</show_in_default>
|
45 |
+
<show_in_website>1</show_in_website>
|
46 |
+
<show_in_store>1</show_in_store>
|
47 |
+
</info>
|
48 |
<api translate="label" module="ekomisnippets">
|
49 |
<label>General configuration</label>
|
50 |
<frontend_type>text</frontend_type>
|
53 |
<show_in_website>1</show_in_website>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
<expanded>1</expanded>
|
|
|
|
|
|
|
56 |
<fields>
|
57 |
<enabled translate="label">
|
58 |
<label>Enabled</label>
|
59 |
<frontend_type>select</frontend_type>
|
60 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
61 |
+
<backend_model>ekomisnippets/system_config_flushcache</backend_model>
|
62 |
<sort_order>1</sort_order>
|
63 |
<show_in_default>1</show_in_default>
|
64 |
<show_in_website>1</show_in_website>
|
95 |
<show_in_default>1</show_in_default>
|
96 |
<show_in_website>1</show_in_website>
|
97 |
<show_in_store>1</show_in_store>
|
98 |
+
</heading_design>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
<show_link translate="label">
|
100 |
<label>Show Link to Ekomi</label>
|
101 |
<frontend_type>select</frontend_type>
|
124 |
<show_in_store>1</show_in_store>
|
125 |
</show_stars>
|
126 |
</fields>
|
127 |
+
</api>
|
128 |
+
<snippets translate="label">
|
129 |
+
<label>Usage</label>
|
130 |
+
<frontend_type>text</frontend_type>
|
131 |
+
<sort_order>3</sort_order>
|
132 |
+
<show_in_default>1</show_in_default>
|
133 |
+
<show_in_website>1</show_in_website>
|
134 |
+
<show_in_store>1</show_in_store>
|
135 |
+
<expanded>1</expanded>
|
136 |
+
<comment><![CDATA[<p>Use: {{block type="ekomisnippets/snippets" name="ekomisnippets"}} to call the block on the homepage.</p>]]></comment>
|
137 |
+
</snippets>
|
138 |
</groups>
|
139 |
</ekomisnippets>
|
140 |
</sections>
|
app/design/adminhtml/default/default/layout/magmodules_core.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Core
|
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 |
+
<layout>
|
25 |
+
<default>
|
26 |
+
<reference name="head">
|
27 |
+
<action method="addCss"><name>magmodules/core/css/style.css</name></action>
|
28 |
+
</reference>
|
29 |
+
</default>
|
30 |
+
</layout>
|
app/design/frontend/base/default/layout/magmodules_ekomisnippets.xml
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
<
|
4 |
<reference name="head">
|
5 |
-
<action method="addCss"><stylesheet>magmodules/ekomisnippets.css</stylesheet></action>
|
6 |
</reference>
|
7 |
-
</
|
8 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
<reference name="head">
|
5 |
+
<action method="addCss"><stylesheet>magmodules/ekomisnippets/style.css</stylesheet></action>
|
6 |
</reference>
|
7 |
+
</default>
|
8 |
</layout>
|
app/design/frontend/base/default/template/magmodules/ekomisnippets/block.phtml
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -19,24 +18,15 @@
|
|
19 |
* @copyright Copyright (c) 2013 (http://www.magmodules.eu)
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
-
if($this->getSnippetsEnabled()) {
|
23 |
-
// GET API DATA
|
24 |
-
$_snapshot = $this->getSnapshopRequest();
|
25 |
-
$_snippets = $_snapshot['info'];
|
26 |
-
// GET VALUES
|
27 |
-
$ekomilink = $this->getEkomiLink();
|
28 |
-
$shopname = $this->getShopname();
|
29 |
?>
|
30 |
-
|
31 |
<div class="ekomi-shop-snippets">
|
32 |
<?php echo $this->getEkomiStars($_snippets['fb_avg']); ?>
|
33 |
-
<div class="ekomi-schema" itemscope="itemscope" itemtype="http://schema.org/
|
34 |
-
<meta itemprop="name" content="<?php echo $shopname; ?>">
|
35 |
<div itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
|
36 |
<meta itemprop="bestRating" content="5">
|
37 |
-
<p><?php echo Mage::helper('ekomisnippets')->__('Rating') ?> <span itemprop="ratingValue"><?php echo $_snippets['fb_avg']; ?></span> <?php echo Mage::helper('ekomisnippets')->__('based on') ?> <span itemprop="reviewCount"><?php echo $_snippets['fb_count']; ?></span> <?php echo $
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
41 |
-
|
42 |
-
<?php } ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
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 |
+
<?php if($_snippets = $this->getSnapshopRequest()) { ?>
|
23 |
<div class="ekomi-shop-snippets">
|
24 |
<?php echo $this->getEkomiStars($_snippets['fb_avg']); ?>
|
25 |
+
<div class="ekomi-schema" itemscope="itemscope" itemtype="http://schema.org/WebPage">
|
|
|
26 |
<div itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
|
27 |
<meta itemprop="bestRating" content="5">
|
28 |
+
<p><?php echo Mage::helper('ekomisnippets')->__('Rating') ?> <span itemprop="ratingValue"><?php echo $_snippets['fb_avg']; ?></span> <?php echo Mage::helper('ekomisnippets')->__('based on') ?> <span itemprop="reviewCount"><?php echo $_snippets['fb_count']; ?></span> <?php echo $this->getEkomiLink(); ?></p>
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
32 |
+
<?php } ?>
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Ekomisnippets</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
@@ -9,10 +9,10 @@
|
|
9 |
<summary>Add Ekomi rich snippets to Magento Homepage</summary>
|
10 |
<description>Add Ekomi rich snippets to Magento Homepage</description>
|
11 |
<notes>Ekomi Snippets</notes>
|
12 |
-
<authors><author><name>Magmodules</name><user>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Magmodules"><dir name="Ekomisnippets"><dir name="Block"><file name="Snippets.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Ekomisnippets</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>Add Ekomi rich snippets to Magento Homepage</summary>
|
10 |
<description>Add Ekomi rich snippets to Magento Homepage</description>
|
11 |
<notes>Ekomi Snippets</notes>
|
12 |
+
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2015-02-13</date>
|
14 |
+
<time>14:30:11</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Magmodules"><dir name="Ekomisnippets"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><dir name="Info"><file name="Info.php" hash="b11659800d7585caaaff84dc597fac1c"/></dir></dir></dir><file name="Snippets.php" hash="e99e016981ea6aa34e5343c3a4209e96"/></dir><dir name="Helper"><file name="Data.php" hash="3cb2aba9c796b6f2860f9e22fcfa241c"/></dir><dir name="Model"><dir name="System"><dir name="Config"><file name="Flushcache.php" hash="7fd8831143bd0b7f4fea866cb37274fc"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d0794123a6fefa705048af8649ee0145"/><file name="config.xml" hash="a2ada165396141ac809ae514d8b5b4ec"/><file name="system.xml" hash="9331195aa6857f8228659b88928b629f"/></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="fee67b788632872f0b2c86309848d3d9"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="eafa9312b3e02bb64ffed5d1ded92d6a"/></dir></dir><file name="Versions.php" hash="06380df9a00d674da609bb277e2c83b3"/></dir></dir><dir name="Helper"><file name="Data.php" hash="82b21fbe51152aed9347e66bd7cbac9e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="fd79d4d45a66203f7918387e492f9284"/><file name="config.xml" hash="a8d31b0ac85c237999bf300239cb1b00"/><file name="system.xml" hash="3907152fab9611c25f83a525250c5e0b"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magmodules_core.xml" hash="118882894a7fef56c24329e044745b51"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_ekomisnippets.xml" hash="3fe7e2cb5f8a5a0d36cab629b62c26da"/></dir><dir name="template"><dir name="magmodules"><dir name="ekomisnippets"><file name="block.phtml" hash="4f8a650e4b212a4d8997ef7fc379e5c9"/></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="ekomisnippets"><file name="style.css" hash="0536d76d32c09bd4047cba71c7bdd365"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Magmodules_Ekomisnippets.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="it_IT"><file name="Magmodules_Ekomisnippets.csv" hash="edcb455cc33427722626fe8e5d786248"/></dir><dir name="nl_NL"><file name="Magmodules_Ekomisnippets.csv" hash="e98bea3206e6f2d200da950bea9e7972"/></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Ekomisnippets.xml" hash="d54b6a04b8cf9490ff29bbc95ee40e54"/><file name="Magmodules_Core.xml" hash="2697672510696f9cc390b995103c89c7"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><package><name></name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/magmodules/ekomisnippets.css
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
.ekomi-shop-snippets {
|
2 |
-
|
3 |
-
}
|
4 |
-
|
5 |
-
.ekomi-shop-snippets .rating-box {
|
6 |
-
float: left;
|
7 |
-
margin-right: 4px;
|
8 |
-
margin-top: 3px;
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
skin/frontend/base/default/magmodules/ekomisnippets/style.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
.ekomi-shop-snippets {
|
23 |
+
margin-top: 5px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.ekomi-shop-snippets .rating-box {
|
27 |
+
float: left;
|
28 |
+
margin: 3px 5px 0px 0px;
|
29 |
+
}
|
30 |
+
|