Version Notes
- Display Reward Points in
* Product page
* Checkout page
* Order Success Page
- Configure
* points multiple for dollars purchased
* location of Rewards Tab on site pages
- Earn Reward Points at www.punchtab.com (reported when order completes successfully)
Download this release
Release Info
Developer | Magento Core Team |
Extension | punchtabpoints |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- app/code/community/PunchTab/Points/Block/Sidebar.php +17 -0
- app/code/community/PunchTab/Points/Helper/Data.php +14 -6
- app/code/community/PunchTab/Points/Model/Backend/Source/Position.php +1 -0
- app/code/community/PunchTab/Points/etc/config.xml +1 -1
- app/code/community/PunchTab/Points/etc/system.xml +11 -11
- app/design/frontend/base/default/layout/points.xml +3 -0
- app/design/frontend/base/default/template/points/sidebar.phtml +1 -0
- app/design/frontend/default/default/layout/points.xml +3 -0
- app/design/frontend/default/default/template/points/sidebar.phtml +1 -0
- package.xml +4 -4
app/code/community/PunchTab/Points/Block/Sidebar.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class PunchTab_Points_Block_Sidebar extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->setTemplate('points/sidebar.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareLayout()
|
13 |
+
{
|
14 |
+
return parent::_prepareLayout();
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
app/code/community/PunchTab/Points/Helper/Data.php
CHANGED
@@ -37,21 +37,29 @@ class PunchTab_Points_Helper_Data extends Mage_Core_Helper_Abstract
|
|
37 |
$scrpt .= '</script>';
|
38 |
|
39 |
$scrpt .= '<script type="text/javascript" charset="utf-8">';
|
|
|
40 |
$scrpt .= 'var _ptq = _ptq || [];';
|
41 |
$scrpt .= 'var reward_widget_options = {};';
|
42 |
$scrpt .= 'reward_widget_options.key = "';
|
43 |
$scrpt .= $key;
|
44 |
$scrpt .= '";';
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
46 |
switch(Mage::getStoreConfig('points/settings/position'))
|
47 |
{
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
}
|
|
|
54 |
$scrpt .= 'var reward_widget = new PT.reward_widget(reward_widget_options);';
|
|
|
55 |
$scrpt .= 'window.ptAsyncInit = function() {';
|
56 |
$scrpt .= ' if(typeof pt_magento !== "undefined")';
|
57 |
$scrpt .= ' pt_magento.check_and_show_login_button();';
|
37 |
$scrpt .= '</script>';
|
38 |
|
39 |
$scrpt .= '<script type="text/javascript" charset="utf-8">';
|
40 |
+
//$scrpt .= 'window.load = function(){';
|
41 |
$scrpt .= 'var _ptq = _ptq || [];';
|
42 |
$scrpt .= 'var reward_widget_options = {};';
|
43 |
$scrpt .= 'reward_widget_options.key = "';
|
44 |
$scrpt .= $key;
|
45 |
$scrpt .= '";';
|
46 |
+
if( Mage::getStoreConfig('points/settings/position') == 'in-line') {
|
47 |
+
$scrpt .= 'reward_widget_options.display = "inline";';
|
48 |
+
}
|
49 |
+
else {
|
50 |
+
$scrpt .= 'reward_widget_options.display = "tab";';
|
51 |
+
}
|
52 |
switch(Mage::getStoreConfig('points/settings/position'))
|
53 |
{
|
54 |
+
case 'top-left': $scrpt .= 'reward_widget_options.position = {x:"left",y:"top"};';break;
|
55 |
+
case 'top-right': $scrpt .= 'reward_widget_options.position = {x:"right",y:"top"};';break;
|
56 |
+
case 'bottom-left': $scrpt .= 'reward_widget_options.position = {x:"left",y:"bottom"};';break;
|
57 |
+
case 'bottom-right': $scrpt .= 'reward_widget_options.position = {x:"right",y:"bottom"};';break;
|
58 |
+
default: $scrpt .= 'reward_widget_options.position = {x:"right",y:"bottom"};';break;
|
59 |
}
|
60 |
+
|
61 |
$scrpt .= 'var reward_widget = new PT.reward_widget(reward_widget_options);';
|
62 |
+
//$scrpt .= '}';
|
63 |
$scrpt .= 'window.ptAsyncInit = function() {';
|
64 |
$scrpt .= ' if(typeof pt_magento !== "undefined")';
|
65 |
$scrpt .= ' pt_magento.check_and_show_login_button();';
|
app/code/community/PunchTab/Points/Model/Backend/Source/Position.php
CHANGED
@@ -9,6 +9,7 @@ class PunchTab_Points_Model_Backend_Source_Position
|
|
9 |
array('value' => 'top-right', 'label'=> Mage::helper('points')->__('Top Right')),
|
10 |
array('value' => 'bottom-left', 'label'=> Mage::helper('points')->__('Bottom Left')),
|
11 |
array('value' => 'bottom-right', 'label'=> Mage::helper('points')->__('Bottom Right')),
|
|
|
12 |
);
|
13 |
}
|
14 |
}
|
9 |
array('value' => 'top-right', 'label'=> Mage::helper('points')->__('Top Right')),
|
10 |
array('value' => 'bottom-left', 'label'=> Mage::helper('points')->__('Bottom Left')),
|
11 |
array('value' => 'bottom-right', 'label'=> Mage::helper('points')->__('Bottom Right')),
|
12 |
+
array('value' => 'in-line', 'label'=> Mage::helper('points')->__('In Line')),
|
13 |
);
|
14 |
}
|
15 |
}
|
app/code/community/PunchTab/Points/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<PunchTab_Points>
|
6 |
-
<version>1.0.
|
7 |
</PunchTab_Points>
|
8 |
</modules>
|
9 |
|
3 |
<config>
|
4 |
<modules>
|
5 |
<PunchTab_Points>
|
6 |
+
<version>1.0.4</version>
|
7 |
</PunchTab_Points>
|
8 |
</modules>
|
9 |
|
app/code/community/PunchTab/Points/etc/system.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
<sections>
|
5 |
<points translate="label" module="points">
|
6 |
-
<label>Points</label>
|
7 |
<tab>catalog</tab>
|
8 |
<frontend_type>text</frontend_type>
|
9 |
<sort_order>1000</sort_order>
|
@@ -12,30 +12,30 @@
|
|
12 |
<show_in_store>1</show_in_store>
|
13 |
<groups>
|
14 |
<settings translate="label">
|
15 |
-
<label>Settings</label>
|
16 |
<frontend_type>text</frontend_type>
|
17 |
<sort_order>1</sort_order>
|
18 |
<show_in_default>1</show_in_default>
|
19 |
<show_in_website>1</show_in_website>
|
20 |
<show_in_store>1</show_in_store>
|
21 |
<fields>
|
22 |
-
<
|
23 |
-
<label>
|
24 |
-
<frontend_type>
|
25 |
-
<source_model>points/backend_source_position</source_model>
|
26 |
<sort_order>1</sort_order>
|
27 |
<show_in_default>1</show_in_default>
|
28 |
<show_in_website>1</show_in_website>
|
29 |
<show_in_store>1</show_in_store>
|
30 |
-
</
|
31 |
-
<
|
32 |
-
<label>
|
33 |
-
<frontend_type>
|
|
|
34 |
<sort_order>2</sort_order>
|
35 |
<show_in_default>1</show_in_default>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
-
</
|
39 |
<multiple translate="label">
|
40 |
<label>Points Multiple</label>
|
41 |
<frontend_type>text</frontend_type>
|
3 |
|
4 |
<sections>
|
5 |
<points translate="label" module="points">
|
6 |
+
<label>PunchTab Points</label>
|
7 |
<tab>catalog</tab>
|
8 |
<frontend_type>text</frontend_type>
|
9 |
<sort_order>1000</sort_order>
|
12 |
<show_in_store>1</show_in_store>
|
13 |
<groups>
|
14 |
<settings translate="label">
|
15 |
+
<label>PunchTab Settings</label>
|
16 |
<frontend_type>text</frontend_type>
|
17 |
<sort_order>1</sort_order>
|
18 |
<show_in_default>1</show_in_default>
|
19 |
<show_in_website>1</show_in_website>
|
20 |
<show_in_store>1</show_in_store>
|
21 |
<fields>
|
22 |
+
<key translate="label">
|
23 |
+
<label>PunchTab Key</label>
|
24 |
+
<frontend_type>text</frontend_type>
|
|
|
25 |
<sort_order>1</sort_order>
|
26 |
<show_in_default>1</show_in_default>
|
27 |
<show_in_website>1</show_in_website>
|
28 |
<show_in_store>1</show_in_store>
|
29 |
+
</key>
|
30 |
+
<position translate="label">
|
31 |
+
<label>Rewards Display</label>
|
32 |
+
<frontend_type>select</frontend_type>
|
33 |
+
<source_model>points/backend_source_position</source_model>
|
34 |
<sort_order>2</sort_order>
|
35 |
<show_in_default>1</show_in_default>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
38 |
+
</position>
|
39 |
<multiple translate="label">
|
40 |
<label>Points Multiple</label>
|
41 |
<frontend_type>text</frontend_type>
|
app/design/frontend/base/default/layout/points.xml
CHANGED
@@ -7,6 +7,9 @@
|
|
7 |
<reference name="before_body_end">
|
8 |
<block type="points/pt" name="points_pt" before="-" template="points/pt.phtml"/>
|
9 |
</reference>
|
|
|
|
|
|
|
10 |
</default>
|
11 |
|
12 |
<catalog_product_view>
|
7 |
<reference name="before_body_end">
|
8 |
<block type="points/pt" name="points_pt" before="-" template="points/pt.phtml"/>
|
9 |
</reference>
|
10 |
+
<reference name="right">
|
11 |
+
<block type="points/sidebar" name="points_sidebar" before="-" template="points/sidebar.phtml"/>
|
12 |
+
</reference>
|
13 |
</default>
|
14 |
|
15 |
<catalog_product_view>
|
app/design/frontend/base/default/template/points/sidebar.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<div id="punchtab_widget"></div>
|
app/design/frontend/default/default/layout/points.xml
CHANGED
@@ -7,6 +7,9 @@
|
|
7 |
<reference name="before_body_end">
|
8 |
<block type="points/pt" name="points_pt" before="-" template="points/pt.phtml"/>
|
9 |
</reference>
|
|
|
|
|
|
|
10 |
</default>
|
11 |
|
12 |
<catalog_product_view>
|
7 |
<reference name="before_body_end">
|
8 |
<block type="points/pt" name="points_pt" before="-" template="points/pt.phtml"/>
|
9 |
</reference>
|
10 |
+
<reference name="right">
|
11 |
+
<block type="points/sidebar" name="points_sidebar" before="-" template="points/sidebar.phtml"/>
|
12 |
+
</reference>
|
13 |
</default>
|
14 |
|
15 |
<catalog_product_view>
|
app/design/frontend/default/default/template/points/sidebar.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<div id="punchtab_widget"></div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>punchtabpoints</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/lgpl-3.0.html">LGPL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -19,9 +19,9 @@ From purchases to social sharing, reward-enable any action you want to incentivi
|
|
19 |
* location of Rewards Tab on site pages
|
20 |
- Earn Reward Points at www.punchtab.com (reported when order completes successfully)</notes>
|
21 |
<authors><author><name>punchtab</name><user>auto-converted</user><email>apps@punchtab.com</email></author></authors>
|
22 |
-
<date>2011-11-
|
23 |
-
<time>
|
24 |
-
<contents><target name="magecommunity"><dir name="PunchTab"><dir name="Points"><dir name="Block"><dir name="Multishipping"><file name="Points.php" hash="2904825280ac274f1d89f84d363a32e2"/></dir><file name="Points.php" hash="5b7578288edc1fe6743b7eed502a5a5f"/><file name="Pt.php" hash="12f0a834df7a458e67f3b5035c89f050"/></dir><dir name="Helper"><file name="Data.php" hash="
|
25 |
<compatible/>
|
26 |
<dependencies/>
|
27 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>punchtabpoints</name>
|
4 |
+
<version>1.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/lgpl-3.0.html">LGPL 3.0</license>
|
7 |
<channel>community</channel>
|
19 |
* location of Rewards Tab on site pages
|
20 |
- Earn Reward Points at www.punchtab.com (reported when order completes successfully)</notes>
|
21 |
<authors><author><name>punchtab</name><user>auto-converted</user><email>apps@punchtab.com</email></author></authors>
|
22 |
+
<date>2011-11-29</date>
|
23 |
+
<time>02:49:23</time>
|
24 |
+
<contents><target name="magecommunity"><dir name="PunchTab"><dir name="Points"><dir name="Block"><dir name="Multishipping"><file name="Points.php" hash="2904825280ac274f1d89f84d363a32e2"/></dir><file name="Points.php" hash="5b7578288edc1fe6743b7eed502a5a5f"/><file name="Pt.php" hash="12f0a834df7a458e67f3b5035c89f050"/><file name="Sidebar.php" hash="5bf33a1f8399f6755d884794fb049cd0"/></dir><dir name="Helper"><file name="Data.php" hash="cd954975945776516fc99183ae3da61e"/></dir><dir name="Model"><dir name="Backend"><dir name="Source"><file name="Position.php" hash="80c4d2d40a00673ab7cd397d3f112f98"/></dir></dir><file name="Observer.php" hash="3ccd2b6754f6a858560c9f8d272f2716"/></dir><dir name="etc"><file name="config.xml" hash="fedf8aec537f4083be57073bd731308f"/><file name="system.xml" hash="5331b91ddf2baa81263b3e87093542f2"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PunchTab_Points.xml" hash="c4c05dc493146f8f6a04277724f544e3"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="points.xml" hash="c64d209ff4f3f423f173b3d85c470578"/></dir><dir name="template"><dir name="points"><dir name="multishipping"><file name="points.phtml" hash="17ff2427fe17c787c3708cfa00140f78"/></dir><file name="points.phtml" hash="17ff2427fe17c787c3708cfa00140f78"/><file name="pt.phtml" hash="27063bd14d7abb81baafed07cbbd5916"/><file name="sidebar.phtml" hash="568f4f7ac38ad1b1e0f2e4da21639a70"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="points.xml" hash="c64d209ff4f3f423f173b3d85c470578"/></dir><dir name="template"><dir name="points"><dir name="multishipping"><file name="points.phtml" hash="17ff2427fe17c787c3708cfa00140f78"/></dir><file name="points.phtml" hash="17ff2427fe17c787c3708cfa00140f78"/><file name="pt.phtml" hash="27063bd14d7abb81baafed07cbbd5916"/><file name="sidebar.phtml" hash="568f4f7ac38ad1b1e0f2e4da21639a70"/></dir></dir></dir></dir></dir></target></contents>
|
25 |
<compatible/>
|
26 |
<dependencies/>
|
27 |
</package>
|