Recent_Products_Review - Version 1.0.3

Version Notes

Minior bug

Download this release

Release Info

Developer SetuBridge
Extension Recent_Products_Review
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/local/Sbridge/Recentreview/etc/system.xml CHANGED
@@ -39,7 +39,7 @@
39
  <show_in_default>1</show_in_default>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
- <source_model>recentreview_adminhtml/system_config_source_MyCustomOptions</source_model>
43
  </homepage_area>
44
  <homepage_character>
45
  <label>Character limit </label>
39
  <show_in_default>1</show_in_default>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
+ <source_model>Sbridge_Recentreview_Adminhtml_Model_System_Config_Source_Mycustomoptions</source_model>
43
  </homepage_area>
44
  <homepage_character>
45
  <label>Character limit </label>
app/design/frontend/rwd/default/layout/recentreview.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss" ifconfig="review_section/recentreview_group/homepage_enable"><stylesheeet>css/recentreview.css</stylesheeet></action>
6
+ <action method="addItem" ifconfig="review_section/recentreview_group/homepage_enable">
7
+ <type>skin_js</type>
8
+ <name>js/recentreview/recentreview.js</name>
9
+ <params/>
10
+ </action>
11
+ </reference>
12
+
13
+ <reference name="right">
14
+ <block type="core/template" name="right.review" template="recentreview/recent_review.phtml"/>
15
+ </reference>
16
+
17
+ <reference name="left">
18
+ <block type="core/template" name="left.review" template="recentreview/recent_review.phtml"/>
19
+ </reference>
20
+ </default>
21
+ </layout>
app/design/frontend/rwd/default/template/recentreview/recent_review.phtml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Setubridge Technolabs
4
+ * http://www.setubridge.com/
5
+ * @author SetuBridge
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ **/
8
+ ?>
9
+ <?php
10
+ $reviews_all = Mage::getModel('recentreview/recentreview')->getRecentreviews();
11
+ if($reviews_all):
12
+ $recentReviewGroup = Mage::getStoreConfig('review_section/recentreview_group');
13
+ if($recentReviewGroup['homepage_enable'] == 1):
14
+ if($this->getNameInLayout() == "left.review" && $recentReviewGroup['homepage_area'] == "left" || $this->getNameInLayout() == "right.review" && $recentReviewGroup['homepage_area'] == "right"):
15
+ $i=0;
16
+ ?>
17
+ <div class="block block-recent-review">
18
+ <div class="block-title">
19
+ <strong>
20
+ <span><?php echo $this->__('Recent Reviews');?></span>
21
+ </strong>
22
+ </div>
23
+ <div class="content">
24
+ <?php
25
+ foreach($reviews_all as $review):
26
+ if($review['imageValue'] === "no_selection" || $review['imageValue'] == NULL):
27
+ $newPath = Mage::getModel('catalog/product')->getSmallImageUrl(75);
28
+ else:
29
+ $newPath= $this->helper('catalog/image')->init($review['imageValue'], 'small_image',$review['imageValue'])->resize(75);
30
+ endif;
31
+ $reviewUrlId = Mage::getUrl('review/product/list', array('id'=> $review['entity_pk_value']));
32
+ $rating = Mage::getModel('rating/rating')->load($review['entity_pk_value']);
33
+ ?>
34
+ <div class="RecentReview-Items">
35
+ <div class="RecentReview-ProdDetails">
36
+ <div class="RecentReview-ProdInfo">
37
+ <div class="RecentReview-ProdImage">
38
+ <a href="<?php echo Mage::getBaseUrl().$review['value']; ?>">
39
+ <img src="<?php echo $newPath; ?>" title="<?php echo $review['productName'];?>">
40
+ </a>
41
+ </div>
42
+ <div class="product-name RecentReview-ProdName">
43
+ <a href="<?php echo Mage::getBaseUrl().$review['value']; ?>" title="<?php echo $review['productName'];?>">
44
+ <span><?php echo $review['productName'];?></span>
45
+ </a>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ <div class="RecentReview-ProdReviews">
50
+ <div class="RecentReview-Title">
51
+ <a href="<?php echo $reviewUrlId;?>" title="Open Full Review of <?php echo $review['productName'];?>">
52
+ <span><?php echo $this->htmlEscape($review['title']);?></span>
53
+ </a>
54
+ </div>
55
+ <div class="RecentReview-ReviewDate">
56
+ <small class="date"><?php $this->__('(Posted on %s)', $this->formatDate($review['created_at']), 'long');
57
+ echo date('M d,Y', strtotime($review['created_at']));
58
+ ?></small>
59
+ </div>
60
+ <?php $summaryData = Mage::getModel('review/review_summary')->load($review['entity_pk_value']);?>
61
+ <?php if($summaryData->getRatingSummary()):?>
62
+ <div class="rating-box">
63
+ <div class="rating" style="width:<?php echo $summaryData->getRatingSummary(); ?>%;"></div>
64
+ </div>
65
+ <?php endif; ?>
66
+ <div class="RecentReview-DetailReview">
67
+ <?php
68
+ if(round($recentReviewGroup['homepage_character']) == "" || round($recentReviewGroup['homepage_character']) == null || strlen($review['detail']) <= round($recentReviewGroup['homepage_character'])):
69
+ echo nl2br($this->htmlEscape($review['detail']))."</div>";
70
+ else:
71
+ echo substr($review['detail'],0,round($recentReviewGroup['homepage_character']))?>
72
+ <?php echo $this->__('...')?><a class='RecentReview-read read open' id="<?php echo "read_".$i;?>" onclick="sbreadmore('<?php echo "read_".$i;?>')" title="Read More"><span><?php echo $this->__('Read More');?></span></a></div>
73
+ <div class="RecentReview-DetailReview sbfull" id="<?php echo "close_$i"?>" style="display: none;"><?php echo nl2br($this->htmlEscape($review['detail'])); ?>
74
+ <a id="<?php echo "read_".$i;?>" onclick="sbclose('<?php echo "close_".$i;?>')" title="Read Less"><span><?php echo $this->__('Close');?></span></a>
75
+ </div>
76
+ <?php endif;?>
77
+ </div>
78
+ <div class="RecentReview-ReviewAuthor">
79
+ <span><?php echo $this->__('Review by <span>%s</span>', $this->htmlEscape($review['nickname']));?></span>
80
+ </div>
81
+ </div>
82
+ <?php $i++;
83
+ endforeach;?>
84
+ </div>
85
+ </div>
86
+ <?php
87
+ endif;
88
+ endif;
89
+ endif;?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Recent_Products_Review</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>OSLv3.0</license>
7
  <channel>community</channel>
