Version Notes
- Added default configuration values.
- Changed button script to new version
Download this release
Release Info
Developer | Daniel Moreira |
Extension | Fp_Followprice |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/Fp/Followprice/Model/Observer.php +4 -4
- app/code/community/Fp/Followprice/Model/Style.php +3 -3
- app/code/community/Fp/Followprice/controllers/IndexController.php +1 -1
- app/code/community/Fp/Followprice/etc/config.xml +26 -0
- app/code/community/Fp/Followprice/etc/system.xml +7 -7
- app/design/frontend/base/default/template/fp/followprice_button.phtml +1 -1
- package.xml +6 -5
app/code/community/Fp/Followprice/Model/Observer.php
CHANGED
@@ -43,13 +43,13 @@ class Fp_Followprice_Model_Observer
|
|
43 |
}
|
44 |
|
45 |
$button_style = "";
|
46 |
-
if ($stylearray[0] ==
|
47 |
$button_style .= "no-counter,";
|
48 |
}
|
49 |
-
if ($stylearray[1] ==
|
50 |
$button_style .= "icon-link,";
|
51 |
}
|
52 |
-
if ($stylearray[2] ==
|
53 |
$button_style .= "no-full-text,";
|
54 |
}
|
55 |
if ($stylearray[3] == 1) {
|
@@ -81,7 +81,7 @@ class Fp_Followprice_Model_Observer
|
|
81 |
if ($block instanceof Mage_Catalog_Block_Product_List) {
|
82 |
$transport = $observer->getTransport();
|
83 |
$html = $transport->getHtml();
|
84 |
-
$html .= '<script>(function() { var _f = document.createElement("script");_f.type = "text/javascript"; _f.async = true; _f.src ="https://
|
85 |
<style>
|
86 |
.followprice-container{
|
87 |
width:100%;
|
43 |
}
|
44 |
|
45 |
$button_style = "";
|
46 |
+
if ($stylearray[0] == 1) {
|
47 |
$button_style .= "no-counter,";
|
48 |
}
|
49 |
+
if ($stylearray[1] == 1) {
|
50 |
$button_style .= "icon-link,";
|
51 |
}
|
52 |
+
if ($stylearray[2] == 1) {
|
53 |
$button_style .= "no-full-text,";
|
54 |
}
|
55 |
if ($stylearray[3] == 1) {
|
81 |
if ($block instanceof Mage_Catalog_Block_Product_List) {
|
82 |
$transport = $observer->getTransport();
|
83 |
$html = $transport->getHtml();
|
84 |
+
$html .= '<script>(function() { var _f = document.createElement("script");_f.type = "text/javascript"; _f.async = true; _f.src ="https://followprice.co/followbutton.js"; var s =document.getElementsByTagName("script")[0];s.parentNode.insertBefore(_f, s); })();</script>
|
85 |
<style>
|
86 |
.followprice-container{
|
87 |
width:100%;
|
app/code/community/Fp/Followprice/Model/Style.php
CHANGED
@@ -9,9 +9,9 @@ class Fp_Followprice_Model_Style
|
|
9 |
public function toOptionArray()
|
10 |
{
|
11 |
return array(
|
12 |
-
array('value' => 1, 'label' => Mage::helper('adminhtml')->__('
|
13 |
-
array('value' => 2, 'label' => Mage::helper('adminhtml')->__('
|
14 |
-
array('value' => 3, 'label' => Mage::helper('adminhtml')->__('
|
15 |
array('value' => 4, 'label' => Mage::helper('adminhtml')->__('Multi-line text')),
|
16 |
);
|
17 |
}
|
9 |
public function toOptionArray()
|
10 |
{
|
11 |
return array(
|
12 |
+
array('value' => 1, 'label' => Mage::helper('adminhtml')->__('No counter')),
|
13 |
+
array('value' => 2, 'label' => Mage::helper('adminhtml')->__('No background')),
|
14 |
+
array('value' => 3, 'label' => Mage::helper('adminhtml')->__('No text')),
|
15 |
array('value' => 4, 'label' => Mage::helper('adminhtml')->__('Multi-line text')),
|
16 |
);
|
17 |
}
|
app/code/community/Fp/Followprice/controllers/IndexController.php
CHANGED
@@ -8,7 +8,7 @@ class Fp_Followprice_IndexController extends Mage_Adminhtml_Controller_Action
|
|
8 |
//create a text block with the name of "example-block"
|
9 |
$block = $this->getLayout()
|
10 |
->createBlock('core/text', 'example-block')
|
11 |
-
->setText("<iframe id='fpr-iframe' src='https://followprice.co/business/login
|
12 |
|
13 |
$this->_addContent($block);
|
14 |
$this->_setActiveMenu('report/Followprice');
|
8 |
//create a text block with the name of "example-block"
|
9 |
$block = $this->getLayout()
|
10 |
->createBlock('core/text', 'example-block')
|
11 |
+
->setText("<h4><a href='https://followprice.co/business/login' target='_blank'>Open in a new window.</a></h4><iframe id='fpr-iframe' src='https://followprice.co/business/login' style='width:100%; height: 800px;''></iframe>");
|
12 |
|
13 |
$this->_addContent($block);
|
14 |
$this->_setActiveMenu('report/Followprice');
|
app/code/community/Fp/Followprice/etc/config.xml
CHANGED
@@ -5,6 +5,32 @@
|
|
5 |
<version>1.0.0.0</version>
|
6 |
</Fp_Followprice>
|
7 |
</modules>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<global>
|
9 |
<blocks>
|
10 |
<Fp_Followprice>
|
5 |
<version>1.0.0.0</version>
|
6 |
</Fp_Followprice>
|
7 |
</modules>
|
8 |
+
<default>
|
9 |
+
<Fp_Followprice_Config>
|
10 |
+
<section_one>
|
11 |
+
<Fp_Followprice_Key></Fp_Followprice_Key>
|
12 |
+
<Fp_Followprice_Enable>1</Fp_Followprice_Enable>
|
13 |
+
</section_one>
|
14 |
+
<section_two>
|
15 |
+
<Fp_Followprice_Position>1</Fp_Followprice_Position>
|
16 |
+
<Fp_Followprice_Allignment></Fp_Followprice_Allignment>
|
17 |
+
<Fp_Followprice_Margin_Top>0</Fp_Followprice_Margin_Top>
|
18 |
+
<Fp_Followprice_Margin_Right>0</Fp_Followprice_Margin_Right>
|
19 |
+
<Fp_Followprice_Margin_Bottom>0</Fp_Followprice_Margin_Bottom>
|
20 |
+
<Fp_Followprice_Margin_Left>0</Fp_Followprice_Margin_Left>
|
21 |
+
<Fp_Followprice_Custom_Css></Fp_Followprice_Custom_Css>
|
22 |
+
</section_two>
|
23 |
+
<section_three>
|
24 |
+
<Fp_Followprice_Enablelist>1</Fp_Followprice_Enablelist>
|
25 |
+
<Fp_Followprice_Style></Fp_Followprice_Style>
|
26 |
+
<Fp_Followprice_Allignmentlist></Fp_Followprice_Allignmentlist>
|
27 |
+
<Fp_Followprice_Margin_Toplist>0</Fp_Followprice_Margin_Toplist>
|
28 |
+
<Fp_Followprice_Margin_Rightlist>0</Fp_Followprice_Margin_Rightlist>
|
29 |
+
<Fp_Followprice_Margin_Bottomlist>0</Fp_Followprice_Margin_Bottomlist>
|
30 |
+
<Fp_Followprice_Margin_Leftlist>0</Fp_Followprice_Margin_Leftlist>
|
31 |
+
</section_three>
|
32 |
+
</Fp_Followprice_Config>
|
33 |
+
</default>
|
34 |
<global>
|
35 |
<blocks>
|
36 |
<Fp_Followprice>
|
app/code/community/Fp/Followprice/etc/system.xml
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
<label>Followprice</label>
|
6 |
<sort_order>600</sort_order>
|
7 |
</Fp_Followprice>
|
8 |
-
</tabs>
|
9 |
<sections>
|
10 |
<Fp_Followprice_Config translate="label" module="Fp_Followprice">
|
11 |
<label>Settings</label>
|
@@ -17,7 +17,7 @@
|
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
19 |
<section_one translate="label">
|
20 |
-
<label>
|
21 |
<frontend_type>text</frontend_type>
|
22 |
<sort_order>1</sort_order>
|
23 |
<show_in_default>1</show_in_default>
|
@@ -41,7 +41,7 @@
|
|
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 |
-
</Fp_Followprice_Enable>
|
45 |
</fields>
|
46 |
</section_one>
|
47 |
<section_two translate="label">
|
@@ -62,7 +62,7 @@
|
|
62 |
<show_in_store>1</show_in_store>
|
63 |
</Fp_Followprice_Position>
|
64 |
<Fp_Followprice_Allignment translate="label" module="Fp_Followprice">
|
65 |
-
<label>
|
66 |
<frontend_type>select</frontend_type>
|
67 |
<source_model>Fp_Followprice/allignment</source_model>
|
68 |
<sort_order>2</sort_order>
|
@@ -138,8 +138,8 @@
|
|
138 |
<show_in_website>1</show_in_website>
|
139 |
<show_in_store>1</show_in_store>
|
140 |
</Fp_Followprice_Style>
|
141 |
-
|
142 |
-
<label>
|
143 |
<frontend_type>select</frontend_type>
|
144 |
<source_model>Fp_Followprice/allignment</source_model>
|
145 |
<sort_order>2</sort_order>
|
@@ -183,5 +183,5 @@
|
|
183 |
</section_three>
|
184 |
</groups>
|
185 |
</Fp_Followprice_Config>
|
186 |
-
</sections>
|
187 |
</config>
|
5 |
<label>Followprice</label>
|
6 |
<sort_order>600</sort_order>
|
7 |
</Fp_Followprice>
|
8 |
+
</tabs>
|
9 |
<sections>
|
10 |
<Fp_Followprice_Config translate="label" module="Fp_Followprice">
|
11 |
<label>Settings</label>
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
19 |
<section_one translate="label">
|
20 |
+
<label>General</label>
|
21 |
<frontend_type>text</frontend_type>
|
22 |
<sort_order>1</sort_order>
|
23 |
<show_in_default>1</show_in_default>
|
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 |
+
</Fp_Followprice_Enable>
|
45 |
</fields>
|
46 |
</section_one>
|
47 |
<section_two translate="label">
|
62 |
<show_in_store>1</show_in_store>
|
63 |
</Fp_Followprice_Position>
|
64 |
<Fp_Followprice_Allignment translate="label" module="Fp_Followprice">
|
65 |
+
<label>Alignment:</label>
|
66 |
<frontend_type>select</frontend_type>
|
67 |
<source_model>Fp_Followprice/allignment</source_model>
|
68 |
<sort_order>2</sort_order>
|
138 |
<show_in_website>1</show_in_website>
|
139 |
<show_in_store>1</show_in_store>
|
140 |
</Fp_Followprice_Style>
|
141 |
+
<Fp_Followprice_Allignmentlist translate="label" module="Fp_Followprice">
|
142 |
+
<label>Alignment:</label>
|
143 |
<frontend_type>select</frontend_type>
|
144 |
<source_model>Fp_Followprice/allignment</source_model>
|
145 |
<sort_order>2</sort_order>
|
183 |
</section_three>
|
184 |
</groups>
|
185 |
</Fp_Followprice_Config>
|
186 |
+
</sections>
|
187 |
</config>
|
app/design/frontend/base/default/template/fp/followprice_button.phtml
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
<?php // To determine if the button comes after "price" or "add to cart" ?>
|
28 |
<?php if (($_position == 0 && $this->message == "price") || ($_position == 1 && $this->message == "cart")) { ?>
|
29 |
|
30 |
-
<script>(function() { var _f = document.createElement("script");_f.type = "text/javascript"; _f.async = true; _f.src ="https://
|
31 |
|
32 |
<div class='followprice-container'>
|
33 |
<div class="fp-button"
|
27 |
<?php // To determine if the button comes after "price" or "add to cart" ?>
|
28 |
<?php if (($_position == 0 && $this->message == "price") || ($_position == 1 && $this->message == "cart")) { ?>
|
29 |
|
30 |
+
<script>(function() { var _f = document.createElement("script");_f.type = "text/javascript"; _f.async = true; _f.src ="https://followprice.co/followbutton.js"; var s =document.getElementsByTagName("script")[0];s.parentNode.insertBefore(_f, s); })();</script>
|
31 |
|
32 |
<div class='followprice-container'>
|
33 |
<div class="fp-button"
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fp_Followprice</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>devel</stability>
|
6 |
<license uri="http://opensource.org/licenses/MIT">Massachusetts Institute of Technology License </license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Displays a button for customers to follow your products and get a facebook notification once the price drops or if there are changes in availability.</summary>
|
10 |
<description>Displays a button for customers to follow your products and get a facebook notification once the price drops or if there are changes in availability.</description>
|
11 |
-
<notes
|
|
|
12 |
<authors><author><name>Daniel Moreira</name><user>danielmoreira</user><email>daniel.moreira@followprice.co</email></author></authors>
|
13 |
-
<date>2015-06-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Fp"><dir name="Followprice"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Style.php" hash="0ecdb2763298753653d565da26330b76"/></dir></dir></dir><file name="FollowpriceButtonAtProduct.php" hash="fbc58b2a7413a64446f95b137e47d3e7"/></dir><dir name="Helper"><file name="Data.php" hash="b57fb5daa7144cb08d3fc44010ce71eb"/></dir><dir name="Model"><file name="Allignment.php" hash="324d087936b060290b6d3545388f9b53"/><file name="Enable.php" hash="1f04e57aa590140099225d11a801240c"/><file name="Observer.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.0.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fp_Followprice</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>devel</stability>
|
6 |
<license uri="http://opensource.org/licenses/MIT">Massachusetts Institute of Technology License </license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Displays a button for customers to follow your products and get a facebook notification once the price drops or if there are changes in availability.</summary>
|
10 |
<description>Displays a button for customers to follow your products and get a facebook notification once the price drops or if there are changes in availability.</description>
|
11 |
+
<notes>- Added default configuration values.
|
12 |
+
- Changed button script to new version</notes>
|
13 |
<authors><author><name>Daniel Moreira</name><user>danielmoreira</user><email>daniel.moreira@followprice.co</email></author></authors>
|
14 |
+
<date>2015-06-19</date>
|
15 |
+
<time>14:28:33</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Fp"><dir name="Followprice"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Style.php" hash="0ecdb2763298753653d565da26330b76"/></dir></dir></dir><file name="FollowpriceButtonAtProduct.php" hash="fbc58b2a7413a64446f95b137e47d3e7"/></dir><dir name="Helper"><file name="Data.php" hash="b57fb5daa7144cb08d3fc44010ce71eb"/></dir><dir name="Model"><file name="Allignment.php" hash="324d087936b060290b6d3545388f9b53"/><file name="Enable.php" hash="1f04e57aa590140099225d11a801240c"/><file name="Observer.php" hash="8511dc6ebedc5a68f3e6ccd031ea6fbe"/><file name="Position.php" hash="00ce4ba5ca600ee097af0aa1cd651b67"/><file name="Style.php" hash="b9f370ba2b7b8b8fbdf932c7eeaed9b0"/></dir><dir name="controllers"><file name="IndexController.php" hash="18b8535cb623a0078d0b7ab41bd4eec6"/></dir><dir name="etc"><file name="config.xml" hash="b68cc354fe598542733738f60bbb5c4e"/><file name="system.xml" hash="ac1ec9cc0faa9c7a9e37fc71be318bf3"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="Fp_Followprice"><dir name="system"><dir name="config"><file name="style.phtml" hash="a8aa43dd93f3e775cd9c3b8a236ab318"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="fp"><file name="followprice.xml" hash="3d12db5d746540443a877dfc1c5b5a04"/></dir></dir><dir name="template"><dir name="fp"><file name="followprice_button.phtml" hash="d16dfa166fa404baebfa56000450f89c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fp_Followprice.xml" hash="ddee688a2070307d097e00b76175a18c"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>4.0.0</min><max>7.0.0</max></php></required></dependencies>
|
19 |
</package>
|