Atwix_Recentlyviewed - Version 1.1

Version Notes

Version 1.1 Stable

New in version 1.1:

+ Added inline translation support

+ Added an option to increase the page height by the height of the Recently Viewed Products Bar, so it does not cover footer contents.

* Fixed issues in IE8

Download this release

Release Info

Developer Magento Core Team
Extension Atwix_Recentlyviewed
Version 1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 1.1

app/code/community/Atwix/Recentlyviewed/Block/Expand.php ADDED
@@ -0,0 +1,20 @@
1
+ <?php
2
+
3
+ class Atwix_Recentlyviewed_Block_Expand extends Mage_Core_Block_Template {
4
+
5
+ public function checkRVItems() {
6
+ $expand_status = Mage::getStoreConfig('recentlyviewed/general/enableextraspace');
7
+
8
+ if ($expand_status) {
9
+ $session = Mage::getSingleton('core/session');
10
+ $rw_items = $session->getRecView();
11
+ if (count($rw_items) > 0)
12
+ return true;
13
+ }
14
+
15
+ return false;
16
+ }
17
+
18
+ }
19
+
20
+ ?>
app/code/community/Atwix/Recentlyviewed/etc/config.xml CHANGED
@@ -35,6 +35,15 @@
35
</args>
36
</recentlyviewed>
37
</routers>
38
</frontend>
39
40
<adminhtml>
@@ -67,6 +76,7 @@
67
<general>
68
<enablemodule>1</enablemodule>
69
<itemscount>3</itemscount>
70
</general>
71
</recentlyviewed>
72
</default>
35
</args>
36
</recentlyviewed>
37
</routers>
38
+ <translate>
39
+ <modules>
40
+ <recentlyviewed>
41
+ <files>
42
+ <default>Atwix_recentlyviewed.csv</default>
43
+ </files>
44
+ </recentlyviewed>
45
+ </modules>
46
+ </translate>
47
</frontend>
48
49
<adminhtml>
76
<general>
77
<enablemodule>1</enablemodule>
78
<itemscount>3</itemscount>
79
+ <enableextraspace>1</enableextraspace>
80
</general>
81
</recentlyviewed>
82
</default>
app/code/community/Atwix/Recentlyviewed/etc/system.xml CHANGED
@@ -42,6 +42,17 @@
42
<show_in_website>1</show_in_website>
43
<show_in_store>1</show_in_store>
44
</itemscount>
45
</fields>
46
</general>
47
</groups>
42
<show_in_website>1</show_in_website>
43
<show_in_store>1</show_in_store>
44
</itemscount>
45
+ <enableextraspace translate="label">
46
+ <label>Add Footer Extra Space</label>
47
+ <comment></comment>
48
+ <frontend_type>select</frontend_type>
49
+ <source_model>adminhtml/system_config_source_yesno</source_model>
50
+ <sort_order>60</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ <can_be_empty>1</can_be_empty>
55
+ </enableextraspace>
56
</fields>
57
</general>
58
</groups>
app/design/frontend/base/default/layout/recentlyviewed.xml CHANGED
@@ -9,6 +9,9 @@
9
<reference name="content">
10
<block type="recentlyviewed/view" name="recentlyviewed" template="recentlyviewed/view.phtml"/>
11
</reference>
12
</default>
13
<catalog_product_view>
14
<reference name="content">
9
<reference name="content">
10
<block type="recentlyviewed/view" name="recentlyviewed" template="recentlyviewed/view.phtml"/>
11
</reference>
12
+ <reference name="before_body_end">
13
+ <block type="recentlyviewed/expand" name="rvi_expand" template="recentlyviewed/expand.phtml"/>
14
+ </reference>
15
</default>
16
<catalog_product_view>
17
<reference name="content">
app/design/frontend/base/default/template/recentlyviewed/expand.phtml ADDED
@@ -0,0 +1,5 @@
1
+ <?php
2
+ $RVI_present = $this->checkRVItems();
3
+ if ($RVI_present) : ?>
4
+ <div class="rvi-expander"></div>
5
+ <? endif; ?>
app/design/frontend/base/default/template/recentlyviewed/view.phtml CHANGED
@@ -1,7 +1,8 @@
1
- <?
2
3
$rw_items = $this->CollectRecentlyViewed();
4
$panel_state = $this->checkPanelState();
5
if (is_array($rw_items) && count($rw_items) > 0) {
6
$prodmodel = Mage::getModel('catalog/product');
7
$imagemodel = Mage::helper('catalog/image')->init($prodmodel, 'small_image');
@@ -17,7 +18,7 @@ $imagemodel = Mage::helper('catalog/image')->init($prodmodel, 'small_image');
17
<tr>
18
<td width="90%" valign="middle">
19
<div class="rw-block">
20
- <div class="rw-title">Recently Viewed:</div>
21
<? foreach ($rw_items as $rw_item) {
22
$prodmodel->load($rw_item);
23
$imagemodel->init($prodmodel, 'small_image')->resize(45); ?>
1
+ <?php
2
3
$rw_items = $this->CollectRecentlyViewed();
4
$panel_state = $this->checkPanelState();
5
+ echo "Panelstata ".$panel_state;
6
if (is_array($rw_items) && count($rw_items) > 0) {
7
$prodmodel = Mage::getModel('catalog/product');
8
$imagemodel = Mage::helper('catalog/image')->init($prodmodel, 'small_image');
18
<tr>
19
<td width="90%" valign="middle">
20
<div class="rw-block">
21
+ <div class="rw-title"><?=$this->__('Recently Viewed: ');?></div>
22
<? foreach ($rw_items as $rw_item) {
23
$prodmodel->load($rw_item);
24
$imagemodel->init($prodmodel, 'small_image')->resize(45); ?>
app/locale/en_US/Atwix_recentlyviewed.csv ADDED
@@ -0,0 +1,2 @@
1
+ "",""
2
+ "Recently Viewed: ", "Recently Viewed: "
js/atwix_recentlyviewed/recentlyviewed.js CHANGED
@@ -2,8 +2,9 @@
2
var atwix_base_url;
3
4
jq(document).ready(function() {
5
- jq('.rw-thumb').hover(function() { atwix_showPreview(jq(this)); }, function() { atwix_hidePreviews(); });
6
- jq('.rvi_btn').click(function() { togglePanel(); } )
7
});
8
9
function atwix_showPreview(prod) {
@@ -14,7 +15,8 @@ function atwix_showPreview(prod) {
14
15
function atwix_hidePreviews() {
16
jq('.rw-thumb').removeClass('rw-thumb-selected');
17
- jq(".rw-preview-wrapper").fadeOut('fast');
18
}
19
20
function togglePanel() {
@@ -33,3 +35,5 @@ function togglePanel() {
33
function setPanelState(state, site_url) {
34
jq.post(atwix_base_url+'rvi_panelstate/ajax/panelstate/', {state: state});
35
}
2
var atwix_base_url;
3
4
jq(document).ready(function() {
5
+ jq('.rw-thumb').mouseenter(function() { atwix_showPreview(jq(this)); });
6
+ jq('.rw-thumb').mouseleave(function() { atwix_hidePreviews(); });
7
+ jq('.rvi_btn').click(function() {togglePanel();} )
8
});
9
10
function atwix_showPreview(prod) {
15
16
function atwix_hidePreviews() {
17
jq('.rw-thumb').removeClass('rw-thumb-selected');
18
+ //jq(".rw-preview-wrapper").fadeOut('fast');
19
+ jq(".rw-preview-wrapper").hide();
20
}
21
22
function togglePanel() {
35
function setPanelState(state, site_url) {
36
jq.post(atwix_base_url+'rvi_panelstate/ajax/panelstate/', {state: state});
37
}
38
+
39
+
package.xml CHANGED
@@ -1,18 +1,26 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Atwix_Recentlyviewed</name>
4
- <version>0.1.0</version>
5
<stability>stable</stability>
6
<license>GPL</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Atwix Recently Viewed Items Bar</summary>
10
<description>Atwix Recently Viewed Items Bar shows a list of recently viewed products for customer.</description>
11
- <notes>Version 0.1.0 Stable</notes>
12
- <authors><author><name>atwix</name><user>auto-converted</user><email>magento@atwix.com</email></author></authors>
13
- <date>2011-01-27</date>
14
- <time>16:59:36</time>
15
- <contents><target name="magecommunity"><dir name="Atwix"><dir name="Recentlyviewed"><dir name="Block"><file name="Collect.php" hash="350a4e3e4755b54241e60e552d628335"/><file name="View.php" hash="a35bf9cae926295eb8510d145eacb0fb"/></dir><dir name="controllers"><file name="AjaxController.php" hash="ac6c88249ad233920840bdc3bf2b3703"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e23e673d2704f72c44cc9b3ed0ae336c"/><file name="config.xml" hash="29f63a7197fbf67e2d66044c42306dd2"/><file name="system.xml" hash="5b4482a77c6b37e981af5854ded5e2ef"/></dir><dir name="Helper"><file name="Data.php" hash="3ce9c1c49cc384bd46a7aa0c744e4ce9"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="recentlyviewed.xml" hash="ec18742973e0cac9c455ebd7fd693186"/></dir><dir name="template"><dir name="recentlyviewed"><file name="collect.phtml" hash="64695dad1338b524044eeefa06c1d96c"/><file name="view.phtml" hash="b787413b03636255bcaa4d47dafb240c"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="recentlyviewed"><dir name="css"><file name="recentlyviewed.css" hash="58b2de8e0ac2e20d872b775862d526b2"/></dir><dir name="images"><file name="btnhide.gif" hash="dc0252ae36397e71c89f6f084616011a"/><file name="btnshow.gif" hash="9c33cc55e0efb5d6212a7b668ea1e270"/><file name="rvi-footer.jpg" hash="926f12531d37f15ceb7c5ec12f76b3cb"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="atwix_recentlyviewed"><file name="jquery.js" hash="59fa85cd74410b80b2dd820b9b9fee53"/><file name="recentlyviewed.js" hash="6dfe776e23bfe9e28de78f230cb7edf2"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Atwix_All.xml" hash="25af9dd0133177b16161f42e89af066a"/></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Atwix_Recentlyviewed</name>
4
+ <version>1.1</version>
5
<stability>stable</stability>
6
<license>GPL</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Atwix Recently Viewed Items Bar</summary>
10
<description>Atwix Recently Viewed Items Bar shows a list of recently viewed products for customer.</description>
11
+ <notes>Version 1.1 Stable
12
+
13
+ New in version 1.1:
14
+
15
+ + Added inline translation support
16
+
17
+ + Added an option to increase the page height by the height of the Recently Viewed Products Bar, so it does not cover footer contents.
18
+
19
+ * Fixed issues in IE8</notes>
20
+ <authors><author><name>atwix</name><user>auto-converted</user><email>info@atwix.com</email></author></authors>
21
+ <date>2011-02-23</date>
22
+ <time>11:54:16</time>
23
+ <contents><target name="magecommunity"><dir name="Atwix"><dir name="Recentlyviewed"><dir name="Block"><file name="Collect.php" hash="350a4e3e4755b54241e60e552d628335"/><file name="Expand.php" hash="be8a6233defa3198a3fb4a1b8953c198"/><file name="View.php" hash="a35bf9cae926295eb8510d145eacb0fb"/></dir><dir name="controllers"><file name="AjaxController.php" hash="ac6c88249ad233920840bdc3bf2b3703"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e23e673d2704f72c44cc9b3ed0ae336c"/><file name="config.xml" hash="c37f12509a2fbf4cf4fdf76bf80a0464"/><file name="system.xml" hash="44a1bc5caee6785f1bea9f45ef6a4cf2"/></dir><dir name="Helper"><file name="Data.php" hash="3ce9c1c49cc384bd46a7aa0c744e4ce9"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Atwix_recentlyviewed.csv" hash="14a2f9b4019b8b7efa0b950160526b3e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="recentlyviewed.xml" hash="f82aa3a5b5c89bdb479f634d85c47d6c"/></dir><dir name="template"><dir name="recentlyviewed"><file name="collect.phtml" hash="64695dad1338b524044eeefa06c1d96c"/><file name="expand.phtml" hash="c1f67ba5bbe457f8c2c1ac2d6aa8697d"/><file name="view.phtml" hash="4de894038e2fcfb518ff111a60761146"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="recentlyviewed"><dir name="css"><file name="recentlyviewed.css" hash="f43400829d51b52ce6207c712e8f2d9e"/></dir><dir name="images"><file name="btnhide.gif" hash="dc0252ae36397e71c89f6f084616011a"/><file name="btnshow.gif" hash="9c33cc55e0efb5d6212a7b668ea1e270"/><file name="rvi-footer.jpg" hash="926f12531d37f15ceb7c5ec12f76b3cb"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="atwix_recentlyviewed"><file name="jquery.js" hash="59fa85cd74410b80b2dd820b9b9fee53"/><file name="recentlyviewed.js" hash="bcfdec68a20cdbf6cbacf6d2e51a197a"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Atwix_All.xml" hash="25af9dd0133177b16161f42e89af066a"/></dir></target></contents>
24
<compatible/>
25
<dependencies/>
26
</package>
skin/frontend/base/default/recentlyviewed/css/recentlyviewed.css CHANGED
@@ -86,3 +86,8 @@
86
background-color: #B4B4B4;
87
border-bottom: 1px solid #CCC;
88
}
86
background-color: #B4B4B4;
87
border-bottom: 1px solid #CCC;
88
}
89
+
90
+ .rvi-expander {
91
+ width: 100%;
92
+ height: 55px;
93
+ }