SSTech_Productsale - Version 1.0.0

Version Notes

Onsale product

Download this release

Release Info

Developer SSTech
Extension SSTech_Productsale
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/SSTech/Productsale/Block/Layer.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_Productsale_Block_Layer extends Mage_Catalog_Block_Layer_View
3
+ {
4
+ public function getLayer()
5
+ {
6
+ return Mage::getSingleton('sstech_productsale/layer');
7
+ }
8
+ }
app/code/community/SSTech/Productsale/Block/List.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SSTech_Productsale_Block_List extends Mage_Catalog_Block_Product_List
4
+ {
5
+ protected $_productsCount = null;
6
+ protected $_productCollection;
7
+ const DEFAULT_PRODUCTS_COUNT = 5;
8
+
9
+ protected function _construct()
10
+ {
11
+ parent::_construct();
12
+ $this->addData(array(
13
+ 'cache_lifetime' => 300,
14
+ 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG),
15
+ ));
16
+ }
17
+ public function getLoadedProductCollection()
18
+ {
19
+ return $this->_getProductCollection();
20
+ }
21
+
22
+ protected function _getProductCollection()
23
+ {
24
+ if (is_null($this->_productCollection)) {
25
+ $this->_productCollection = Mage::getModel('sstech_productsale/layer')->getProductCollection();
26
+ }
27
+ return $this->_productCollection;
28
+ }
29
+
30
+ public function setProductsCount($count)
31
+ {
32
+ $this->_productsCount = $count;
33
+ return $this;
34
+ }
35
+
36
+ public function getProductsCount()
37
+ {
38
+ if (null === $this->_productsCount) {
39
+ $this->_productsCount = self::DEFAULT_PRODUCTS_COUNT;
40
+ }
41
+ return $this->_productsCount;
42
+ }
43
+
44
+ public function getCacheKeyInfo()
45
+ {
46
+ return array(
47
+ 'CATALOGSALE_PRODUCT_SALE',
48
+ Mage::app()->getStore()->getId(),
49
+ Mage::getDesign()->getPackageName(),
50
+ Mage::getDesign()->getTheme('template'),
51
+ Mage::getSingleton('customer/session')->getCustomerGroupId(),
52
+ 'template' => $this->getTemplate(),
53
+ $this->getProductsCount()
54
+ );
55
+ }
56
+
57
+ protected function _beforeToHtml()
58
+ {
59
+ $collection = Mage::getSingleton('sstech_productsale/layer')->getProductCollection();
60
+ $collection->setPageSize($this->getProductsCount())->setCurPage(1);
61
+ $collection->getSelect()->order('rand()');
62
+ $this->setProductCollection($collection);
63
+ return parent::_beforeToHtml();
64
+ }
65
+ }
app/code/community/SSTech/Productsale/Block/View.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SSTech_Productsale_Block_View extends Mage_Core_Block_Template
4
+ {
5
+ protected function _prepareLayout()
6
+ {
7
+ parent::_prepareLayout();
8
+ $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
9
+ if ($breadcrumbs) {
10
+ $title = $this->__('Sale');
11
+
12
+ $breadcrumbs->addCrumb('home', array(
13
+ 'label' => $this->__('Home'),
14
+ 'title' => $this->__('Go to Home Page'),
15
+ 'link' => Mage::getBaseUrl()
16
+ ))->addCrumb('item', array(
17
+ 'label' => $title,
18
+ 'title' => $title,
19
+ ));
20
+ }
21
+
22
+ return $this;
23
+ }
24
+
25
+ protected function _getProductCollection()
26
+ {
27
+ if (is_null($this->_productCollection)) {
28
+ $this->_productCollection = Mage::getSingleton('productsale/layer')->getProductCollection();
29
+ }
30
+
31
+ return $this->_productCollection;
32
+ }
33
+
34
+ public function IsRssCatalogEnable()
35
+ {
36
+ $path = Mage_Rss_Block_List::XML_PATH_RSS_METHODS.'/catalog/special';
37
+
38
+ return (bool)Mage::getStoreConfig($path);
39
+ }
40
+
41
+ public function setListCollection()
42
+ {
43
+ $productList = $this->getChild('sale_product_list');
44
+ $productList->setCollection($this->_getProductCollection());
45
+ }
46
+
47
+
48
+
49
+ public function getProductListHtml()
50
+ {
51
+ return $this->getChildHtml('sale_product_list');
52
+ }
53
+
54
+ public function getRssLink()
55
+ {
56
+ $param = array('sid' => $this->getCurrentStoreId());
57
+
58
+ return Mage::getUrl(Mage_Rss_Block_List::XML_PATH_RSS_METHODS.'/catalog/special', $param);
59
+ }
60
+ }
app/code/community/SSTech/Productsale/Helper/Data.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_Productsale_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ const XML_PATH_ENABLED = 'sstech_productsale/general/is_enabled';
5
+
6
+ public function setIsModuleEnabled($value)
7
+ {
8
+ Mage::getModel('core/config')->saveConfig(self::XML_PATH_ENABLED, $value);
9
+ }
10
+
11
+ public function getCatalogSaleUrl()
12
+ {
13
+ return $this->_getUrl('productsale');
14
+ }
15
+ }
app/code/community/SSTech/Productsale/Model/Layer.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_ProductSale_Model_Layer extends Mage_Catalog_Model_Layer
3
+ {
4
+ protected function _getStoreId()
5
+ {
6
+ $storeId = Mage::app()->getStore()->getId();
7
+ return $storeId;
8
+ }
9
+
10
+ protected function _getCustomerGroupId()
11
+ {
12
+ $custGroupID = null;
13
+ if($custGroupID == null) {
14
+ $custGroupID = Mage::getSingleton('customer/session')->getCustomerGroupId();
15
+ }
16
+ return $custGroupID;
17
+ }
18
+
19
+ public function getProductCollection()
20
+ {
21
+ if (is_null($this->_productCollection)) {
22
+ $storeId = $this->_getStoreId();
23
+ $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
24
+ $custGroup = $this->_getCustomerGroupId();
25
+ $product = Mage::getModel('catalog/product');
26
+ $todayDate = $product->getResource()->formatDate(time(), false);
27
+ $rulePriceWhere = "({{table}}.rule_date is null) or ({{table}}.rule_date='$todayDate' and {{table}}.website_id='$websiteId' and {{table}}.customer_group_id='$custGroup')";
28
+ $specials = $product->setStoreId($storeId)->getResourceCollection()
29
+ ->addAttributeToFilter('special_price', array('gt'=>0), 'left')
30
+ ->addAttributeToFilter('special_from_date', array('date'=>true, 'to'=> $todayDate), 'left')
31
+ ->addAttributeToFilter(array(
32
+ array('attribute'=>'special_to_date', 'date'=>true, 'from'=>$todayDate),
33
+ array('attribute'=>'special_to_date', 'is' => new Zend_Db_Expr('null'))
34
+ ), '', 'left')
35
+ ->addAttributeToSort('special_from_date', 'desc')
36
+ ->joinTable('catalogrule/rule_product_price', 'product_id=entity_id', array('rule_price'=>'rule_price', 'rule_start_date'=>'latest_start_date', 'rule_date'=>'rule_date'), $rulePriceWhere, 'left');
37
+ $rulePriceCollection = Mage::getResourceModel('catalogrule/rule_product_price_collection')
38
+ ->addFieldToFilter('website_id', $websiteId)
39
+ ->addFieldToFilter('customer_group_id', $custGroup)
40
+ ->addFieldToFilter('rule_date', $todayDate);
41
+ $productIds = $rulePriceCollection->getProductIds();
42
+ if (!empty($productIds)) {
43
+ $specials->getSelect()->orWhere('e.entity_id in ('.implode(',',$productIds).')');
44
+ }
45
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($specials);
46
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($specials);
47
+ $this->prepareProductCollection($specials);
48
+ $this->_productCollection = $specials;
49
+ }
50
+ return $this->_productCollection;
51
+ }
52
+ }
53
+
app/code/community/SSTech/Productsale/controllers/IndexController.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_Productsale_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ const XML_PATH_ENABLED = 'sstech_productsale/general/is_enabled';
5
+ public function preDispatch()
6
+ {
7
+ parent::preDispatch();
8
+
9
+ if( !Mage::getStoreConfigFlag(self::XML_PATH_ENABLED) ) {
10
+ $this->norouteAction();
11
+ $this->setFlag('', self::FLAG_NO_DISPATCH, true);
12
+ return;
13
+ }
14
+ }
15
+
16
+ public function indexAction()
17
+ {
18
+ $this->loadLayout();
19
+ $this->getLayout()->getBlock('head')->setTitle('Sale');
20
+ $this->getLayout()->getBlock('head')->setDescription('On Sale');
21
+ $this->_initLayoutMessages('catalog/session');
22
+ $this->renderLayout();
23
+ }
24
+ }
app/code/community/SSTech/Productsale/etc/adminhtml.xml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <acl>
3
+ <resources>
4
+ <admin>
5
+ <children>
6
+ <sstech translate="title">
7
+ <title>SSTech</title>
8
+ <sort_order>200</sort_order>
9
+ <children>
10
+ <sstech_productsale translate="title" module="sstech_productsale">
11
+ <title>Sale Product</title>
12
+ <sort_order>100</sort_order>
13
+ <children>
14
+ <productsale_settings>
15
+ <title>Setting for sale</title>
16
+ <sort_order>30</sort_order>
17
+ </productsale_settings>
18
+ </children>
19
+ </sstech_productsale>
20
+ </children>
21
+ </sstech>
22
+ <system>
23
+ <children>
24
+ <config>
25
+ <children>
26
+ <zextension translate="title">
27
+ <title>SSTech</title>
28
+ </zextension>
29
+ <sstech_productsale>
30
+ <title>Setting for sale</title>
31
+ </sstech_productsale>
32
+ </children>
33
+ </config>
34
+ </children>
35
+ </system>
36
+ </children>
37
+ </admin>
38
+ </resources>
39
+ </acl>
40
+ <menu>
41
+ <sstech translate="title">
42
+ <title>SSTech</title>
43
+ <sort_order>90</sort_order>
44
+ <children>
45
+ <sstech_productsale translate="title" module="sstech_productsale">
46
+ <title>Product On Sale</title>
47
+ <sort_order>100</sort_order>
48
+ <children>
49
+ <catalogsale_settings module="sstech_productsale">
50
+ <title>Setting for sale</title>
51
+ <sort_order>30</sort_order>
52
+ <action>adminhtml/system_config/edit/section/sstech_productsale</action>
53
+ </catalogsale_settings>
54
+ </children>
55
+ </sstech_productsale>
56
+ </children>
57
+ </sstech>
58
+ </menu>
59
+ </config>
app/code/community/SSTech/Productsale/etc/config.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <SSTech_Productsale>
5
+ <version>1.0.0</version>
6
+ </SSTech_Productsale>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <sstech_productsale>
11
+ <class>SSTech_Productsale_Helper</class>
12
+ </sstech_productsale>
13
+ </helpers>
14
+ <blocks>
15
+ <sstech_productsale>
16
+ <class>SSTech_Productsale_Block</class>
17
+ </sstech_productsale>
18
+ </blocks>
19
+ <models>
20
+ <sstech_productsale>
21
+ <class>SSTech_Productsale_Model</class>
22
+ </sstech_productsale>
23
+ </models>
24
+ </global>
25
+ <frontend>
26
+ <layout>
27
+ <updates>
28
+ <sstech_productsale>
29
+ <file>sstech/productsale.xml</file>
30
+ </sstech_productsale>
31
+ </updates>
32
+ </layout>
33
+ <routers>
34
+ <sstech_productsale>
35
+ <use>standard</use>
36
+ <args>
37
+ <module>SSTech_Productsale</module>
38
+ <frontName>productsale</frontName>
39
+ </args>
40
+ </sstech_productsale>
41
+ </routers>
42
+ </frontend>
43
+ <default>
44
+ <sstech_productsale>
45
+ <general>
46
+ <is_enabled>1</is_enabled>
47
+ </general>
48
+ </sstech_productsale>
49
+ </default>
50
+ </config>
app/code/community/SSTech/Productsale/etc/system.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <config>
4
+ <tabs>
5
+ <sstech translate="label">
6
+ <label>SSTech</label>
7
+ <sort_order>1</sort_order>
8
+ </sstech>
9
+ </tabs>
10
+ <sections>
11
+ <sstech_productsale translate="label" module="sstech_productsale">
12
+ <label>Product On Sale</label>
13
+ <class>separator-top</class>
14
+ <tab>zextension</tab>
15
+ <frontend_type>text</frontend_type>
16
+ <sort_order>100</sort_order>
17
+ <show_in_default>1</show_in_default>
18
+ <show_in_website>1</show_in_website>
19
+ <show_in_store>1</show_in_store>
20
+ <groups>
21
+ <general translate="label" module="sstech_productsale">
22
+ <label>General</label>
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
+ <sort_order>10</sort_order>
27
+ <fields>
28
+ <is_enabled translate="label">
29
+ <label>Enabled</label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <sort_order>10</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ </is_enabled>
37
+ </fields>
38
+ </general>
39
+ </groups>
40
+ </sstech_productsale>
41
+ </sections>
42
+ </config>
app/design/frontend/default/default/layout/sstech/productsale.xml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="top.links">
5
+ <action method="addLink" translate="label title" module="sstech_productsale" ifconfig="sstech_productsale/general/is_enabled"><label>Sales</label><url>productsale</url><title>Sales</title><prepare>true</prepare></action>
6
+ </reference>
7
+ </default>
8
+ <sstech_productsale_index_index>
9
+ <reference name="root">
10
+ <action method="setTemplate">
11
+ <template>page/2columns-left.phtml</template>
12
+ </action>
13
+ </reference>
14
+ <reference name="left">
15
+ <block type="sstech_productsale/layer" name="productsale.leftnav" after="currency" template="catalog/layer/view.phtml"/>
16
+ </reference>
17
+ <reference name="content">
18
+ <block type="sstech_productsale/list" name="sale_product_list" template="sstech/productsale/list.phtml">
19
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
20
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
21
+ </block>
22
+ </block>
23
+ </reference>
24
+ </sstech_productsale_index_index>
25
+ </layout>
app/design/frontend/default/default/template/sstech/productsale/list.phtml ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_productCollection=$this->getLoadedProductCollection();
3
+ $_helper = $this->helper('catalog/output');
4
+ ?>
5
+ <div class="page-title category-title">
6
+ <h1><?php echo $this->__('On Sale Products') ?></h1>
7
+ </div>
8
+ <?php if(!$_productCollection->count()): ?>
9
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
10
+ <?php else: ?>
11
+ <div class="category-products">
12
+ <?php echo $this->getToolbarHtml() ?>
13
+ <?php // List mode ?>
14
+ <?php if($this->getMode()!='grid'): ?>
15
+ <?php $_iterator = 0; ?>
16
+ <ol class="products-list" id="products-list">
17
+ <?php foreach ($_productCollection as $_product): ?>
18
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
19
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
20
+ <div class="product-shop">
21
+ <div class="f-fix">
22
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
23
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
24
+ <?php if($_product->getRatingSummary()): ?>
25
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
26
+ <?php endif; ?>
27
+ <?php echo $this->getPriceHtml($_product, true) ?>
28
+ <?php if($_product->isSaleable()): ?>
29
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
30
+ <?php else: ?>
31
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
32
+ <?php endif; ?>
33
+ <div class="desc std">
34
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
35
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
36
+ </div>
37
+ <ul class="add-to-links">
38
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
39
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
40
+ <?php endif; ?>
41
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
42
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
43
+ <?php endif; ?>
44
+ </ul>
45
+ </div>
46
+ </div>
47
+ </li>
48
+ <?php endforeach; ?>
49
+ </ol>
50
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
51
+
52
+ <?php else: ?>
53
+
54
+ <?php // Grid Mode ?>
55
+
56
+ <?php $_collectionSize = $_productCollection->count() ?>
57
+ <?php $_columnCount = $this->getColumnCount(); ?>
58
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
59
+ <?php if ($i++%$_columnCount==0): ?>
60
+ <ul class="products-grid">
61
+ <?php endif ?>
62
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
63
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
64
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
65
+ <?php if($_product->getRatingSummary()): ?>
66
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
67
+ <?php endif; ?>
68
+ <?php echo $this->getPriceHtml($_product, true) ?>
69
+ <div class="actions">
70
+ <?php if($_product->isSaleable()): ?>
71
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
72
+ <?php else: ?>
73
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
74
+ <?php endif; ?>
75
+ <ul class="add-to-links">
76
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
77
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
78
+ <?php endif; ?>
79
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
80
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
81
+ <?php endif; ?>
82
+ </ul>
83
+ </div>
84
+ </li>
85
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
86
+ </ul>
87
+ <?php endif ?>
88
+ <?php endforeach ?>
89
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
90
+ <?php endif; ?>
91
+
92
+ <div class="toolbar-bottom">
93
+ <?php echo $this->getToolbarHtml() ?>
94
+ </div>
95
+ </div>
96
+ <?php endif; ?>
app/etc/modules/SSTech_Productsale.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <SSTech_Productsale>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </SSTech_Productsale>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>SSTech_Productsale</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Product Sale will help to show sale product under one roof ..allows automatically add and remove of product once you will add the special price in the Products </summary>
10
+ <description>Product Sale will help to show sale product under one roof ..allows automatically add and remove of product once you will add the special price in the Products .It will allow to add the Sales in the top links ..which will help to </description>
11
+ <notes>Onsale product</notes>
12
+ <authors><author><name>SSTech</name><user>sandeepgulati</user><email>sandynareshg@gmail.com</email></author></authors>
13
+ <date>2014-05-14</date>
14
+ <time>15:06:44</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="SSTech_Productsale.xml" hash="382f16b65ca056f020215e652ec62a62"/></dir></target><target name="magecommunity"><dir name="SSTech"><dir name="Productsale"><dir name="Block"><file name="Layer.php" hash="a1e57b7b6a1ed1c9b2797c7ed032c851"/><file name="List.php" hash="7e0ed2dde71729f7907dbb5083ac3ca9"/><file name="View.php" hash="e5d429debb63b87f1e83605e87e55798"/></dir><dir name="Helper"><file name="Data.php" hash="c230b9140b5ee29949c3f5e553549667"/></dir><dir name="Model"><file name="Layer.php" hash="159c4654e9a85c5231d4e495c907efd6"/></dir><dir name="controllers"><file name="IndexController.php" hash="c9fbe8a6fde340dd48715ccf687f250f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3f465760684f1e079ec727f58e5420d6"/><file name="config.xml" hash="8a14162cf75a59b95469c81bc8d1767d"/><file name="system.xml" hash="3e509f2dc26ec18a349fa417cc26c12e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="sstech"><dir name="productsale"><file name="list.phtml" hash="af7697f5b3cdbdc641171fc375f2b680"/></dir></dir></dir><dir name="layout"><dir name="sstech"><file name="productsale.xml" hash="e8897399a93d8ddb8e82f9451587c859"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>