@@ -29,11 +29,11 @@ By displaying like this you get the attention of your customers to recently revi
29
  &lt;li&gt;Compatible with Latest Magento community additions&lt;/li&gt;&#xD;
30
  &lt;li&gt;Follows Magento Coding standards&lt;/li&gt;&#xD;
31
  </description>
32
- <notes>Added support for Magento 1.9</notes>
33
  <authors><author><name>SetuBridge</name><user>Technolabs</user><email>support@setubridge.com</email></author></authors>
34
- <date>2014-08-07</date>
35
- <time>07:33:09</time>
36
- <contents><target name="magelocal"><dir name="Sbridge"><dir name="Recentreview"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Mycustomoptions.php" hash="5b250f7827ca420cedfa3aaab674a65c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d499ede872fa94ace0a7e849b9a5d7ea"/></dir><dir name="Model"><file name="Recentreview.php" hash="23392cab843dc2350b10b3bcd17eb41a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="04bc640ab89340c1c437ce60bf805c56"/><file name="config.xml" hash="c14b7f822a80f68a94fc2c26b55602b7"/><file name="system.xml" hash="6eb7eb563af63f41c6e1b73ee0364021"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sbridge_Recentreview.xml" hash="181c4633ecd0a23ce343054d8f2482de"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash="8c0ae810eecf1ff14a6072b0f25b4c49"/></dir><dir name="template"><dir name="recentreview"><file name="recent_review.phtml" hash="0831a539694abb176f5df26a08b65263"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash="8c0ae810eecf1ff14a6072b0f25b4c49"/></dir><dir name="template"><dir name="recentreview"><file name="recent_review.phtml" hash="0831a539694abb176f5df26a08b65263"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash=""/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="recentreview.css" hash="81a90dc808f64bcd4238037321eb566f"/></dir><dir name="js"><dir name="recentreview"><file name="recentreview.js" hash="471eafcb0a396c93a468a731eee64fc5"/></dir></dir><dir name="images"><dir name="recentreview"><file name="Thumbs.db" hash="528bd5eda16287728a97730440bb324f"/><file name="review-icon.png" hash="dc43e0a19863ab7309de3dc82b3dbf16"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="css"><file name="recentreview.css" hash="81a90dc808f64bcd4238037321eb566f"/></dir><dir name="js"><dir name="recentreview"><file name="recentreview.js" hash="471eafcb0a396c93a468a731eee64fc5"/></dir></dir><dir name="images"><dir name="recentreview"><file name="review-icon.png" hash="dc43e0a19863ab7309de3dc82b3dbf16"/></dir></dir></dir></dir></dir></target></contents>
37
  <compatible/>
