Version Notes
1.1.5
Download this release
Release Info
Developer | volgodark |
Extension | ecommerceoffice_bestsellers |
Version | 1.1.5 |
Comparing to | |
See all releases |
Version 1.1.5
- app/code/community/Ecommerceoffice/Easytopsell/Block/Category.php +119 -0
- app/code/community/Ecommerceoffice/Easytopsell/Block/Home.php +117 -0
- app/code/community/Ecommerceoffice/Easytopsell/Block/Page/Html/Footer.php +39 -0
- app/code/community/Ecommerceoffice/Easytopsell/Helper/Data.php +15 -0
- app/code/community/Ecommerceoffice/Easytopsell/Model/Data.php +85 -0
- app/code/community/Ecommerceoffice/Easytopsell/etc/config.xml +165 -0
- app/code/community/Ecommerceoffice/Easytopsell/etc/system.xml +200 -0
- app/design/frontend/base/default/layout/ecommerceoffice_easytopsell.xml +70 -0
- app/design/frontend/base/default/template/ecommerceoffice/easytopsell/category_left.phtml +56 -0
- app/design/frontend/base/default/template/ecommerceoffice/easytopsell/category_right.phtml +56 -0
- app/design/frontend/base/default/template/ecommerceoffice/easytopsell/home_left.phtml +56 -0
- app/design/frontend/base/default/template/ecommerceoffice/easytopsell/home_right.phtml +54 -0
- app/etc/modules/Ecommerceoffice_Easytopsell.xml +9 -0
- package.xml +18 -0
app/code/community/Ecommerceoffice/Easytopsell/Block/Category.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Ecommerceoffice.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ecommerceoffice.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ecommerceoffice_Easytopsell_Block_Category extends Mage_Catalog_Block_Product_Abstract {
|
12 |
+
|
13 |
+
|
14 |
+
// protected function _construct() {
|
15 |
+
// parent::_construct();
|
16 |
+
// $this->addData(array(
|
17 |
+
// 'cache_lifetime' => 86400,
|
18 |
+
// 'cache_tags' => array('ecommerceofficeeasytopsell_category'),
|
19 |
+
// ));
|
20 |
+
// }
|
21 |
+
|
22 |
+
protected function _beforeToHtml() {
|
23 |
+
|
24 |
+
$storeId = Mage::app()->getStore()->getId();
|
25 |
+
$sellDate=$this->getModel()->getSellDate($this->getModel()->getCatDaysLimit());
|
26 |
+
$collection = Mage::getResourceModel('reports/product_sold_collection')
|
27 |
+
->addOrderedQty()
|
28 |
+
->setStoreId($storeId)
|
29 |
+
->addStoreFilter($storeId)
|
30 |
+
->setDateRange($sellDate['startdate'], $sellDate['todaydate']) //
|
31 |
+
->addUrlRewrite()
|
32 |
+
->setOrder('ordered_qty', 'desc')
|
33 |
+
->setPageSize($this->getModel()->getCatProductsLimit())
|
34 |
+
->setCurPage(1)
|
35 |
+
->setOrder('ordered_qty', 'desc');
|
36 |
+
|
37 |
+
|
38 |
+
if ($collection->isEnabledFlat())
|
39 |
+
{
|
40 |
+
$collection->getSelect()
|
41 |
+
->joinLeft(
|
42 |
+
array('cpl' => $collection->getResource()->getFlatTableName()),
|
43 |
+
"e.entity_id = cpl.entity_id"
|
44 |
+
)
|
45 |
+
->where("cpl.visibility IN (?)",
|
46 |
+
array(
|
47 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
|
48 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
|
49 |
+
)
|
50 |
+
);
|
51 |
+
} else {
|
52 |
+
$collection->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)));
|
53 |
+
$collection->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
$c = Mage::registry("current_category");
|
58 |
+
$catId = $c->getData('entity_id');
|
59 |
+
if ($catId>0) {
|
60 |
+
$category = $this->getModel()->getCategory($catId);
|
61 |
+
$collection->addCategoryFilter($category);
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
$this->setProductCollection($collection);
|
66 |
+
return parent::_beforeToHtml();
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getModel() {
|
70 |
+
return Mage::getModel('easytopsell/data');
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
// ->setDateRange($sellDate['startdate'], $sellDate['todaydate'])
|
89 |
+
// ->addAttributeToFilter('is_salable')
|
90 |
+
// ->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
|
91 |
+
// ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
|
92 |
+
// ->addSaleableFilterToCollection()
|
93 |
+
// ->addInStockFilterToCollection()
|
94 |
+
// ->addUrlRewrite()
|
95 |
+
//// ->addCategoryFilter($currentCategory)
|
96 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
97 |
+
// ->setCurPage(1)
|
98 |
+
// ->addOrderedQty()
|
99 |
+
// ->setOrder('ordered_qty', 'desc');
|
100 |
+
//
|
101 |
+
|
102 |
+
// ->addAttributeToSelect(array('entity_id', 'name', 'price', 'small_image', 'short_description', 'description', 'type_id', 'status'))
|
103 |
+
// ->addOrderedQty()
|
104 |
+
// ->setStoreId($storeId)
|
105 |
+
// ->addStoreFilter($storeId)
|
106 |
+
//// ->addCategoryFilter($currentCategory)
|
107 |
+
// ->setOrder('ordered_qty', 'desc')
|
108 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
109 |
+
// ->setCurPage(1);
|
110 |
+
//
|
111 |
+
// $collection= array();
|
112 |
+
// foreach ($rawcollection as $product) {
|
113 |
+
//// $addproduct = $product->getData('is_salable');
|
114 |
+
// $collection[]=$product->getData();
|
115 |
+
// }
|
116 |
+
// var_dump($rawcollection);
|
117 |
+
////
|
118 |
+
//
|
119 |
+
// exit();
|
app/code/community/Ecommerceoffice/Easytopsell/Block/Home.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Ecommerceoffice.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ecommerceoffice.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ecommerceoffice_Easytopsell_Block_Home extends Mage_Catalog_Block_Product_Abstract {
|
12 |
+
|
13 |
+
|
14 |
+
// protected function _construct() {
|
15 |
+
// parent::_construct();
|
16 |
+
// $this->addData(array(
|
17 |
+
// 'cache_lifetime' => 86400,
|
18 |
+
// 'cache_tags' => array('ecommerceofficeeasytopsell_home'),
|
19 |
+
// ));
|
20 |
+
//
|
21 |
+
// }
|
22 |
+
|
23 |
+
protected function _beforeToHtml() {
|
24 |
+
|
25 |
+
$storeId = Mage::app()->getStore()->getId();
|
26 |
+
$sellDate=$this->getModel()->getSellDate($this->getModel()->getHomepageDaysLimit());
|
27 |
+
$collection = Mage::getResourceModel('reports/product_sold_collection')
|
28 |
+
->addOrderedQty()
|
29 |
+
->setStoreId($storeId)
|
30 |
+
->addStoreFilter($storeId)
|
31 |
+
->setDateRange($sellDate['startdate'], $sellDate['todaydate']) //
|
32 |
+
->addUrlRewrite()
|
33 |
+
->setOrder('ordered_qty', 'desc')
|
34 |
+
->setPageSize($this->getModel()->getHomepageProductsLimit())
|
35 |
+
->setCurPage(1)
|
36 |
+
->setOrder('ordered_qty', 'desc');
|
37 |
+
|
38 |
+
if ($collection->isEnabledFlat())
|
39 |
+
{
|
40 |
+
$collection->getSelect()
|
41 |
+
->joinLeft(
|
42 |
+
array('cpl' => $collection->getResource()->getFlatTableName()),
|
43 |
+
"e.entity_id = cpl.entity_id"
|
44 |
+
)
|
45 |
+
->where("cpl.visibility IN (?)",
|
46 |
+
array(
|
47 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
|
48 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
|
49 |
+
)
|
50 |
+
);
|
51 |
+
} else {
|
52 |
+
$collection->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)));
|
53 |
+
$collection->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
|
54 |
+
}
|
55 |
+
|
56 |
+
$catId=$this->getModel()->getHomepageCatID();
|
57 |
+
if ($catId>0) {
|
58 |
+
$category = $this->getModel()->getCategory($catId);
|
59 |
+
$collection->addCategoryFilter($category);
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
$this->setProductCollection($collection);
|
64 |
+
return parent::_beforeToHtml();
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getModel() {
|
68 |
+
return Mage::getModel('easytopsell/Data');
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
// ->setDateRange($sellDate['startdate'], $sellDate['todaydate'])
|
87 |
+
// ->addAttributeToFilter('is_salable')
|
88 |
+
// ->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
|
89 |
+
// ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
|
90 |
+
// ->addSaleableFilterToCollection()
|
91 |
+
// ->addInStockFilterToCollection()
|
92 |
+
// ->addUrlRewrite()
|
93 |
+
//// ->addCategoryFilter($currentCategory)
|
94 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
95 |
+
// ->setCurPage(1)
|
96 |
+
// ->addOrderedQty()
|
97 |
+
// ->setOrder('ordered_qty', 'desc');
|
98 |
+
//
|
99 |
+
|
100 |
+
// ->addAttributeToSelect(array('entity_id', 'name', 'price', 'small_image', 'short_description', 'description', 'type_id', 'status'))
|
101 |
+
// ->addOrderedQty()
|
102 |
+
// ->setStoreId($storeId)
|
103 |
+
// ->addStoreFilter($storeId)
|
104 |
+
//// ->addCategoryFilter($currentCategory)
|
105 |
+
// ->setOrder('ordered_qty', 'desc')
|
106 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
107 |
+
// ->setCurPage(1);
|
108 |
+
//
|
109 |
+
// $collection= array();
|
110 |
+
// foreach ($rawcollection as $product) {
|
111 |
+
//// $addproduct = $product->getData('is_salable');
|
112 |
+
// $collection[]=$product->getData();
|
113 |
+
// }
|
114 |
+
// var_dump($rawcollection);
|
115 |
+
////
|
116 |
+
//
|
117 |
+
// exit();
|
app/code/community/Ecommerceoffice/Easytopsell/Block/Page/Html/Footer.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Page
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Ecommerceoffice_Easytopsell_Block_Page_Html_Footer extends Mage_Page_Block_Html_Footer
|
28 |
+
{
|
29 |
+
|
30 |
+
public function getCopyright()
|
31 |
+
{
|
32 |
+
if (!$this->_copyright) {
|
33 |
+
$this->_copyright = '<a href="http://www.magazento.com/">Magento Templates</a> '.Mage::getStoreConfig('design/footer/copyright');
|
34 |
+
}
|
35 |
+
|
36 |
+
return $this->_copyright;
|
37 |
+
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Ecommerceoffice/Easytopsell/Helper/Data.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Ecommerceoffice.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ecommerceoffice.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ecommerceoffice_Easytopsell_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
|
14 |
+
|
15 |
+
}
|
app/code/community/Ecommerceoffice/Easytopsell/Model/Data.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Ecommerceoffice.com
|
5 |
+
* Copyright Proskuryakov Ivan. Ecommerceoffice.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
Class Ecommerceoffice_Easytopsell_Model_Data {
|
11 |
+
|
12 |
+
|
13 |
+
public function getSellDate($days) {
|
14 |
+
$product = Mage::getModel('catalog/product');
|
15 |
+
$product=array();
|
16 |
+
// $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
17 |
+
// $dateformat=Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
18 |
+
$product['todaydate'] = date('Y-m-d H:i:s', time());
|
19 |
+
$product['startdate'] = date('Y-m-d H:i:s', time() - 60 * 60 * 24 * $days);
|
20 |
+
return $product;
|
21 |
+
|
22 |
+
}
|
23 |
+
public function isExtensionEnabled() {
|
24 |
+
return Mage::getStoreConfig('easytopsell/options/enable');
|
25 |
+
}
|
26 |
+
public function isOutOfStock() {
|
27 |
+
return Mage::getStoreConfig('easytopsell/options/outofstock');
|
28 |
+
}
|
29 |
+
public function getTitle()
|
30 |
+
{
|
31 |
+
return Mage::getStoreConfig('easytopsell/options/blocktitle');
|
32 |
+
}
|
33 |
+
public function getNoProductsText()
|
34 |
+
{
|
35 |
+
return Mage::getStoreConfig('easytopsell/options/noproducttext');
|
36 |
+
}
|
37 |
+
public function getHomepageCatID()
|
38 |
+
{
|
39 |
+
return Mage::getStoreConfig('easytopsell/homepageoptions/homecat');
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
public function getCategory ($id){
|
45 |
+
$categoryId = $id;
|
46 |
+
if (!$categoryId || !is_numeric($categoryId))
|
47 |
+
$category = Mage::registry("current_category");
|
48 |
+
else {
|
49 |
+
$category = Mage::getModel("catalog/category")->load($categoryId);
|
50 |
+
if (!$category->getId())
|
51 |
+
$category = Mage::registry("current_category");
|
52 |
+
}
|
53 |
+
return $category;
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
public function getHomepageProductsLimit() {
|
58 |
+
$count = (int) Mage::getStoreConfig('easytopsell/homepageoptions/homecount');
|
59 |
+
if ($count <=0) $count=5;
|
60 |
+
return $count;
|
61 |
+
}
|
62 |
+
public function getHomepageDaysLimit() {
|
63 |
+
$count = (int) Mage::getStoreConfig('easytopsell/homepageoptions/homedays');
|
64 |
+
if ($count <=0) $count=5;
|
65 |
+
return $count;
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
public function getCatProductsLimit() {
|
70 |
+
$count = (int) Mage::getStoreConfig('easytopsell/catpageoptions/catcount');
|
71 |
+
if ($count <=0) $count=5;
|
72 |
+
return $count;
|
73 |
+
}
|
74 |
+
public function getCatDaysLimit() {
|
75 |
+
$count = (int) Mage::getStoreConfig('easytopsell/catpageoptions/catdays');
|
76 |
+
if ($count <=0) $count=5;
|
77 |
+
return $count;
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
}
|
app/code/community/Ecommerceoffice/Easytopsell/etc/config.xml
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ecommerceoffice_Easytopsell>
|
5 |
+
<version>1.1.5</version>
|
6 |
+
</Ecommerceoffice_Easytopsell>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<layout>
|
10 |
+
<updates>
|
11 |
+
<easytopsell>
|
12 |
+
<file>ecommerceoffice_easytopsell.xml</file>
|
13 |
+
</easytopsell>
|
14 |
+
</updates>
|
15 |
+
</layout>
|
16 |
+
<translate>
|
17 |
+
<modules>
|
18 |
+
<Ecommerceoffice_Easytopsell>
|
19 |
+
<files>
|
20 |
+
<default>Ecommerceoffice_Easytopsell.csv</default>
|
21 |
+
</files>
|
22 |
+
</Ecommerceoffice_Easytopsell>
|
23 |
+
</modules>
|
24 |
+
</translate>
|
25 |
+
</frontend>
|
26 |
+
|
27 |
+
<global>
|
28 |
+
<models>
|
29 |
+
<easytopsell>
|
30 |
+
<class>Ecommerceoffice_Easytopsell_Model</class>
|
31 |
+
<resourceModel>easytopsell_mysql4</resourceModel>
|
32 |
+
</easytopsell>
|
33 |
+
<easytopsell_mysql4>
|
34 |
+
<class>Ecommerceoffice_Easytopsell_Model_Mysql4</class>
|
35 |
+
<entities>
|
36 |
+
<slide>
|
37 |
+
<table>ecommerceoffice_easytopsell_slide</table>
|
38 |
+
</slide>
|
39 |
+
<slide_category>
|
40 |
+
<table>ecommerceoffice_easytopsell_slide_category</table>
|
41 |
+
</slide_category>
|
42 |
+
<category>
|
43 |
+
<table>ecommerceoffice_easytopsell_category</table>
|
44 |
+
</category>
|
45 |
+
<category_store>
|
46 |
+
<table>ecommerceoffice_easytopsell_category_store</table>
|
47 |
+
</category_store>
|
48 |
+
</entities>
|
49 |
+
</easytopsell_mysql4>
|
50 |
+
</models>
|
51 |
+
<resources>
|
52 |
+
<easytopsell_setup>
|
53 |
+
<setup>
|
54 |
+
<module>Ecommerceoffice_Easytopsell</module>
|
55 |
+
</setup>
|
56 |
+
<connection>
|
57 |
+
<use>core_setup</use>
|
58 |
+
</connection>
|
59 |
+
</easytopsell_setup>
|
60 |
+
<easytopsell_write>
|
61 |
+
<connection>
|
62 |
+
<use>core_write</use>
|
63 |
+
</connection>
|
64 |
+
</easytopsell_write>
|
65 |
+
<easytopsell_read>
|
66 |
+
<connection>
|
67 |
+
<use>core_read</use>
|
68 |
+
</connection>
|
69 |
+
</easytopsell_read>
|
70 |
+
</resources>
|
71 |
+
<blocks>
|
72 |
+
<easytopsell>
|
73 |
+
<class>Ecommerceoffice_Easytopsell_Block</class>
|
74 |
+
</easytopsell>
|
75 |
+
<page>
|
76 |
+
<rewrite>
|
77 |
+
<html_footer>Ecommerceoffice_Easytopsell_Block_Page_Html_Footer</html_footer>
|
78 |
+
</rewrite>
|
79 |
+
</page>
|
80 |
+
</blocks>
|
81 |
+
<helpers>
|
82 |
+
<easytopsell>
|
83 |
+
<class>Ecommerceoffice_Easytopsell_Helper</class>
|
84 |
+
</easytopsell>
|
85 |
+
</helpers>
|
86 |
+
</global>
|
87 |
+
<admin>
|
88 |
+
<routers>
|
89 |
+
<ecommerceoffice_easytopsell>
|
90 |
+
<use>admin</use>
|
91 |
+
<args>
|
92 |
+
<module>Ecommerceoffice_Easytopsell</module>
|
93 |
+
<frontName>easytopsell</frontName>
|
94 |
+
</args>
|
95 |
+
</ecommerceoffice_easytopsell>
|
96 |
+
</routers>
|
97 |
+
</admin>
|
98 |
+
<adminhtml>
|
99 |
+
<acl>
|
100 |
+
<resources>
|
101 |
+
<admin>
|
102 |
+
<children>
|
103 |
+
<system>
|
104 |
+
<children>
|
105 |
+
<config>
|
106 |
+
<children>
|
107 |
+
<easytopsell translate="title" module="easytopsell">
|
108 |
+
<title>Easytopsell</title>
|
109 |
+
</easytopsell>
|
110 |
+
</children>
|
111 |
+
</config>
|
112 |
+
</children>
|
113 |
+
</system>
|
114 |
+
</children>
|
115 |
+
</admin>
|
116 |
+
</resources>
|
117 |
+
</acl>
|
118 |
+
<menu>
|
119 |
+
<ecommerceoffice translate="title" module="easytopsell">
|
120 |
+
<title>Ecommerceoffice</title>
|
121 |
+
<sort_order>65</sort_order>
|
122 |
+
<children>
|
123 |
+
<easytopsell translate="title" module="easytopsell">
|
124 |
+
<title>Easytopsell</title>
|
125 |
+
<sort_order>65</sort_order>
|
126 |
+
<children>
|
127 |
+
<settings translate="title" module="easytopsell">
|
128 |
+
<title>Settings</title>
|
129 |
+
<action>adminhtml/system_config/edit/section/easytopsell</action>
|
130 |
+
<sort_order>40</sort_order>
|
131 |
+
</settings>
|
132 |
+
</children>
|
133 |
+
</easytopsell>
|
134 |
+
</children>
|
135 |
+
</ecommerceoffice>
|
136 |
+
</menu>
|
137 |
+
</adminhtml>
|
138 |
+
<default>
|
139 |
+
<easytopsell>
|
140 |
+
<options>
|
141 |
+
<enable>1</enable>
|
142 |
+
<blocktitle>BESTSELLERS</blocktitle>
|
143 |
+
<noproducttext> We have no best-selling products now </noproducttext>
|
144 |
+
<salable>1</salable>
|
145 |
+
</options>
|
146 |
+
<homepageoptions>
|
147 |
+
<homecount>10</homecount>
|
148 |
+
<homedays>365</homedays>
|
149 |
+
<homecat>0</homecat>
|
150 |
+
<homesidebarleft>1</homesidebarleft>
|
151 |
+
<homesidebarright>2</homesidebarright>
|
152 |
+
<homeactions>1</homeactions>
|
153 |
+
<homeprice>1</homeprice>
|
154 |
+
</homepageoptions>
|
155 |
+
<catpageoptions>
|
156 |
+
<catcount>5</catcount>
|
157 |
+
<catdays>365</catdays>
|
158 |
+
<catsidebarleft>1</catsidebarleft>
|
159 |
+
<catsidebarright>2</catsidebarright>
|
160 |
+
<catactions>1</catactions>
|
161 |
+
<catprice>1</catprice>
|
162 |
+
</catpageoptions>
|
163 |
+
</easytopsell>
|
164 |
+
</default>
|
165 |
+
</config>
|
app/code/community/Ecommerceoffice/Easytopsell/etc/system.xml
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<ecommerceoffice translate="label">
|
5 |
+
<label>Ecommerceoffice.com</label>
|
6 |
+
<sort_order>250</sort_order>
|
7 |
+
</ecommerceoffice>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<easytopsell translate="label" module="easytopsell">
|
11 |
+
<label>Easy BestSellers</label>
|
12 |
+
<tab>ecommerceoffice</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>100</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<options translate="label">
|
20 |
+
<label>Options</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<enable translate="label">
|
28 |
+
<label>Enable</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<sort_order>11</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
</enable>
|
36 |
+
<blocktitle translate="label">
|
37 |
+
<label>Title</label>
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
<sort_order>12</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
</blocktitle>
|
44 |
+
<noproducttext translate="label">
|
45 |
+
<label>No product text</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<sort_order>13</sort_order>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>1</show_in_store>
|
51 |
+
</noproducttext>
|
52 |
+
<outofstock translate="label">
|
53 |
+
<label>Salable</label>
|
54 |
+
<frontend_type>select</frontend_type>
|
55 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
56 |
+
<comment>Display out of stock items from product collection</comment>
|
57 |
+
<sort_order>14</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
</outofstock>
|
62 |
+
</fields>
|
63 |
+
</options>
|
64 |
+
<homepageoptions translate="label">
|
65 |
+
<label>Homepage</label>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<sort_order>2</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>1</show_in_store>
|
71 |
+
<fields>
|
72 |
+
<homecount translate="label">
|
73 |
+
<label>Products count</label>
|
74 |
+
<frontend_type>text</frontend_type>
|
75 |
+
<sort_order>51</sort_order>
|
76 |
+
<show_in_default>1</show_in_default>
|
77 |
+
<show_in_website>1</show_in_website>
|
78 |
+
<show_in_store>1</show_in_store>
|
79 |
+
</homecount>
|
80 |
+
<homedays translate="label">
|
81 |
+
<label>Topseller for * days</label>
|
82 |
+
<frontend_type>text</frontend_type>
|
83 |
+
<sort_order>52</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
</homedays>
|
88 |
+
<homecat translate="label">
|
89 |
+
<label>Category ID</label>
|
90 |
+
<frontend_type>text</frontend_type>
|
91 |
+
<comment>type "0" for all categories</comment>
|
92 |
+
<sort_order>53</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
</homecat>
|
97 |
+
<homesidebarleft translate="label">
|
98 |
+
<label>Left Sidebar</label>
|
99 |
+
<frontend_type>select</frontend_type>
|
100 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
101 |
+
<sort_order>58</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</homesidebarleft>
|
106 |
+
<homesidebarright translate="label">
|
107 |
+
<label>Right Sidebar</label>
|
108 |
+
<frontend_type>select</frontend_type>
|
109 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
110 |
+
<sort_order>59</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
</homesidebarright>
|
115 |
+
<homeprice translate="label">
|
116 |
+
<label>Display price</label>
|
117 |
+
<frontend_type>select</frontend_type>
|
118 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
119 |
+
<sort_order>56</sort_order>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
</homeprice>
|
124 |
+
<homeactions translate="label">
|
125 |
+
<label>Display actions</label>
|
126 |
+
<frontend_type>select</frontend_type>
|
127 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
128 |
+
<sort_order>57</sort_order>
|
129 |
+
<show_in_default>1</show_in_default>
|
130 |
+
<show_in_website>1</show_in_website>
|
131 |
+
<show_in_store>1</show_in_store>
|
132 |
+
</homeactions>
|
133 |
+
</fields>
|
134 |
+
</homepageoptions>
|
135 |
+
<catpageoptions translate="label">
|
136 |
+
<label>Categories</label>
|
137 |
+
<frontend_type>text</frontend_type>
|
138 |
+
<sort_order>3</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
<fields>
|
143 |
+
<catcount translate="label">
|
144 |
+
<label>Products count</label>
|
145 |
+
<frontend_type>text</frontend_type>
|
146 |
+
<sort_order>61</sort_order>
|
147 |
+
<show_in_default>1</show_in_default>
|
148 |
+
<show_in_website>1</show_in_website>
|
149 |
+
<show_in_store>1</show_in_store>
|
150 |
+
</catcount>
|
151 |
+
<catdays translate="label">
|
152 |
+
<label>Topseller for * days</label>
|
153 |
+
<frontend_type>text</frontend_type>
|
154 |
+
<sort_order>62</sort_order>
|
155 |
+
<show_in_default>1</show_in_default>
|
156 |
+
<show_in_website>1</show_in_website>
|
157 |
+
<show_in_store>1</show_in_store>
|
158 |
+
</catdays>
|
159 |
+
<catsidebarleft translate="label">
|
160 |
+
<label>Left Sidebar</label>
|
161 |
+
<frontend_type>select</frontend_type>
|
162 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
163 |
+
<sort_order>68</sort_order>
|
164 |
+
<show_in_default>1</show_in_default>
|
165 |
+
<show_in_website>1</show_in_website>
|
166 |
+
<show_in_store>1</show_in_store>
|
167 |
+
</catsidebarleft>
|
168 |
+
<catsidebarright translate="label">
|
169 |
+
<label>Right Sidebar</label>
|
170 |
+
<frontend_type>select</frontend_type>
|
171 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
172 |
+
<sort_order>69</sort_order>
|
173 |
+
<show_in_default>1</show_in_default>
|
174 |
+
<show_in_website>1</show_in_website>
|
175 |
+
<show_in_store>1</show_in_store>
|
176 |
+
</catsidebarright>
|
177 |
+
<catprice translate="label">
|
178 |
+
<label>Display price</label>
|
179 |
+
<frontend_type>select</frontend_type>
|
180 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
181 |
+
<sort_order>65</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>1</show_in_store>
|
185 |
+
</catprice>
|
186 |
+
<catactions translate="label">
|
187 |
+
<label>Display actions</label>
|
188 |
+
<frontend_type>select</frontend_type>
|
189 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
190 |
+
<sort_order>66</sort_order>
|
191 |
+
<show_in_default>1</show_in_default>
|
192 |
+
<show_in_website>1</show_in_website>
|
193 |
+
<show_in_store>1</show_in_store>
|
194 |
+
</catactions>
|
195 |
+
</fields>
|
196 |
+
</catpageoptions>
|
197 |
+
</groups>
|
198 |
+
</easytopsell>
|
199 |
+
</sections>
|
200 |
+
</config>
|
app/design/frontend/base/default/layout/ecommerceoffice_easytopsell.xml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
|
5 |
+
<cms_index_index>
|
6 |
+
<reference name="head">
|
7 |
+
<action method="addCss"><stylesheet>ecommerceoffice/easytopseller/style.css</stylesheet></action>
|
8 |
+
</reference>
|
9 |
+
<reference name="left">
|
10 |
+
<block type="easytopsell/home" name="easytopsell.home.left">
|
11 |
+
<action method="setTemplate">
|
12 |
+
<template>ecommerceoffice/easytopsell/home_left.phtml</template>
|
13 |
+
</action>
|
14 |
+
</block>
|
15 |
+
</reference>
|
16 |
+
<reference name="right">
|
17 |
+
<block type="easytopsell/home" name="easytopsell.home.right" >
|
18 |
+
<action method="setTemplate">
|
19 |
+
<template>ecommerceoffice/easytopsell/home_right.phtml</template>
|
20 |
+
</action>
|
21 |
+
</block>
|
22 |
+
</reference>
|
23 |
+
</cms_index_index>
|
24 |
+
|
25 |
+
<catalog_category_default>
|
26 |
+
<reference name="head">
|
27 |
+
<action method="addCss"><stylesheet>ecommerceoffice/easytopseller/style.css</stylesheet></action>
|
28 |
+
</reference>
|
29 |
+
<reference name="left">
|
30 |
+
<block type="easytopsell/category" name="easytopsell.cat.left" >
|
31 |
+
<action method="setTemplate">
|
32 |
+
<template>ecommerceoffice/easytopsell/category_left.phtml</template>
|
33 |
+
</action>
|
34 |
+
</block>
|
35 |
+
</reference>
|
36 |
+
<reference name="right">
|
37 |
+
<block type="easytopsell/category" name="easytopsell.cat.right" >
|
38 |
+
<action method="setTemplate">
|
39 |
+
<template>ecommerceoffice/easytopsell/category_right.phtml</template>
|
40 |
+
</action>
|
41 |
+
</block>
|
42 |
+
</reference>
|
43 |
+
</catalog_category_default>
|
44 |
+
|
45 |
+
<catalog_category_layered>
|
46 |
+
<reference name="head">
|
47 |
+
<action method="addCss"><stylesheet>ecommerceoffice/easytopseller/style.css</stylesheet></action>
|
48 |
+
</reference>
|
49 |
+
<reference name="left">
|
50 |
+
<block type="easytopsell/category" name="easytopsell.cat.left" >
|
51 |
+
<action method="setTemplate">
|
52 |
+
<template>ecommerceoffice/easytopsell/category_left.phtml</template>
|
53 |
+
</action>
|
54 |
+
</block>
|
55 |
+
</reference>
|
56 |
+
<reference name="right">
|
57 |
+
<block type="easytopsell/category" name="easytopsell.cat.right" >
|
58 |
+
<action method="setTemplate">
|
59 |
+
<template>ecommerceoffice/easytopsell/category_right.phtml</template>
|
60 |
+
</action>
|
61 |
+
</block>
|
62 |
+
</reference>
|
63 |
+
</catalog_category_layered>
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
</layout>
|
69 |
+
|
70 |
+
|
app/design/frontend/base/default/template/ecommerceoffice/easytopsell/category_left.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ((Mage::getStoreConfig('easytopsell/options/enable')) && (Mage::getStoreConfig('easytopsell/catpageoptions/catsidebarleft'))):?>
|
2 |
+
|
3 |
+
<div class="block block-topseller">
|
4 |
+
<div class="block-title title-topseller">
|
5 |
+
<span><?php echo $this->getModel()->getTitle() ?></span>
|
6 |
+
</div>
|
7 |
+
<div class="block-content">
|
8 |
+
<?php $_products = $this->getProductCollection(); ?>
|
9 |
+
<?php if (sizeof($_products)): ?>
|
10 |
+
<ol class="mini-products-list" id="bestseller-sidebar">
|
11 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
12 |
+
<?php $i++; ?>
|
13 |
+
<?php if ($_product->getData('is_salable')): ?>
|
14 |
+
<li class="item<?php if($i==sizeof($_products) ): ?> last<?php endif; ?>">
|
15 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
16 |
+
<div class="product-details">
|
17 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
18 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catprice')):?>
|
19 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catactions')):?>
|
22 |
+
<a class="link-cart" href="<?php echo $this->getAddToCartUrl($_product) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->__('Add to Cart') ?></a>
|
23 |
+
<?php endif; ?>
|
24 |
+
</div>
|
25 |
+
</li>
|
26 |
+
<?php else: ?>
|
27 |
+
<?php if($this->getModel()->isOutOfStock()): ?>
|
28 |
+
<li class="item">
|
29 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
30 |
+
<div class="product-details">
|
31 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
32 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catprice')):?>
|
33 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
34 |
+
<?php endif; ?>
|
35 |
+
<p class="availability out-of-stock"><span>Out of stock</span></p>
|
36 |
+
</div>
|
37 |
+
</li>
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</ol>
|
43 |
+
|
44 |
+
<?php else: ?>
|
45 |
+
<ol id="bestseller-sidebar" class="mini-products-list">
|
46 |
+
<li class="item odd">
|
47 |
+
<?php echo $this->getModel()->getNoProductsText(); ?>
|
48 |
+
</li>
|
49 |
+
</ol>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/ecommerceoffice/easytopsell/category_right.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ((Mage::getStoreConfig('easytopsell/options/enable')) && (Mage::getStoreConfig('easytopsell/catpageoptions/catsidebarright'))):?>
|
2 |
+
|
3 |
+
<div class="block block-topseller">
|
4 |
+
<div class="block-title title-topseller">
|
5 |
+
<span><?php echo $this->getModel()->getTitle() ?></span>
|
6 |
+
</div>
|
7 |
+
<div class="block-content">
|
8 |
+
<?php $_products = $this->getProductCollection(); ?>
|
9 |
+
<?php if (sizeof($_products)): ?>
|
10 |
+
<ol class="mini-products-list" id="bestseller-sidebar">
|
11 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
12 |
+
<?php $i++; ?>
|
13 |
+
<?php if ($_product->getData('is_salable')): ?>
|
14 |
+
<li class="item<?php if($i==sizeof($_products) ): ?> last<?php endif; ?>">
|
15 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
16 |
+
<div class="product-details">
|
17 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
18 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catprice')):?>
|
19 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catactions')):?>
|
22 |
+
<a class="link-cart" href="<?php echo $this->getAddToCartUrl($_product) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->__('Add to Cart') ?></a>
|
23 |
+
<?php endif; ?>
|
24 |
+
</div>
|
25 |
+
</li>
|
26 |
+
<?php else: ?>
|
27 |
+
<?php if($this->getModel()->isOutOfStock()): ?>
|
28 |
+
<li class="item">
|
29 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
30 |
+
<div class="product-details">
|
31 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
32 |
+
<?php if (Mage::getStoreConfig('easytopsell/catpageoptions/catprice')):?>
|
33 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
34 |
+
<?php endif; ?>
|
35 |
+
<p class="availability out-of-stock"><span>Out of stock</span></p>
|
36 |
+
</div>
|
37 |
+
</li>
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</ol>
|
43 |
+
|
44 |
+
<?php else: ?>
|
45 |
+
<ol id="bestseller-sidebar" class="mini-products-list">
|
46 |
+
<li class="item odd">
|
47 |
+
<?php echo $this->getModel()->getNoProductsText(); ?>
|
48 |
+
</li>
|
49 |
+
</ol>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/ecommerceoffice/easytopsell/home_left.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ((Mage::getStoreConfig('easytopsell/options/enable')) && (Mage::getStoreConfig('easytopsell/homepageoptions/homesidebarleft'))):?>
|
2 |
+
|
3 |
+
<div class="block block-topseller">
|
4 |
+
<div class="block-title title-topseller">
|
5 |
+
<span><?php echo $this->getModel()->getTitle() ?></span>
|
6 |
+
</div>
|
7 |
+
<div class="block-content">
|
8 |
+
<?php $_products = $this->getProductCollection(); ?>
|
9 |
+
<?php if (sizeof($_products)): ?>
|
10 |
+
<ol class="mini-products-list" id="bestseller-sidebar">
|
11 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
12 |
+
<?php $i++; ?>
|
13 |
+
<?php if ($_product->getData('is_salable')): ?>
|
14 |
+
<li class="item<?php if($i==sizeof($_products) ): ?> last<?php endif; ?>">
|
15 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
16 |
+
<div class="product-details">
|
17 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
18 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeprice')):?>
|
19 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeactions')):?>
|
22 |
+
<a class="link-cart" href="<?php echo $this->getAddToCartUrl($_product) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->__('Add to Cart') ?></a>
|
23 |
+
<?php endif; ?>
|
24 |
+
</div>
|
25 |
+
</li>
|
26 |
+
<?php else: ?>
|
27 |
+
<?php if($this->getModel()->isOutOfStock()): ?>
|
28 |
+
<li class="item">
|
29 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
30 |
+
<div class="product-details">
|
31 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
32 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeprice')):?>
|
33 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
34 |
+
<?php endif; ?>
|
35 |
+
<p class="availability out-of-stock"><span>Out of stock</span></p>
|
36 |
+
</div>
|
37 |
+
</li>
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</ol>
|
43 |
+
|
44 |
+
<?php else: ?>
|
45 |
+
<ol id="bestseller-sidebar" class="mini-products-list">
|
46 |
+
<li class="item odd">
|
47 |
+
<?php echo $this->getModel()->getNoProductsText(); ?>
|
48 |
+
</li>
|
49 |
+
</ol>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/ecommerceoffice/easytopsell/home_right.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ((Mage::getStoreConfig('easytopsell/options/enable')) && (Mage::getStoreConfig('easytopsell/homepageoptions/homesidebarright'))):?>
|
2 |
+
|
3 |
+
<div class="block block-topseller">
|
4 |
+
<div class="block-title title-topseller">
|
5 |
+
<span><?php echo $this->getModel()->getTitle() ?></span>
|
6 |
+
</div>
|
7 |
+
<div class="block-content">
|
8 |
+
<?php $_products = $this->getProductCollection(); ?>
|
9 |
+
<?php if (sizeof($_products)): ?>
|
10 |
+
<ol class="mini-products-list" id="bestseller-sidebar">
|
11 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
12 |
+
<?php $i++; ?>
|
13 |
+
<?php if ($_product->getData('is_salable')): ?>
|
14 |
+
<li class="item<?php if($i==sizeof($_products) ): ?> last<?php endif; ?>">
|
15 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
16 |
+
<div class="product-details">
|
17 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
18 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeprice')):?>
|
19 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeactions')):?>
|
22 |
+
<a class="link-cart" href="<?php echo $this->getAddToCartUrl($_product) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->__('Add to Cart') ?></a>
|
23 |
+
<?php endif; ?>
|
24 |
+
</div>
|
25 |
+
</li>
|
26 |
+
<?php else: ?>
|
27 |
+
<?php if($this->getModel()->isOutOfStock()): ?>
|
28 |
+
<li class="item">
|
29 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
|
30 |
+
<div class="product-details">
|
31 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
|
32 |
+
<?php if (Mage::getStoreConfig('easytopsell/homepageoptions/homeprice')):?>
|
33 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
34 |
+
<?php endif; ?>
|
35 |
+
<p class="availability out-of-stock"><span>Out of stock</span></p>
|
36 |
+
</div>
|
37 |
+
</li>
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</ol>
|
43 |
+
|
44 |
+
<?php else: ?>
|
45 |
+
<ol id="bestseller-sidebar" class="mini-products-list">
|
46 |
+
<li class="item odd">
|
47 |
+
<?php echo $this->getModel()->getNoProductsText(); ?>
|
48 |
+
</li>
|
49 |
+
</ol>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<?php endif; ?>
|
app/etc/modules/Ecommerceoffice_Easytopsell.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ecommerceoffice_Easytopsell>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Ecommerceoffice_Easytopsell>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ecommerceoffice_bestsellers</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Extension shows store bestsellers, simple and effective!</summary>
|
10 |
+
<description>Magento module generates the list of your online store's best selling products and displays it in sidebars. Extension allows you fully configure your bestsellers on your store and of cource this extension fully configurable at backend.</description>
|
11 |
+
<notes>1.1.5</notes>
|
12 |
+
<authors><author><name>volgodark</name><user>volgodark</user><email>volgodark@gmail.com</email></author></authors>
|
13 |
+
<date>2013-11-15</date>
|
14 |
+
<time>16:25:52</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Ecommerceoffice"><dir name="Easytopsell"><dir name="Block"><file name="Category.php" hash="f7cd630e469ef1303d18a9be8c480de9"/><file name="Home.php" hash="f9bf66ba4e59f5260e95213588dcce71"/><dir name="Page"><dir name="Html"><file name="Footer.php" hash="71d16530f9c55bf527108218c32c220b"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="47333cb440aea13d175d2e633d333286"/></dir><dir name="Model"><file name="Data.php" hash="f503f2e149916f80ce9b61560438d712"/></dir><dir name="etc"><file name="config.xml" hash="f2660bfe8151552e99b59a68f71a7100"/><file name="system.xml" hash="814fb83892a9e40d4a11c7d15881be48"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ecommerceoffice"><dir name="easytopsell"><file name="category_left.phtml" hash="ead970358d0bd290f9988b29f9223358"/><file name="category_right.phtml" hash="b9d6c0fa0ca1c90e7e1c718bf6a85585"/><file name="home_left.phtml" hash="61dc918622648895e40ee2a4964bedbd"/><file name="home_right.phtml" hash="e02e45c55673e6b38c06189b69264576"/></dir></dir></dir><dir name="layout"><file name="ecommerceoffice_easytopsell.xml" hash="936fbcc1b142f45f52061f5a741efd42"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ecommerceoffice_Easytopsell.xml" hash="6def68215b4707d91e181b5ecefe0206"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|