Version Notes
Fixed an error
Download this release
Release Info
Developer | Bastien Libersa |
Extension | monaviscompte_widget |
Version | 0.0.2 |
Comparing to | |
See all releases |
Code changes from version 0.0.1 to 0.0.2
- app/code/local/Monaviscompte/Widget/.DS_Store +0 -0
- app/code/local/Monaviscompte/Widget/Block/Widget.php +20 -0
- app/code/local/Monaviscompte/Widget/Helper/Data.php +8 -0
- app/code/local/Monaviscompte/Widget/etc/config.xml +20 -0
- app/code/local/Monaviscompte/Widget/etc/widget.xml +21 -0
- package.xml +4 -4
app/code/local/Monaviscompte/Widget/.DS_Store
ADDED
Binary file
|
app/code/local/Monaviscompte/Widget/Block/Widget.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monaviscompte_Widget_Block_Widget extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface {
|
3 |
+
/**
|
4 |
+
* Produce the HTML code of a widget
|
5 |
+
*
|
6 |
+
* @return string
|
7 |
+
*/
|
8 |
+
protected function _toHtml() {
|
9 |
+
$itemId = self::getData('item_id');
|
10 |
+
$accessKey = self::getData('access_key');
|
11 |
+
|
12 |
+
$itemId = str_replace(' ', '', $itemId);
|
13 |
+
$accessKey = str_replace(' ', '', $accessKey);
|
14 |
+
|
15 |
+
return
|
16 |
+
'<div id="widget-' . $itemId .'">'
|
17 |
+
. '<script type="text/javascript" src="http://local.monaviscompte.fr/widget?id=' . $itemId . '&public_key=' . $accessKey . '&div=widget-' . $itemId . '"></script>'
|
18 |
+
. '</div>';
|
19 |
+
}
|
20 |
+
}
|
app/code/local/Monaviscompte/Widget/Helper/Data.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// app/code/local/Envato/WidgetLinks/Helper/Data.php
|
3 |
+
/**
|
4 |
+
* Sample Widget Helper
|
5 |
+
*/
|
6 |
+
class Monaviscompte_Widget_Helper_Data extends Mage_Core_Helper_Abstract
|
7 |
+
{
|
8 |
+
}
|
app/code/local/Monaviscompte/Widget/etc/config.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Monaviscompte_Widget>
|
5 |
+
<version>0.0.1</version>
|
6 |
+
</Monaviscompte_Widget>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<mac_widget>
|
11 |
+
<class>Monaviscompte_Widget_Helper</class>
|
12 |
+
</mac_widget>
|
13 |
+
</helpers>
|
14 |
+
<blocks>
|
15 |
+
<mac_widget>
|
16 |
+
<class>Monaviscompte_Widget_Block</class>
|
17 |
+
</mac_widget>
|
18 |
+
</blocks>
|
19 |
+
</global>
|
20 |
+
</config>
|
app/code/local/Monaviscompte/Widget/etc/widget.xml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<widgets>
|
3 |
+
<mac_widget type="mac_widget/widget" translate="name description" module="mac_widget">
|
4 |
+
<name>monaviscompte widget</name>
|
5 |
+
<description>Allows to display the monaviscompte widget</description>
|
6 |
+
<parameters>
|
7 |
+
<item_id>
|
8 |
+
<label>Item identifier</label>
|
9 |
+
<visible>1</visible>
|
10 |
+
<required>1</required>
|
11 |
+
<type>text</type>
|
12 |
+
</item_id>
|
13 |
+
<access_key>
|
14 |
+
<label>Access key</label>
|
15 |
+
<visible>1</visible>
|
16 |
+
<required>1</required>
|
17 |
+
<type>text</type>
|
18 |
+
</access_key>
|
19 |
+
</parameters>
|
20 |
+
</mac_widget>
|
21 |
+
</widgets>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>monaviscompte_widget</name>
|
4 |
-
<version>0.0.
|
5 |
<stability>devel</stability>
|
6 |
<license>AFL</license>
|
7 |
<channel>community</channel>
|
@@ -12,11 +12,11 @@
|
|
12 |
- Multipliez vos commandes grâce à la puissance des avis (+15% de ventes dès le premier avis) 
|
13 |
- Améliorez votre service et innovez grâce au contenu des avis 
|
14 |
- Affirmez votre culture client et différenciez vous de vos concurrents</description>
|
15 |
-
<notes>
|
16 |
<authors><author><name>Bastien Libersa</name><user>monaviscompte</user><email>support@monaviscompte.fr</email></author></authors>
|
17 |
<date>2016-02-17</date>
|
18 |
-
<time>16:
|
19 |
-
<contents></contents>
|
20 |
<compatible/>
|
21 |
<dependencies><required><php><min>5.3.2</min><max>6.0.0</max></php></required></dependencies>
|
22 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>monaviscompte_widget</name>
|
4 |
+
<version>0.0.2</version>
|
5 |
<stability>devel</stability>
|
6 |
<license>AFL</license>
|
7 |
<channel>community</channel>
|
12 |
- Multipliez vos commandes grâce à la puissance des avis (+15% de ventes dès le premier avis) 
|
13 |
- Améliorez votre service et innovez grâce au contenu des avis 
|
14 |
- Affirmez votre culture client et différenciez vous de vos concurrents</description>
|
15 |
+
<notes>Fixed an error</notes>
|
16 |
<authors><author><name>Bastien Libersa</name><user>monaviscompte</user><email>support@monaviscompte.fr</email></author></authors>
|
17 |
<date>2016-02-17</date>
|
18 |
+
<time>16:21:52</time>
|
19 |
+
<contents><target name="magelocal"><dir name="Monaviscompte"><dir name="Widget"><dir name="Block"><file name="Widget.php" hash="e7a4415e475b6b20d9d698ef7be549c8"/></dir><dir name="Helper"><file name="Data.php" hash="8ae743c1b0f2b50ac5833ac61aa94064"/></dir><dir name="etc"><file name="config.xml" hash="1fcb5c9cac97ce81ce63068aac24b3d8"/><file name="widget.xml" hash="a5b07f5c34ae16761767261d48c5ad7f"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></target></contents>
|
20 |
<compatible/>
|
21 |
<dependencies><required><php><min>5.3.2</min><max>6.0.0</max></php></required></dependencies>
|
22 |
</package>
|