38
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
39
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Recent_Products_Review</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>OSLv3.0</license>
7
  <channel>community</channel>
29
  &lt;li&gt;Compatible with Latest Magento community additions&lt;/li&gt;&#xD;
30
  &lt;li&gt;Follows Magento Coding standards&lt;/li&gt;&#xD;
31
  </description>
32
+ <notes>Minior bug</notes>
33
  <authors><author><name>SetuBridge</name><user>Technolabs</user><email>support@setubridge.com</email></author></authors>
34
+ <date>2014-10-01</date>
35
+ <time>06:53:42</time>
36
+ <contents><target name="magelocal"><dir name="Sbridge"><dir name="Recentreview"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Mycustomoptions.php" hash="5b250f7827ca420cedfa3aaab674a65c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d499ede872fa94ace0a7e849b9a5d7ea"/></dir><dir name="Model"><file name="Recentreview.php" hash="23392cab843dc2350b10b3bcd17eb41a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="04bc640ab89340c1c437ce60bf805c56"/><file name="config.xml" hash="c14b7f822a80f68a94fc2c26b55602b7"/><file name="system.xml" hash="3bdb597962cc571417b516c87e580f9c"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sbridge_Recentreview.xml" hash="181c4633ecd0a23ce343054d8f2482de"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash="8c0ae810eecf1ff14a6072b0f25b4c49"/></dir><dir name="template"><dir name="recentreview"><file name="recent_review.phtml" hash="0831a539694abb176f5df26a08b65263"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash="8c0ae810eecf1ff14a6072b0f25b4c49"/></dir><dir name="template"><dir name="recentreview"><file name="recent_review.phtml" hash="0831a539694abb176f5df26a08b65263"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash="8c0ae810eecf1ff14a6072b0f25b4c49"/></dir><dir name="template"><dir name="recentreview"><file name="recent_review.phtml" hash="0831a539694abb176f5df26a08b65263"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="recentreview.xml" hash=""/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="recentreview.css" hash="146a2d20831d85d491ce70d89520654a"/></dir><dir name="js"><dir name="recentreview"><file name="recentreview.js" hash="471eafcb0a396c93a468a731eee64fc5"/></dir></dir><dir name="images"><dir name="recentreview"><file name="Thumbs.db" hash="528bd5eda16287728a97730440bb324f"/><file name="review-icon.png" hash="dc43e0a19863ab7309de3dc82b3dbf16"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="css"><file name="recentreview.css" hash="146a2d20831d85d491ce70d89520654a"/></dir><dir name="js"><dir name="recentreview"><file name="recentreview.js" hash="471eafcb0a396c93a468a731eee64fc5"/></dir></dir><dir name="images"><dir name="recentreview"><file name="review-icon.png" hash="dc43e0a19863ab7309de3dc82b3dbf16"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="css"><file name="recentreview.css" hash="146a2d20831d85d491ce70d89520654a"/></dir><dir name="js"><dir name="recentreview"><file name="recentreview.js" hash="471eafcb0a396c93a468a731eee64fc5"/></dir></dir><dir name="images"><dir name="recentreview"><file name="Thumbs.db" hash="528bd5eda16287728a97730440bb324f"/><file name="review-icon.png" hash="dc43e0a19863ab7309de3dc82b3dbf16"/></dir></dir></dir></dir></dir></target></contents>
37
  <compatible/>
38
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
39
  </package>
skin/frontend/base/default/css/recentreview.css CHANGED
@@ -35,7 +35,7 @@
35
  .block-recent-review .content {padding: 5px;}
