Version Notes
1.2.1
Download this release
Release Info
Developer | EcomwiseTeam |
Extension | Ecomwise_BestsellerSidebarFree |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- app/code/community/Ecomwise/FreeBestsellerssidebar/Block/Abstract.php +7 -7
- app/code/community/Ecomwise/FreeBestsellerssidebar/Block/Adminhtml/Support.php +2 -2
- app/code/community/Ecomwise/FreeBestsellerssidebar/etc/config.xml +2 -2
- app/design/frontend/base/default/layout/freebestsellerssidebar.xml +2 -7
- app/design/frontend/base/default/template/freebestsellerssidebar/freebestsellerssidebar.phtml +53 -53
- package.xml +5 -5
app/code/community/Ecomwise/FreeBestsellerssidebar/Block/Abstract.php
CHANGED
@@ -53,13 +53,13 @@ class Ecomwise_FreeBestsellerssidebar_Block_Abstract extends Mage_Core_Block_Tem
|
|
53 |
|
54 |
private function getProductsCollection()
|
55 |
{
|
56 |
-
$
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
return $productCollection;
|
65 |
}
|
53 |
|
54 |
private function getProductsCollection()
|
55 |
{
|
56 |
+
$connection = Mage::getModel('core/resource')->getConnection('core_read');
|
57 |
+
$sql = 'SELECT DISTINCT product_id FROM sales_bestsellers_aggregated_daily ORDER BY qty_ordered DESC';
|
58 |
+
$product_ids = $connection->fetchAll($sql);
|
59 |
+
|
60 |
+
$productCollection = Mage::getModel('catalog/product')->getCollection()
|
61 |
+
->addAttributeToFilter('entity_id', array('in' => $product_ids))
|
62 |
+
->setPageSize(3);
|
63 |
|
64 |
return $productCollection;
|
65 |
}
|
app/code/community/Ecomwise/FreeBestsellerssidebar/Block/Adminhtml/Support.php
CHANGED
@@ -10,8 +10,8 @@ class Ecomwise_FreeBestsellerssidebar_Block_Adminhtml_Support extends Mage_Admin
|
|
10 |
public $email = 'feedback@ecomwise.com';
|
11 |
public $faq = 'http://support.ecomwise.com/support/solutions/folders/111251';
|
12 |
public $name = 'Bestseller Sidebar Free';
|
13 |
-
public $compatibility = 'Magento CE 1.7-1.9';
|
14 |
-
public $manualUrl = 'http://support.ecomwise.com/support/solutions/articles/
|
15 |
|
16 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
17 |
{
|
10 |
public $email = 'feedback@ecomwise.com';
|
11 |
public $faq = 'http://support.ecomwise.com/support/solutions/folders/111251';
|
12 |
public $name = 'Bestseller Sidebar Free';
|
13 |
+
public $compatibility = 'Magento CE 1.7.x-1.9.x';
|
14 |
+
public $manualUrl = 'http://support.ecomwise.com/support/solutions/articles/3000041609-bestseller-sidebar-free';
|
15 |
|
16 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
17 |
{
|
app/code/community/Ecomwise/FreeBestsellerssidebar/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ecomwise_FreeBestsellerssidebar>
|
5 |
-
<version>1.2.
|
6 |
</Ecomwise_FreeBestsellerssidebar>
|
7 |
</modules>
|
8 |
<frontend>
|
@@ -125,7 +125,7 @@
|
|
125 |
<skin>default</skin>
|
126 |
</style>
|
127 |
<parameters>
|
128 |
-
<enabled>
|
129 |
<block_title>Best Sellers</block_title>
|
130 |
</parameters>
|
131 |
</freebestsellerssidebar>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ecomwise_FreeBestsellerssidebar>
|
5 |
+
<version>1.2.1</version>
|
6 |
</Ecomwise_FreeBestsellerssidebar>
|
7 |
</modules>
|
8 |
<frontend>
|
125 |
<skin>default</skin>
|
126 |
</style>
|
127 |
<parameters>
|
128 |
+
<enabled>0</enabled>
|
129 |
<block_title>Best Sellers</block_title>
|
130 |
</parameters>
|
131 |
</freebestsellerssidebar>
|
app/design/frontend/base/default/layout/freebestsellerssidebar.xml
CHANGED
@@ -1,13 +1,8 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<!-- <default>
|
4 |
-
<reference name="left">
|
5 |
-
<block type="Ecomwise_FreeBestsellerssidebar/bestsellers"/>
|
6 |
-
</reference>
|
7 |
-
</default> -->
|
8 |
<freebestsellerssidebar_index_index>
|
9 |
<reference name="content">
|
10 |
-
<block type="Ecomwise_FreeBestsellerssidebar/bestsellers"/>
|
11 |
</reference>
|
12 |
</freebestsellerssidebar_index_index>
|
13 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
|
|
|
|
|
|
|
|
|
|
3 |
<freebestsellerssidebar_index_index>
|
4 |
<reference name="content">
|
5 |
+
<block type="Ecomwise_FreeBestsellerssidebar/bestsellers" name="ecomwise.freebestsellerssidebar.bestsellers" as="bestsellers"/>
|
6 |
</reference>
|
7 |
</freebestsellerssidebar_index_index>
|
8 |
</layout>
|
app/design/frontend/base/default/template/freebestsellerssidebar/freebestsellerssidebar.phtml
CHANGED
@@ -1,53 +1,53 @@
|
|
1 |
-
<div class="block block-bestsellers">
|
2 |
-
<div class="block-title"><strong><?php echo $this->title();?></strong></div>
|
3 |
-
<div class="block-content">
|
4 |
-
<?php $product_block = $this->getLayout()->createBlock('catalog/product') ?>
|
5 |
-
<?php $wee = Mage::helper('weee');
|
6 |
-
$_helper = $this->helper('catalog/output');
|
7 |
-
$bestsellers = $this->getBestsellers();
|
8 |
-
$_taxHelper = Mage::helper('tax');
|
9 |
-
if(count($bestsellers) > 0){
|
10 |
-
?>
|
11 |
-
<table>
|
12 |
-
<?php
|
13 |
-
foreach($bestsellers as $product_array) {
|
14 |
-
$qty = $product_array[0];
|
15 |
-
$product = $product_array[1];
|
16 |
-
$product = Mage::getModel("catalog/product")->load($product->getId());
|
17 |
-
//$_finalPrice = $_taxHelper->getPrice($product, $product->getFinalPrice());
|
18 |
-
//$price_html = $product_block->getPriceHtml($product);
|
19 |
-
$price_html = Mage::helper('core')->currency($product->getFinalPrice(), true, false);
|
20 |
-
?>
|
21 |
-
<tr>
|
22 |
-
<td>
|
23 |
-
<a href="<?php echo $product->getProductUrl() ?>"
|
24 |
-
title="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>"
|
25 |
-
class="product-image">
|
26 |
-
<img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(75)?>" />
|
27 |
-
</a>
|
28 |
-
</td>
|
29 |
-
<td>
|
30 |
-
<?php $tax = $wee->getAmountForDisplay($product); ?>
|
31 |
-
<div class="product-title"><?php echo $product->getName()?></div>
|
32 |
-
<div class="bestsellers-price">
|
33 |
-
<?php echo $price_html?>
|
34 |
-
</div>
|
35 |
-
<div class="more-info">
|
36 |
-
<a href="<?php echo $product->getProductUrl()?>"><span><?php echo $this->__("More Info.")?></span></a>
|
37 |
-
</div>
|
38 |
-
<div style="clear:all"></div>
|
39 |
-
</td>
|
40 |
-
</tr>
|
41 |
-
<?php } ?>
|
42 |
-
</table>
|
43 |
-
<?php
|
44 |
-
}else{
|
45 |
-
if(Mage::registry('current_category')){
|
46 |
-
echo $this->__('No
|
47 |
-
}else{
|
48 |
-
echo $this->__('No results');
|
49 |
-
}
|
50 |
-
}
|
51 |
-
?>
|
52 |
-
</div>
|
53 |
-
</div>
|
1 |
+
<div class="block block-bestsellers">
|
2 |
+
<div class="block-title"><strong><?php echo $this->title();?></strong></div>
|
3 |
+
<div class="block-content">
|
4 |
+
<?php $product_block = $this->getLayout()->createBlock('catalog/product') ?>
|
5 |
+
<?php $wee = Mage::helper('weee');
|
6 |
+
$_helper = $this->helper('catalog/output');
|
7 |
+
$bestsellers = $this->getBestsellers();
|
8 |
+
$_taxHelper = Mage::helper('tax');
|
9 |
+
if(count($bestsellers) > 0){
|
10 |
+
?>
|
11 |
+
<table>
|
12 |
+
<?php
|
13 |
+
foreach($bestsellers as $product_array) {
|
14 |
+
$qty = $product_array[0];
|
15 |
+
$product = $product_array[1];
|
16 |
+
$product = Mage::getModel("catalog/product")->load($product->getId());
|
17 |
+
//$_finalPrice = $_taxHelper->getPrice($product, $product->getFinalPrice());
|
18 |
+
//$price_html = $product_block->getPriceHtml($product);
|
19 |
+
$price_html = Mage::helper('core')->currency($product->getFinalPrice(), true, false);
|
20 |
+
?>
|
21 |
+
<tr>
|
22 |
+
<td>
|
23 |
+
<a href="<?php echo $product->getProductUrl() ?>"
|
24 |
+
title="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>"
|
25 |
+
class="product-image">
|
26 |
+
<img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(75)?>" />
|
27 |
+
</a>
|
28 |
+
</td>
|
29 |
+
<td>
|
30 |
+
<?php $tax = $wee->getAmountForDisplay($product); ?>
|
31 |
+
<div class="product-title"><a href="<?php echo $product->getProductUrl()?>"><span><?php echo $product->getName()?></span></a></div>
|
32 |
+
<div class="bestsellers-price">
|
33 |
+
<?php echo $price_html?>
|
34 |
+
</div>
|
35 |
+
<div class="more-info">
|
36 |
+
<a href="<?php echo $product->getProductUrl()?>"><span><?php echo $this->__("More Info.")?></span></a>
|
37 |
+
</div>
|
38 |
+
<div style="clear:all"></div>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<?php } ?>
|
42 |
+
</table>
|
43 |
+
<?php
|
44 |
+
}else{
|
45 |
+
if(Mage::registry('current_category')){
|
46 |
+
echo $this->__('No best sold products present');
|
47 |
+
}else{
|
48 |
+
echo $this->__('No results');
|
49 |
+
}
|
50 |
+
}
|
51 |
+
?>
|
52 |
+
</div>
|
53 |
+
</div>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ecomwise_BestsellerSidebarFree</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL-3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Ecomwise_BestsellerSidebarFree</summary>
|
10 |
<description>Ecomwise_BestsellerSidebarFree</description>
|
11 |
-
<notes>1.2.
|
12 |
<authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
|
13 |
-
<date>2015-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="e5ce78f2d1de491159194d5c26fa8338"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4233a2cbfb1c2b8a5de6ca8911955195"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="FreeBestsellerssidebar"><dir name="Block"><file name="Abstract.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ecomwise_BestsellerSidebarFree</name>
|
4 |
+
<version>1.2.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL-3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Ecomwise_BestsellerSidebarFree</summary>
|
10 |
<description>Ecomwise_BestsellerSidebarFree</description>
|
11 |
+
<notes>1.2.1</notes>
|
12 |
<authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
|
13 |
+
<date>2015-10-26</date>
|
14 |
+
<time>13:56:52</time>
|
15 |
+
<contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="e5ce78f2d1de491159194d5c26fa8338"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4233a2cbfb1c2b8a5de6ca8911955195"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="FreeBestsellerssidebar"><dir name="Block"><file name="Abstract.php" hash="c0d1e5174543826c7915f8a757b6f455"/><dir name="Adminhtml"><file name="Support.php" hash="4dbd5ca5eb523cc7e99a010f91b6637f"/></dir><file name="Bestsellers.php" hash="c92309d515e9eb35ca872d96cf3f1553"/><dir name="System"><dir name="Config"><file name="Version.php" hash="4a10e2f43f98048da892a8bf019c19be"/></dir></dir><file name="Widget.php" hash="689d592b061d6ea0f547bb46856e7674"/></dir><dir name="Helper"><file name="Data.php" hash="a57b126129fc38bfb54a7b4251d7991e"/></dir><dir name="controllers"><file name="IndexController.php" hash="da6e76303cfd35a4bb93a15f743a4be2"/></dir><dir name="etc"><file name="config.xml" hash="713aac74abbe30efc3a722e3233019ae"/><file name="system.xml" hash="9195f5683bef3da6fc2cdf9545e73d8f"/><file name="widget.xml" hash="703d1b7fa3fbcc85796db3731161d3d3"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ecomwise_Base.xml" hash=""/><file name="Ecomwise_FreeBestsellerssidebar.xml" hash=""/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="freebestsellerssidebar"><file name="support.phtml" hash="0f47fb67af822425ca2b9f65a76bc088"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="freebestsellerssidebar.xml" hash="a7810c42e96344b7f77a794e80f21f77"/></dir><dir name="template"><dir name="freebestsellerssidebar"><file name="freebestsellerssidebar.phtml" hash="0eda0ad0322f913025b4196665284350"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Ecomwise_FreeBestsellerssidebar.csv" hash="6908d107d99642b2c729ed6e12696383"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="ecomwise"><file name="extensions_logo.png" hash="398cfc27d0a8fc693da176e102e7c013"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="freebestsellerssidebar"><dir name="css"><file name="style.css" hash="8ccd998fc2f2a36532686ba61dc1faec"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
|
18 |
</package>
|