Version Notes
Fixed issue with back and next, change license type.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Vinagento_Vpager |
Version | 0.1.5 |
Comparing to | |
See all releases |
Code changes from version 0.1.4 to 0.1.5
- app/code/community/Vinagento/Vpager/Block/Catalog/Layer/State.php +0 -6
- app/code/community/Vinagento/Vpager/Block/Catalog/Product/List.php +0 -7
- app/code/community/Vinagento/Vpager/Block/Catalog/Product/List/Toolbar.php +0 -17
- app/code/community/Vinagento/Vpager/Block/CatalogSearch/Result.php +11 -0
- app/code/community/Vinagento/Vpager/Block/Page/Html/Pager.php +0 -6
- app/code/community/Vinagento/Vpager/Block/Product/List.php +0 -8
- app/code/community/Vinagento/Vpager/Block/Product/List/Toolbar.php +0 -13
- app/code/community/Vinagento/Vpager/Controller/Router.php +0 -22
- app/code/community/Vinagento/Vpager/Model/Layer/Filter/Item.php +0 -10
- app/code/community/Vinagento/Vpager/controllers/CategoryController.php +2 -2
- app/code/community/Vinagento/Vpager/controllers/ResultController.php +61 -0
- app/code/community/Vinagento/Vpager/etc/adminhtml.xml +26 -0
- app/code/community/Vinagento/Vpager/etc/config.xml +18 -27
- app/code/community/Vinagento/Vpager/etc/system.xml +36 -0
- app/code/local/Vinagento/All/Helper/Config.php +25 -0
- app/code/local/Vinagento/All/Helper/Data.php +24 -0
- app/code/local/Vinagento/All/Model/Feed/Abstract.php +74 -0
- app/code/local/Vinagento/All/Model/Feed/Updates.php +85 -0
- app/code/local/Vinagento/All/etc/adminhtml.xml +25 -0
- app/code/local/Vinagento/All/etc/config.xml +77 -0
- app/code/local/Vinagento/All/etc/system.xml +9 -0
- app/design/frontend/base/default/layout/vpager.xml +30 -2
- app/design/frontend/base/default/template/vpager/search_result.phtml +20 -0
- app/etc/modules/Vinagento_All.xml +9 -0
- package.xml +8 -9
- skin/frontend/base/default/css/vpager.css +21 -0
- skin/frontend/base/default/js/vpager.js +1 -90
app/code/community/Vinagento/Vpager/Block/Catalog/Layer/State.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State{
|
3 |
-
public function getClearUrl(){
|
4 |
-
return Mage::helper('vpager')->clearLnav(preg_replace('/\?/', '#%21', parent::getClearUrl()));
|
5 |
-
}
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Block/Catalog/Product/List.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Catalog_Product_List extends Mage_Catalog_Block_Product_List{
|
3 |
-
protected function _prepareLayout(){
|
4 |
-
//Mage::log($this->getRequest()->getParams());
|
5 |
-
//die();
|
6 |
-
}
|
7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Block/Catalog/Product/List/Toolbar.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Catalog_Product_List_Toolbar
|
3 |
-
extends Mage_Catalog_Block_Product_List_Toolbar{
|
4 |
-
public function getLimitUrl($limit)
|
5 |
-
{
|
6 |
-
return Mage::helper('vpager')->addLnav(preg_replace('/\?/', '#%21', parent::getLimitUrl($limit)));
|
7 |
-
|
8 |
-
}
|
9 |
-
public function getModeUrl($mode)
|
10 |
-
{
|
11 |
-
return Mage::helper('vpager')->addLnav(preg_replace('/\?/', '#%21', parent::getModeUrl($mode)));
|
12 |
-
}
|
13 |
-
public function getOrderUrl($order, $direction)
|
14 |
-
{
|
15 |
-
return Mage::helper('vpager')->addLnav(preg_replace('/\?/', '#%21', parent::getOrderUrl($order, $direction)));
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Block/CatalogSearch/Result.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Vinagento_Vpager_Block_CatalogSearch_Result extends Mage_CatalogSearch_Block_Result{
|
3 |
+
protected function _prepareLayout()
|
4 |
+
{
|
5 |
+
if(!$this->getRequest()->isXmlHttpRequest()){
|
6 |
+
return parent::_prepareLayout();
|
7 |
+
}else{
|
8 |
+
return $this;
|
9 |
+
}
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Vinagento/Vpager/Block/Page/Html/Pager.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Page_Html_Pager extends Mage_Page_Block_Html_Pager {
|
3 |
-
public function getPageUrl($page) {
|
4 |
-
return Mage::helper('vpager')->addLnav(preg_replace('/\?/', '#%21', parent::getPageUrl($page)));
|
5 |
-
}
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Block/Product/List.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Product_List extends Mage_Catalog_Block_Product_List{
|
3 |
-
protected function _construct()
|
4 |
-
{
|
5 |
-
parent::_construct();
|
6 |
-
$this->_defaultToolbarBlock = 'vpager/product_list_toolbar';
|
7 |
-
}
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Block/Product/List/Toolbar.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Block_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar{
|
3 |
-
public function getPagerUrl($params=array())
|
4 |
-
{
|
5 |
-
$params['id'] = $this->getParentBlock()->getCategoryId();
|
6 |
-
$urlParams = array();
|
7 |
-
$urlParams['_current'] = false;
|
8 |
-
$urlParams['_escape'] = true;
|
9 |
-
$urlParams['_use_rewrite'] = FALSE;
|
10 |
-
$urlParams['_query'] = $params;
|
11 |
-
return $this->getUrl('catalog/category/view', $urlParams);
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Controller/Router.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract{
|
3 |
-
|
4 |
-
public function initControllerRouters($observer)
|
5 |
-
{
|
6 |
-
$front = $observer->getEvent()->getFront();
|
7 |
-
$front->addRouter('vpager', $this);
|
8 |
-
}
|
9 |
-
|
10 |
-
public function match(Zend_Controller_Request_Http $request)
|
11 |
-
{
|
12 |
-
if (!Mage::isInstalled()) {
|
13 |
-
Mage::app()->getFrontController()->getResponse()
|
14 |
-
->setRedirect(Mage::getUrl('install'))
|
15 |
-
->sendResponse();
|
16 |
-
exit;
|
17 |
-
}
|
18 |
-
|
19 |
-
|
20 |
-
return true;
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/Model/Layer/Filter/Item.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Vinagento_Vpager_Model_Layer_Filter_Item
|
3 |
-
extends Mage_Catalog_Model_Layer_Filter_Item{
|
4 |
-
public function getUrl(){
|
5 |
-
return Mage::helper('vpager')->addLnav1(preg_replace('/\?/','#%21',parent::getUrl()));
|
6 |
-
}
|
7 |
-
public function getRemoveUrl(){
|
8 |
-
return Mage::helper('vpager')->addLnav1(preg_replace('/\?/','#%21',parent::getRemoveUrl()));
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vinagento/Vpager/controllers/CategoryController.php
CHANGED
@@ -3,14 +3,14 @@ require_once BP.'/app/code/core/Mage/Catalog/controllers/CategoryController.php'
|
|
3 |
class Vinagento_Vpager_CategoryController extends Mage_Catalog_CategoryController{
|
4 |
protected function _getListHtml(){
|
5 |
$layout = $this->getLayout();
|
6 |
-
$
|
7 |
$layout->generateXml()->generateBlocks();
|
8 |
$output = $layout->getOutput();
|
9 |
return $output;
|
10 |
}
|
11 |
protected function _getLayeredNavHtml(){
|
12 |
$layout = $this->getLayout();
|
13 |
-
$
|
14 |
$layout->generateXml()->generateBlocks();
|
15 |
$output = $layout->getOutput();
|
16 |
return $output;
|
3 |
class Vinagento_Vpager_CategoryController extends Mage_Catalog_CategoryController{
|
4 |
protected function _getListHtml(){
|
5 |
$layout = $this->getLayout();
|
6 |
+
$layout->getUpdate()->load('catalog_category_ajax_view');
|
7 |
$layout->generateXml()->generateBlocks();
|
8 |
$output = $layout->getOutput();
|
9 |
return $output;
|
10 |
}
|
11 |
protected function _getLayeredNavHtml(){
|
12 |
$layout = $this->getLayout();
|
13 |
+
$layout->getUpdate()->load('catalog_category_layered_ajax');
|
14 |
$layout->generateXml()->generateBlocks();
|
15 |
$output = $layout->getOutput();
|
16 |
return $output;
|
app/code/community/Vinagento/Vpager/controllers/ResultController.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once BP.'/app/code/core/Mage/CatalogSearch/controllers/ResultController.php';
|
3 |
+
class Vinagento_Vpager_ResultController extends Mage_CatalogSearch_ResultController{
|
4 |
+
public function indexAction(){
|
5 |
+
$oneRequest = $this->getRequest();
|
6 |
+
$query = Mage::helper('catalogsearch')->getQuery();
|
7 |
+
/* @var $query Mage_CatalogSearch_Model_Query */
|
8 |
+
|
9 |
+
$query->setStoreId(Mage::app()->getStore()->getId());
|
10 |
+
|
11 |
+
if ($query->getQueryText()) {
|
12 |
+
if (Mage::helper('catalogsearch')->isMinQueryLength()) {
|
13 |
+
$query->setId(0)
|
14 |
+
->setIsActive(1)
|
15 |
+
->setIsProcessed(1);
|
16 |
+
}
|
17 |
+
else {
|
18 |
+
if ($query->getId()) {
|
19 |
+
$query->setPopularity($query->getPopularity()+1);
|
20 |
+
}
|
21 |
+
else {
|
22 |
+
$query->setPopularity(1);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($query->getRedirect()){
|
26 |
+
$query->save();
|
27 |
+
$this->getResponse()->setRedirect($query->getRedirect());
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
else {
|
31 |
+
$query->prepare();
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
Mage::helper('catalogsearch')->checkNotes();
|
36 |
+
if($oneRequest->isXmlHttpRequest()){
|
37 |
+
$this->getResponse()->setBody($this->_getAjaxSearchResult());
|
38 |
+
|
39 |
+
}else{
|
40 |
+
$this->loadLayout();
|
41 |
+
$this->_initLayoutMessages('catalog/session');
|
42 |
+
$this->_initLayoutMessages('checkout/session');
|
43 |
+
$this->renderLayout();
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!Mage::helper('catalogsearch')->isMinQueryLength()) {
|
47 |
+
$query->save();
|
48 |
+
}
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
$this->_redirectReferer();
|
52 |
+
}
|
53 |
+
}
|
54 |
+
protected function _getAjaxSearchResult(){
|
55 |
+
$layout = $this->getLayout();
|
56 |
+
$layout->getUpdate()->load('catalogsearch_result_ajax');
|
57 |
+
$layout->generateXml()->generateBlocks();
|
58 |
+
$output = $layout->getOutput();
|
59 |
+
return $output;
|
60 |
+
}
|
61 |
+
}
|
app/code/community/Vinagento/Vpager/etc/adminhtml.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<all>
|
6 |
+
<title>Allow Everything</title>
|
7 |
+
</all>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<vpager translate="title">
|
15 |
+
<title>Ajax Pagination</title>
|
16 |
+
<sort_order>10</sort_order>
|
17 |
+
</vpager>
|
18 |
+
</children>
|
19 |
+
</config>
|
20 |
+
</children>
|
21 |
+
</system>
|
22 |
+
</children>
|
23 |
+
</admin>
|
24 |
+
</resources>
|
25 |
+
</acl>
|
26 |
+
</config>
|
app/code/community/Vinagento/Vpager/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Vinagento_Vpager>
|
5 |
-
<version>0.1.
|
6 |
</Vinagento_Vpager>
|
7 |
</modules>
|
8 |
<frontend>
|
@@ -14,6 +14,13 @@
|
|
14 |
</modules>
|
15 |
</args>
|
16 |
</catalog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
<vpager>
|
18 |
<use>standart</use>
|
19 |
<args>
|
@@ -35,44 +42,28 @@
|
|
35 |
<vpager>
|
36 |
<class>Vinagento_Vpager_Model</class>
|
37 |
</vpager>
|
38 |
-
<!--catalog>
|
39 |
-
<rewrite>
|
40 |
-
<layer_filter_item>Vinagento_Vpager_Model_Layer_Filter_Item</layer_filter_item>
|
41 |
-
</rewrite>
|
42 |
-
</catalog-->
|
43 |
</models>
|
44 |
<blocks>
|
45 |
<vpager>
|
46 |
<class>Vinagento_Vpager_Block</class>
|
47 |
</vpager>
|
48 |
-
|
49 |
<rewrite>
|
50 |
-
<
|
51 |
</rewrite>
|
52 |
-
</
|
53 |
-
<catalog>
|
54 |
-
<rewrite>
|
55 |
-
<product_list_toolbar>Vinagento_Vpager_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
|
56 |
-
<product_list>Vinagento_Vpager_Block_Catalog_Product_List</product_list>
|
57 |
-
<layer_state>Vinagento_Vpager_Block_Catalog_Layer_State</layer_state>
|
58 |
-
</rewrite>
|
59 |
-
</catalog-->
|
60 |
</blocks>
|
61 |
<helpers>
|
62 |
<vpager>
|
63 |
<class>Vinagento_Vpager_Helper</class>
|
64 |
</vpager>
|
65 |
</helpers>
|
66 |
-
<events>
|
67 |
-
<!--controller_front_init_routers>
|
68 |
-
<observers>
|
69 |
-
<mynews>
|
70 |
-
<type>singleton</type>
|
71 |
-
<class>Vinagento_Vpager_Controller_Router</class>
|
72 |
-
<method>initControllerRouters</method>
|
73 |
-
</mynews>
|
74 |
-
</observers>
|
75 |
-
</controller_front_init_routers-->
|
76 |
-
</events>
|
77 |
</global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Vinagento_Vpager>
|
5 |
+
<version>0.1.5</version>
|
6 |
</Vinagento_Vpager>
|
7 |
</modules>
|
8 |
<frontend>
|
14 |
</modules>
|
15 |
</args>
|
16 |
</catalog>
|
17 |
+
<catalogsearch>
|
18 |
+
<args>
|
19 |
+
<modules>
|
20 |
+
<vinagento_vpager before="Mage_CatalogSearch">Vinagento_Vpager</vinagento_vpager>
|
21 |
+
</modules>
|
22 |
+
</args>
|
23 |
+
</catalogsearch>
|
24 |
<vpager>
|
25 |
<use>standart</use>
|
26 |
<args>
|
42 |
<vpager>
|
43 |
<class>Vinagento_Vpager_Model</class>
|
44 |
</vpager>
|
|
|
|
|
|
|
|
|
|
|
45 |
</models>
|
46 |
<blocks>
|
47 |
<vpager>
|
48 |
<class>Vinagento_Vpager_Block</class>
|
49 |
</vpager>
|
50 |
+
<catalogsearch>
|
51 |
<rewrite>
|
52 |
+
<result>Vinagento_Vpager_Block_CatalogSearch_Result</result>
|
53 |
</rewrite>
|
54 |
+
</catalogsearch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
</blocks>
|
56 |
<helpers>
|
57 |
<vpager>
|
58 |
<class>Vinagento_Vpager_Helper</class>
|
59 |
</vpager>
|
60 |
</helpers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
</global>
|
62 |
+
<default>
|
63 |
+
<vpager>
|
64 |
+
<config>
|
65 |
+
<active>1</active>
|
66 |
+
</config>
|
67 |
+
</vpager>
|
68 |
+
</default>
|
69 |
</config>
|
app/code/community/Vinagento/Vpager/etc/system.xml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<vpager>
|
5 |
+
<label>Ajax Pagination - Layered Navigation</label>
|
6 |
+
<tab>vgall</tab>
|
7 |
+
<frontend_type>select</frontend_type>
|
8 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
9 |
+
<sort_order>350</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<groups>
|
14 |
+
<config translate="label">
|
15 |
+
<label>Configurations</label>
|
16 |
+
<expanded>1</expanded>
|
17 |
+
<frontend_type>text</frontend_type>
|
18 |
+
<sort_order>0</sort_order>
|
19 |
+
<show_in_default>1</show_in_default>
|
20 |
+
<show_in_website>1</show_in_website>
|
21 |
+
<fields>
|
22 |
+
<active translate="label comment">
|
23 |
+
<label><![CDATA[Enable Ajax Pagination & Layered Navigation]]></label>
|
24 |
+
<comment><![CDATA[Turn On/Off Ajax Pagination & Layered Navigation]]></comment>
|
25 |
+
<frontend_type>select</frontend_type>
|
26 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
27 |
+
<show_in_default>1</show_in_default>
|
28 |
+
<show_in_website>1</show_in_website>
|
29 |
+
<sort_order>5</sort_order>
|
30 |
+
</active>
|
31 |
+
</fields>
|
32 |
+
</config>
|
33 |
+
</groups>
|
34 |
+
</vpager>
|
35 |
+
</sections>
|
36 |
+
</config>
|
app/code/local/Vinagento/All/Helper/Config.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vinagento Co.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.vinagento.com/LICENSE-M1.txt
|
11 |
+
*
|
12 |
+
* @category Vinagento
|
13 |
+
* @package Vinagento_All
|
14 |
+
* @copyright Copyright (c) 2009-2010 Vinagento Co. (http://www.vinagento.com)
|
15 |
+
* @license http://www.vinagento.com/LICENSE-M1.txt
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Vinagento_All_Helper_Config extends Mage_Core_Helper_Abstract
|
19 |
+
{
|
20 |
+
/** Updates Feed path */
|
21 |
+
const UPDATES_FEED_URL = 'http://www.vinagento.com/blog/category/news/feed';
|
22 |
+
const FREQUENCY = 86400;
|
23 |
+
/** EStore response cache key*/
|
24 |
+
const STORE_RESPONSE_CACHE_KEY = 'vg_all_store_response_cache_key';
|
25 |
+
}
|
app/code/local/Vinagento/All/Helper/Data.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vinagento Co.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.vinagento.com/LICENSE-M1.txt
|
11 |
+
*
|
12 |
+
* @category Vinagento
|
13 |
+
* @package Vinagento_All
|
14 |
+
* @copyright Copyright (c) 2009-2010 Vinagento Co. (http://www.vinagento.com)
|
15 |
+
* @license http://www.vinagento.com/LICENSE-M1.txt
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Vinagento_All_Helper_Data extends Mage_Core_Helper_Abstract
|
19 |
+
{
|
20 |
+
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
|
app/code/local/Vinagento/All/Model/Feed/Abstract.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* aheadWorks Co.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://ecommerce.aheadworks.com/LICENSE-M1.txt
|
11 |
+
*
|
12 |
+
* @category AW
|
13 |
+
* @package AW_All
|
14 |
+
* @copyright Copyright (c) 2009-2010 aheadWorks Co. (http://www.aheadworks.com)
|
15 |
+
* @license http://ecommerce.aheadworks.com/LICENSE-M1.txt
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Vinagento_All_Model_Feed_Abstract extends Mage_Core_Model_Abstract{
|
19 |
+
/**
|
20 |
+
* Retrieve feed data as XML element
|
21 |
+
*
|
22 |
+
* @return SimpleXMLElement
|
23 |
+
*/
|
24 |
+
public function getFeedData()
|
25 |
+
{
|
26 |
+
$curl = new Varien_Http_Adapter_Curl();
|
27 |
+
$curl->setConfig(array(
|
28 |
+
'timeout' => 2
|
29 |
+
));
|
30 |
+
$curl->write(Zend_Http_Client::GET, $this->getFeedUrl(), '1.0');
|
31 |
+
$data = $curl->read();
|
32 |
+
if ($data === false) {
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
$data = preg_split('/^\r?$/m', $data, 2);
|
36 |
+
$data = trim($data[1]);
|
37 |
+
$curl->close();
|
38 |
+
|
39 |
+
try {
|
40 |
+
$xml = new SimpleXMLElement($data);
|
41 |
+
}
|
42 |
+
catch (Exception $e) {
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
|
46 |
+
return $xml;
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getFeedXml()
|
50 |
+
{
|
51 |
+
try {
|
52 |
+
$data = $this->getFeedData();
|
53 |
+
$xml = new SimpleXMLElement($data);
|
54 |
+
}
|
55 |
+
catch (Exception $e) {
|
56 |
+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8" ?>');
|
57 |
+
}
|
58 |
+
|
59 |
+
return $xml;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Retrieve DB date from RSS date
|
64 |
+
*
|
65 |
+
* @param string $rssDate
|
66 |
+
* @return string YYYY-MM-DD YY:HH:SS
|
67 |
+
*/
|
68 |
+
public function getDate($rssDate)
|
69 |
+
{
|
70 |
+
return gmdate('Y-m-d H:i:s', strtotime($rssDate));
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
}
|
app/code/local/Vinagento/All/Model/Feed/Updates.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Vinagento_All_Model_Feed_Updates extends Vinagento_All_Model_Feed_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Retrieve feed url
|
8 |
+
*
|
9 |
+
* @return string
|
10 |
+
*/
|
11 |
+
public function getFeedUrl()
|
12 |
+
{
|
13 |
+
return Vinagento_All_Helper_Config::UPDATES_FEED_URL;
|
14 |
+
}
|
15 |
+
|
16 |
+
public function feedMew(Varien_Event_Observer $observer){
|
17 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
18 |
+
$this->touchMew();
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
public function touchMew()
|
23 |
+
{
|
24 |
+
if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
$feedData = array();
|
28 |
+
try {
|
29 |
+
|
30 |
+
$feedXml = $this->getFeedData();
|
31 |
+
|
32 |
+
if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
|
33 |
+
foreach ($feedXml->channel->item as $item) {
|
34 |
+
$feedData[] = array(
|
35 |
+
'severity' => 3,
|
36 |
+
'date_added' => $this->getDate((string)$item->pubDate),
|
37 |
+
'title' => (string)$item->title,
|
38 |
+
'description' => (string)$item->description,
|
39 |
+
'url' => (string)$item->link,
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
if ($feedData) {
|
44 |
+
Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
$this->setLastUpdate();
|
49 |
+
return true;
|
50 |
+
} catch (Exception $E) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve Update Frequency
|
57 |
+
*
|
58 |
+
* @return int
|
59 |
+
*/
|
60 |
+
public function getFrequency()
|
61 |
+
{
|
62 |
+
return (int)Vinagento_All_Helper_Config::FREQUENCY * 3600;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Retrieve Last update time
|
67 |
+
*
|
68 |
+
* @return int
|
69 |
+
*/
|
70 |
+
public function getLastUpdate()
|
71 |
+
{
|
72 |
+
return Mage::app()->loadCache('vgall_notifications_lastcheck');
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Set last update time (now)
|
77 |
+
*
|
78 |
+
* @return Mage_AdminNotification_Model_Feed
|
79 |
+
*/
|
80 |
+
public function setLastUpdate()
|
81 |
+
{
|
82 |
+
Mage::app()->saveCache(time(), 'vgall_notifications_lastcheck');
|
83 |
+
return $this;
|
84 |
+
}
|
85 |
+
}
|
app/code/local/Vinagento/All/etc/adminhtml.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<all>
|
6 |
+
<title>Allow Everything</title>
|
7 |
+
</all>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<vgall>
|
15 |
+
<title>Vinagento - All</title>
|
16 |
+
</vgall>
|
17 |
+
</children>
|
18 |
+
</config>
|
19 |
+
</children>
|
20 |
+
</system>
|
21 |
+
</children>
|
22 |
+
</admin>
|
23 |
+
</resources>
|
24 |
+
</acl>
|
25 |
+
</config>
|
app/code/local/Vinagento/All/etc/config.xml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Vinagento_All>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Vinagento_All>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<resources>
|
10 |
+
<vgall_setup>
|
11 |
+
<setup>
|
12 |
+
<module>Vinagento_All</module>
|
13 |
+
</setup>
|
14 |
+
<connection>
|
15 |
+
<use>core_setup</use>
|
16 |
+
</connection>
|
17 |
+
</vgall_setup>
|
18 |
+
<vgall_write>
|
19 |
+
<connection>
|
20 |
+
<use>core_write</use>
|
21 |
+
</connection>
|
22 |
+
</vgall_write>
|
23 |
+
<vgall_read>
|
24 |
+
<connection>
|
25 |
+
<use>core_read</use>
|
26 |
+
</connection>
|
27 |
+
</vgall_read>
|
28 |
+
</resources>
|
29 |
+
<models>
|
30 |
+
<vgall>
|
31 |
+
<class>Vinagento_All_Model</class>
|
32 |
+
</vgall>
|
33 |
+
</models>
|
34 |
+
|
35 |
+
<helpers>
|
36 |
+
<vgall>
|
37 |
+
<class>Vinagento_All_Helper</class>
|
38 |
+
</vgall>
|
39 |
+
</helpers>
|
40 |
+
</global>
|
41 |
+
|
42 |
+
<adminhtml>
|
43 |
+
<acl>
|
44 |
+
<resources>
|
45 |
+
<all>
|
46 |
+
<title>Allow Everything</title>
|
47 |
+
</all>
|
48 |
+
<admin>
|
49 |
+
<children>
|
50 |
+
<system>
|
51 |
+
<children>
|
52 |
+
<config>
|
53 |
+
<children>
|
54 |
+
<vgall>
|
55 |
+
<title>Vinagento - All</title>
|
56 |
+
</vgall>
|
57 |
+
</children>
|
58 |
+
</config>
|
59 |
+
</children>
|
60 |
+
</system>
|
61 |
+
</children>
|
62 |
+
</admin>
|
63 |
+
</resources>
|
64 |
+
</acl>
|
65 |
+
<events>
|
66 |
+
<controller_action_predispatch>
|
67 |
+
<observers>
|
68 |
+
<vgall_upds>
|
69 |
+
<type>singleton</type>
|
70 |
+
<class>vgall/feed_updates</class>
|
71 |
+
<method>feedMew</method>
|
72 |
+
</vgall_upds>
|
73 |
+
</observers>
|
74 |
+
</controller_action_predispatch>
|
75 |
+
</events>
|
76 |
+
</adminhtml>
|
77 |
+
</config>
|
app/code/local/Vinagento/All/etc/system.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<vgall translate="label" module="vgall">
|
5 |
+
<label>Vinagento Extensions</label>
|
6 |
+
<sort_order>300</sort_order>
|
7 |
+
</vgall>
|
8 |
+
</tabs>
|
9 |
+
</config>
|
app/design/frontend/base/default/layout/vpager.xml
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
<layout version="0.1.0">
|
3 |
<default>
|
4 |
<reference name="head">
|
5 |
-
<action method="addItem"><type>skin_js</type><name>js/vpager.js</name></action>
|
6 |
-
<action method="
|
7 |
</reference>
|
8 |
</default>
|
9 |
<catalog_category_ajax_view>
|
@@ -37,4 +37,32 @@
|
|
37 |
</block>
|
38 |
</block>
|
39 |
</catalog_category_layered_ajax>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</layout>
|
2 |
<layout version="0.1.0">
|
3 |
<default>
|
4 |
<reference name="head">
|
5 |
+
<action method="addItem" ifconfig="vpager/config/active"><type>skin_js</type><name>js/vpager.js</name></action>
|
6 |
+
<action method="addItem" ifconfig="vpager/config/active"><type>skin_css</type><name>css/vpager.css</name></action>
|
7 |
</reference>
|
8 |
</default>
|
9 |
<catalog_category_ajax_view>
|
37 |
</block>
|
38 |
</block>
|
39 |
</catalog_category_layered_ajax>
|
40 |
+
<catalogsearch_result_ajax>
|
41 |
+
<block type="core/template" name="root" output="toHtml" template="page/html/wrapper.phtml">
|
42 |
+
<action method="setId"><id>layered-container</id></action>
|
43 |
+
<block type="core/template" name="ajax-nav-container" template="page/html/wrapper.phtml" id="layered-nav-container">
|
44 |
+
<action method="setId"><id>ajax-nav-container</id></action>
|
45 |
+
<block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
|
46 |
+
</block>
|
47 |
+
<block type="core/template" name="ajax-list-container" template="page/html/wrapper.phtml">
|
48 |
+
<action method="setId"><id>ajax-list-container</id></action>
|
49 |
+
<block type="catalogsearch/result" name="search.result" template="vpager/search_result.phtml">
|
50 |
+
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
|
51 |
+
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
|
52 |
+
<block type="page/html_pager" name="product_list_toolbar_pager"/>
|
53 |
+
</block>
|
54 |
+
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
|
55 |
+
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
|
56 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
|
57 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
|
58 |
+
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
|
59 |
+
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
|
60 |
+
</block>
|
61 |
+
<action method="setListOrders"/>
|
62 |
+
<action method="setListModes"/>
|
63 |
+
<action method="setListCollection"/>
|
64 |
+
</block>
|
65 |
+
</block>
|
66 |
+
</block>
|
67 |
+
</catalogsearch_result_ajax>
|
68 |
</layout>
|
app/design/frontend/base/default/template/vpager/search_result.phtml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if($this->getResultCount()): ?>
|
2 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
3 |
+
<?php if ($messages = $this->getNoteMessages()):?>
|
4 |
+
<p class="note-msg">
|
5 |
+
<?php foreach ($messages as $message):?>
|
6 |
+
<?php echo $message?><br />
|
7 |
+
<?php endforeach;?>
|
8 |
+
</p>
|
9 |
+
<?php endif; ?>
|
10 |
+
<?php echo $this->getProductListHtml() ?>
|
11 |
+
<?php else: ?>
|
12 |
+
<p class="note-msg">
|
13 |
+
<?php echo ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?>
|
14 |
+
<?php if ($messages = $this->getNoteMessages()):?>
|
15 |
+
<?php foreach ($messages as $message):?>
|
16 |
+
<br /><?php echo $message?>
|
17 |
+
<?php endforeach;?>
|
18 |
+
<?php endif; ?>
|
19 |
+
</p>
|
20 |
+
<?php endif; ?>
|
app/etc/modules/Vinagento_All.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Vinagento_All>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Vinagento_All>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Vinagento_Vpager</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
-
<license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
-
add support for cms page display</notes>
|
13 |
<authors><author><name>Vinagento</name><user>auto-converted</user><email>vinagento@gmail.com</email></author></authors>
|
14 |
-
<date>2012-05
|
15 |
-
<time>
|
16 |
-
<contents><target name="
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Vinagento_Vpager</name>
|
4 |
+
<version>0.1.5</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Change you layered navigation</summary>
|
10 |
+
<description>It use latest HTML5 pushState, allow user to go back use browser back, next button. Still good for SEO</description>
|
11 |
+
<notes>Fixed issue with back and next, change license type.</notes>
|
|
|
12 |
<authors><author><name>Vinagento</name><user>auto-converted</user><email>vinagento@gmail.com</email></author></authors>
|
13 |
+
<date>2012-06-05</date>
|
14 |
+
<time>16:43:33</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Vinagento_Vpager.xml" hash="8c2343c234e6b7a53f3c5efb3407a508"/><file name="Vinagento_All.xml" hash="c7cc1f2ff35e2715b7c1705b7c02752f"/></dir></target><target name="magelocal"><dir name="Vinagento"><dir name="All"><dir name="Helper"><file name="Config.php" hash="21d13777d955e4e952357f188da6e117"/><file name="Data.php" hash="4085e9b76a48f8a27c4a84cff1a5e043"/></dir><dir name="Model"><dir name="Feed"><file name="Abstract.php" hash="01029311caffdc31a9d828c94802fd11"/><file name="Updates.php" hash="9867bd672d7df5c373fe19cefdc99fc0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="60ecc4909183b214f2ea955ee728d248"/><file name="config.xml" hash="87222fbc8ce24253d50294ccf6c65dc0"/><file name="system.xml" hash="93caad8f7183536148872a7bb9be28c8"/></dir></dir></dir></target><target name="magecommunity"><dir name="Vinagento"><dir name="Vpager"><dir name="Block"><dir name="CatalogSearch"><file name="Result.php" hash="461f3712b78004a3491fb1a4c3602984"/></dir></dir><dir name="Helper"><file name="Data.php" hash="26d3ed48ef6e74c34646ba120d5173cc"/></dir><dir name="controllers"><file name="CategoryController.php" hash="47f3a9e070cda7a7d9ce71ab26321887"/><file name="ResultController.php" hash="cb2bce594eeb872e03185b0b590aa795"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1c0980903f8f84ccd205a5d56dcdeadf"/><file name="config.xml" hash="8e353cd6e799cf9de789fa4d880e2f03"/><file name="system.xml" hash="ccd29175d141ff621852e7945b357cd7"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="vpager.xml" hash="b9e52555faa91af93845f76c76c5771d"/></dir><dir name="template"><dir name="vpager"><file name="search_result.phtml" hash="4005b55c055fb9711332d0565ae7c9aa"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="vpager.css" hash="428829d5c2c519fdaeab759cd6fc9a39"/></dir><dir name="js"><file name="vpager.js" hash="d79edeaf9f9cb3f478405485c8547a34"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
skin/frontend/base/default/css/vpager.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
div.category-products{
|
2 |
+
-webkit-transition: background-color 300ms ease-in 200ms; /* property duration timing-function delay */
|
3 |
+
-moz-transition: background-color 300ms ease-in 200ms;
|
4 |
+
-o-transition: background-color 300ms ease-in 200ms;
|
5 |
+
transition: background-color 300ms ease-in 200ms;
|
6 |
+
}
|
7 |
+
div.page-loading{
|
8 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
9 |
+
|
10 |
+
/* IE 5-7 */
|
11 |
+
filter: alpha(opacity=50);
|
12 |
+
|
13 |
+
/* Netscape */
|
14 |
+
-moz-opacity: 0.5;
|
15 |
+
|
16 |
+
/* Safari 1.x */
|
17 |
+
-khtml-opacity: 0.5;
|
18 |
+
|
19 |
+
/* Good browsers */
|
20 |
+
opacity: 0.5;
|
21 |
+
}
|
skin/frontend/base/default/js/vpager.js
CHANGED
@@ -1,90 +1 @@
|
|
1 |
-
|
2 |
-
Vpager.prototype = {
|
3 |
-
initialize : function() {
|
4 |
-
this.request = null;
|
5 |
-
this.url = null;
|
6 |
-
document.observe("dom:loaded", this.olinks.bind(this));
|
7 |
-
},
|
8 |
-
riff : function(u,layered) {
|
9 |
-
this.showSpinner(false);
|
10 |
-
this.url = u;
|
11 |
-
if (this.request !== null) {
|
12 |
-
this.request.abort();
|
13 |
-
}
|
14 |
-
this.request = new Ajax.Request(u, {
|
15 |
-
method : 'get',
|
16 |
-
onSuccess : this.glist.bind(this),
|
17 |
-
onComplete : this.olinks.bind(this)
|
18 |
-
});
|
19 |
-
},
|
20 |
-
getResult : function(event) {
|
21 |
-
sEle = Event.element(event);
|
22 |
-
//console.log(sEle);
|
23 |
-
if (sEle.tagName.toLowerCase() == 'a') {
|
24 |
-
this.riff(sEle.href);
|
25 |
-
} else {
|
26 |
-
if (sEle.tagName.toLowerCase() == 'img'){
|
27 |
-
this.riff(sEle.up().href);
|
28 |
-
}else{
|
29 |
-
this.riff(sEle.value);
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
33 |
-
event.stop();
|
34 |
-
},
|
35 |
-
getNavRes: function(event){
|
36 |
-
Event.stop(event);
|
37 |
-
this.isNav = true;
|
38 |
-
sEle = Event.element(event);
|
39 |
-
if (sEle.tagName.toLowerCase() == 'a') {
|
40 |
-
this.riff(sEle.href);
|
41 |
-
}else{
|
42 |
-
if(sEle.tagName.toLowerCase() == 'span'){
|
43 |
-
this.riff(sEle.up().href);
|
44 |
-
}
|
45 |
-
}
|
46 |
-
},
|
47 |
-
olinks : function() {
|
48 |
-
$$('.pages li a', '.view-mode a', '.sorter a').each(function(item) {
|
49 |
-
item.observe('click', this.getResult.bind(this))
|
50 |
-
}.bind(this));
|
51 |
-
$$('.limiter select', '.sorter select').each(function(item) {
|
52 |
-
item.observe('change', this.getResult.bind(this));
|
53 |
-
item.removeAttribute('onchange');
|
54 |
-
}.bind(this));
|
55 |
-
$$('.block-layered-nav a').each(function(item){
|
56 |
-
item.observe('click',this.getNavRes.bind(this))
|
57 |
-
}.bind(this));
|
58 |
-
},
|
59 |
-
glist : function(transport) {
|
60 |
-
ft = transport.responseText;
|
61 |
-
if (typeof(window.history.pushState) == 'function'){
|
62 |
-
window.history.pushState({'changed':true}, document.title, this.url);
|
63 |
-
}
|
64 |
-
var bagEle = new Element('div');
|
65 |
-
bagEle.update(ft);
|
66 |
-
var plist = bagEle.select('div#ajax-list-container')[0];
|
67 |
-
var lnav = bagEle.select('div#ajax-nav-container')[0];
|
68 |
-
$$('.category-products').each(function(item) {
|
69 |
-
Element.replace(item, plist.innerHTML);
|
70 |
-
});
|
71 |
-
$$('.block-layered-nav').each(function(item) {
|
72 |
-
Element.replace(item, lnav.innerHTML);
|
73 |
-
});
|
74 |
-
},
|
75 |
-
showSpinner : function(flag) {
|
76 |
-
$$('.category-products').each(function(item){
|
77 |
-
new Effect.Opacity(item, { from: 1.0, to: 0.5, duration: 0.5 })
|
78 |
-
});
|
79 |
-
$$('.block-layered-nav').each(function(item) {
|
80 |
-
new Effect.Opacity(item, { from: 1.0, to: 0.5, duration: 0.5 })
|
81 |
-
});
|
82 |
-
}
|
83 |
-
};
|
84 |
-
Object.extend(Ajax);
|
85 |
-
Ajax.Request.prototype.abort = function() {
|
86 |
-
this.transport.onreadystatechange = Prototype.emptyFunction;
|
87 |
-
this.transport.abort();
|
88 |
-
Ajax.activeRequestCount--;
|
89 |
-
};
|
90 |
-
var ajaxPager = new Vpager();
|
1 |
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8 o=Y.Z();o.B={10:2(){1.c=p;1.3=p;1.d=e;C.f("11:12",1.q.5(1));13.14=2(9){1.d=15;1.r(16.g)}.5(1)},r:2(u){1.D(e);1.3=u;b(1.c!==p){1.c.s()}1.c=t h.E(u,{17:\'18\',19:1.F.5(1),1a:1.q.5(1)})},i:2(9){6=G.1b(9);3=\'\';b(6.H){3=6.H}v b(6.g){3=6.g}v{6=G.1c(9,\'a\');3=6.g}1.r(3);9.1d()},q:2(){$$(\'.1e 1f a\',\'.1g-1h a\',\'.w a\').j(\'f\',\'I\',1.i.5(1));$$(\'.J 7\',\'.w 7\').j(\'1i\',\'1j\');$$(\'.J 7\',\'.w 7\').j(\'f\',\'1k\',1.i.5(1));$$(\'.x-y-k a\').j(\'f\',\'I\',1.i.5(1))},F:2(l){K=l.1l;b(1m(L.M)==\'2\'){b(1.d===e){L.M({3:1.3},C.1n,1.3)}v{1.d=e}}8 m=t z(\'A\');m.1o(K);8 N=m.7(\'A#O-1p-P\')[0];8 Q=m.7(\'A#O-k-P\')[0];$$(\'.R-S\').n(2(4){z.T(4,N.U)});$$(\'.x-y-k\').n(2(4){z.T(4,Q.U)})},D:2(1q){$$(\'.R-S\').n(2(4){4.V(\'W-X\')});$$(\'.x-y-k\').n(2(4){4.V(\'W-X\')})}};1r.1s(h);h.E.B.s=2(){1.l.1t=1u.1v;1.l.s();h.1w--};8 1x=t o();',62,96,'|this|function|url|item|bind|sEle|select|var|event||if|request|pop|false|observe|href|Ajax|getResult|invoke|nav|transport|bagEle|each|Vpager|null|olinks|riff|abort|new||else|sorter|block|layered|Element|div|prototype|document|showSpinner|Request|glist|Event|value|click|limiter|ft|history|pushState|plist|ajax|container|lnav|category|products|replace|innerHTML|addClassName|page|loading|Class|create|initialize|dom|loaded|window|onpopstate|true|location|method|get|onSuccess|onComplete|element|findElement|stop|pages|li|view|mode|removeAttribute|onchange|change|responseText|typeof|title|update|list|flag|Object|extend|onreadystatechange|Prototype|emptyFunction|activeRequestCount|ajaxPager'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|