36
  .block-recent-review .block-title strong
37
  {
38
- background:url("../images/recentreview/review-icon.PNG") no-repeat scroll 5px 1px rgba(0, 0, 0, 0);
39
  padding-left: 25px;
40
  }
41
  .content .RecentReview-Items:last-child {border-bottom: 0 none;}
35
  .block-recent-review .content {padding: 5px;}
36
  .block-recent-review .block-title strong
37
  {
38
+ background:url("../images/recentreview/review-icon.png") no-repeat scroll 5px 1px rgba(0, 0, 0, 0);
39
  padding-left: 25px;
40
  }
41
  .content .RecentReview-Items:last-child {border-bottom: 0 none;}
skin/frontend/default/default/css/recentreview.css CHANGED
@@ -35,7 +35,7 @@
35
  .block-recent-review .content {padding: 5px;}
36
  .block-recent-review .block-title strong
37
  {
38
- background:url("../images/recentreview/review-icon.PNG") no-repeat scroll 5px 1px rgba(0, 0, 0, 0);
39
  padding-left: 25px;
40
  }
41
  .content .RecentReview-Items:last-child {border-bottom: 0 none;}
35
  .block-recent-review .content {padding: 5px;}
36
  .block-recent-review .block-title strong
37
  {
38
+ background:url("../images/recentreview/review-icon.png") no-repeat scroll 5px 1px rgba(0, 0, 0, 0);
39
  padding-left: 25px;
40
  }
41
  .content .RecentReview-Items:last-child {border-bottom: 0 none;}
skin/frontend/rwd/default/css/recentreview.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Setubridge Technolabs
3
+ * http://www.setubridge.com/
4
+ * @author SetuBridge
5
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
6
+ **/
7
+
8
+ .RecentReview .DetailReview {word-break: break-all;}
9
+ .RecentReview-ProdImage
10
+ {
11
+ float: left;
12
+ margin-left: 5px;
13
+ margin-top: 5px;
14
+ margin-right: 10px;
15
+ }
16
+ .ProdName{margin-top: 5px;}
17
+ .ProdReviews
18
+ {
19
+ border-left: 1px solid #C4C1BC;
20
+ padding: 5px;
21
+ }
22
+ .RecentReview-ProdReviews {word-break: break-all;}
23
+ .RecentReview-Items {border-bottom: 1px solid #CCCCCC;}
24
+ .ratings-table {
25
+ clear: both;
26
+ margin-bottom: 10px;
27
+ }
28
+ .RecentReview-DetailReview {margin: 5px;}
29
+ .RecentReview-DetailReview.sbfull {margin: 5px;}
30
+ .RecentReview-ReviewAuthor {padding-left: 5px;}
31
+ .RecentReview-ReviewDate {font-style: italic;}
32
+ .RecentReview-DetailReview.sbfull a {cursor: pointer;}
33
+ .RecentReview-read.read {cursor: pointer;}
34
+ .RecentReview-ProdName {word-break: break-all;}
35
+ .block-recent-review .content {padding: 5px;}
36
+ .block-recent-review .block-title strong
37
+ {
38
+ background:url("../images/recentreview/review-icon.png") no-repeat scroll 5px 1px rgba(0, 0, 0, 0);
39
+ padding-left: 25px;
40
+ }
41
+ .content .RecentReview-Items:last-child {border-bottom: 0 none;}
skin/frontend/rwd/default/images/recentreview/Thumbs.db ADDED
Binary file
skin/frontend/rwd/default/images/recentreview/review-icon.png ADDED
Binary file
skin/frontend/rwd/default/js/recentreview/recentreview.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Setubridge Technolabs
3
+ * http://www.setubridge.com/
4
+ * @author SetuBridge
5
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
6
+ **/
7
+ function sbclose(group1)
8
+ {
9
+ if($(group1).hasClassName('sbfull'))
10
+ {
11
+ $(group1).hide();
12
+ $(group1).previous().show();
13
+ }
14
+ }
15
+ function sbreadmore(group)
16
+ {
17
+ if($(group).hasClassName('open'))
18
+ {
19
+ $(group).parentNode.hide();
20
+ var ne = $(group).parentNode.next()
21
+ ne.show();
22
+ }
23
+ }