orange_bestsellers - Version 0.1.2

Version Notes

Stable release

Download this release

Release Info

Developer Développeurs EnvoiMoinsCher.com
Extension orange_bestsellers
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/community/Orange/Bestsellers/Model/Bestsellers.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  class Orange_Bestsellers_Model_Bestsellers extends Mage_Core_Model_Abstract
3
  {
4
  function getStoreData($item)
@@ -21,6 +25,14 @@ class Orange_Bestsellers_Model_Bestsellers extends Mage_Core_Model_Abstract
21
  {
22
  return $this->getStoreData('addtocart');
23
  }
 
 
 
 
 
 
 
 
24
  public function data()
25
  {
26
  $_limit = $this->getStoreData('display_products');
1
  <?php
2
+ /*
3
+ author: SB
4
+ support: mage.ext@gmail.com
5
+ */
6
  class Orange_Bestsellers_Model_Bestsellers extends Mage_Core_Model_Abstract
7
  {
8
  function getStoreData($item)
25
  {
26
  return $this->getStoreData('addtocart');
27
  }
28
+ public function wishlistLink()
29
+ {
30
+ return $this->getStoreData('wishlist_link');
31
+ }
32
+ public function compareLink()
33
+ {
34
+ return $this->getStoreData('compare_link');
35
+ }
36
  public function data()
37
  {
38
  $_limit = $this->getStoreData('display_products');
app/code/community/Orange/Bestsellers/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Orange_Bestsellers>
5
- <version>0.1.0</version>
6
  </Orange_Bestsellers>
7
  </modules>
8
  <frontend>
@@ -48,6 +48,8 @@
48
  <block_title>Bestsellers</block_title>
49
  <display_products>3</display_products>
50
  <addtocart>1</addtocart>
 
 
51
  </settings>
52
  </orange_bestsellers>
53
  </default>
2
  <config>
3
  <modules>
4
  <Orange_Bestsellers>
5
+ <version>0.1.2</version>
6
  </Orange_Bestsellers>
7
  </modules>
8
  <frontend>
48
  <block_title>Bestsellers</block_title>
49
  <display_products>3</display_products>
50
  <addtocart>1</addtocart>
51
+ <wishlist_link>1</wishlist_link>
52
+ <compare_link>1</compare_link>
53
  </settings>
54
  </orange_bestsellers>
55
  </default>
app/code/community/Orange/Bestsellers/etc/system.xml CHANGED
@@ -73,6 +73,24 @@
73
  <show_in_website>1</show_in_website>
74
  <show_in_store>1</show_in_store>
75
  </addtocart>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  </fields>
77
  </settings>
78
  </groups>
73
  <show_in_website>1</show_in_website>
74
  <show_in_store>1</show_in_store>
75
  </addtocart>
76
+ <wishlist_link translate="label">
77
+ <label>Wishlist link</label>
78
+ <frontend_type>select</frontend_type>
79
+ <source_model>adminhtml/system_config_source_yesno</source_model>
80
+ <sort_order>6</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ </wishlist_link>
85
+ <compare_link translate="label">
86
+ <label>Compare link</label>
87
+ <frontend_type>select</frontend_type>
88
+ <source_model>adminhtml/system_config_source_yesno</source_model>
89
+ <sort_order>7</sort_order>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>1</show_in_website>
92
+ <show_in_store>1</show_in_store>
93
+ </compare_link>
94
  </fields>
95
  </settings>
96
  </groups>
app/design/frontend/base/default/template/orange/bestsellers/bestsellers.phtml CHANGED
@@ -29,14 +29,16 @@
29
  <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
30
  <?php endif; ?>
31
  <?php endif ?>
 
32
  <ul class="add-to-links">
33
- <?php if ($this->helper('wishlist')->isAllow()) : ?>
34
  <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
35
  <?php endif; ?>
36
- <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
37
  <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
38
  <?php endif; ?>
39
  </ul>
 
40
  </div>
41
  </div>
42
  </li>
29
  <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
30
  <?php endif; ?>
31
  <?php endif ?>
32
+ <?php if($_bestsellers->wishlistLink() || $_bestsellers->compareLink()): ?>
33
  <ul class="add-to-links">
34
+ <?php if ($this->helper('wishlist')->isAllow() && $_bestsellers->wishlistLink()) : ?>
35
  <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
36
  <?php endif; ?>
37
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product) && $_bestsellers->compareLink()): ?>
38
  <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
39
  <?php endif; ?>
40
  </ul>
41
+ <?php endif ?>
42
  </div>
43
  </div>
44
  </li>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>orange_bestsellers</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license>Open Software License</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Magento Bestsellers module automatically generates the list of your online store's best selling products.</description>
11
  <notes>Stable release</notes>
12
  <authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
13
- <date>2013-01-10</date>
14
- <time>19:26:13</time>
15
- <contents><target name="magecommunity"><dir name="Orange"><dir name="Bestsellers"><dir name="Model"><file name="Bestsellers.php" hash="83afd792fc032182362b55e123df324f"/></dir><dir name="etc"><file name="config.xml" hash="e656c0d60dbbdfc86ea68ac2338e746b"/><file name="system.xml" hash="8333ecc9a2c3f667e1dd01ed5ba86579"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="orange"><dir name="bestsellers"><file name="bestsellers.phtml" hash="04e80744562906390b3083c35f7d8a5c"/></dir></dir></dir><dir name="layout"><file name="orange_bestsellers.xml" hash="ae2cc5a442b6efae19627bab11746fc0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orange_Bestsellers.xml" hash="396d6d0b972577b89acf6c437a3e54e3"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>orange_bestsellers</name>
4
+ <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license>Open Software License</license>
7
  <channel>community</channel>
10
  <description>Magento Bestsellers module automatically generates the list of your online store's best selling products.</description>
11
  <notes>Stable release</notes>
12
  <authors><author><name>Mage</name><user>Dev</user><email>mage.ext@gmail.com</email></author></authors>
13
+ <date>2013-01-15</date>
14
+ <time>19:10:12</time>
15
+ <contents><target name="magecommunity"><dir name="Orange"><dir name="Bestsellers"><dir name="Model"><file name="Bestsellers.php" hash="a7e1e9ad60b9b1ada7465e7b46eec239"/></dir><dir name="etc"><file name="config.xml" hash="2265a05057a2af8a4cc7ed9e8989b2ed"/><file name="system.xml" hash="0c2cf5f1c5784b20006d858800977175"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="orange"><dir name="bestsellers"><file name="bestsellers.phtml" hash="47b42031c78f1b0c4115c154491b8be9"/></dir></dir></dir><dir name="layout"><file name="orange_bestsellers.xml" hash="ae2cc5a442b6efae19627bab11746fc0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orange_Bestsellers.xml" hash="396d6d0b972577b89acf6c437a3e54e3"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>