Version Notes
Fixed admin grid renderer error
Download this release
Release Info
Developer | Kalpesh Sakhareliya |
Extension | Kerss_Categoryslider |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Grid.php +19 -3
- app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Renderer/category.php +0 -23
- app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Renderer/image.php +0 -21
- package.xml +4 -4
app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Grid.php
CHANGED
@@ -20,9 +20,26 @@ class Kerss_Categoryslider_Block_Adminhtml_Categoryslider_Grid extends Mage_Admi
|
|
20 |
|
21 |
protected function _prepareCollection() {
|
22 |
$collection = Mage::getModel("categoryslider/categoryslider")->getCollection();
|
|
|
23 |
$this->setCollection($collection);
|
24 |
return parent::_prepareCollection();
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
protected function _prepareColumns() {
|
28 |
$this->addColumn("slider_id", array(
|
@@ -38,8 +55,7 @@ class Kerss_Categoryslider_Block_Adminhtml_Categoryslider_Grid extends Mage_Admi
|
|
38 |
'width' => '100px',
|
39 |
'type' => 'image',
|
40 |
'index' => 'image',
|
41 |
-
'
|
42 |
-
'style' => 'text-align:center'
|
43 |
));
|
44 |
|
45 |
$this->addColumn("title", array(
|
@@ -51,7 +67,7 @@ class Kerss_Categoryslider_Block_Adminhtml_Categoryslider_Grid extends Mage_Admi
|
|
51 |
$this->addColumn("category_id", array(
|
52 |
"header" => Mage::helper("categoryslider")->__("Category"),
|
53 |
"index" => "category_id",
|
54 |
-
"
|
55 |
"width" => "250px",
|
56 |
));
|
57 |
|
20 |
|
21 |
protected function _prepareCollection() {
|
22 |
$collection = Mage::getModel("categoryslider/categoryslider")->getCollection();
|
23 |
+
$collection->addFieldToSelect('*');
|
24 |
$this->setCollection($collection);
|
25 |
return parent::_prepareCollection();
|
26 |
}
|
27 |
+
|
28 |
+
public function callback_image($value)
|
29 |
+
{
|
30 |
+
$width = 130;
|
31 |
+
return "<img src='".Mage::getBaseUrl('media').$value."' width=".$width.">";
|
32 |
+
}
|
33 |
+
|
34 |
+
public function callback_category($value)
|
35 |
+
{
|
36 |
+
$categoryId = explode(',', $value);
|
37 |
+
$categoryData = array();
|
38 |
+
foreach ($categoryId as $key => $catData) {
|
39 |
+
$category = Mage::getModel('catalog/category')->load($catData);
|
40 |
+
echo $categoryData[] = $category->getName() . '<br />';
|
41 |
+
}
|
42 |
+
}
|
43 |
|
44 |
protected function _prepareColumns() {
|
45 |
$this->addColumn("slider_id", array(
|
55 |
'width' => '100px',
|
56 |
'type' => 'image',
|
57 |
'index' => 'image',
|
58 |
+
'frame_callback' => array($this, 'callback_image')
|
|
|
59 |
));
|
60 |
|
61 |
$this->addColumn("title", array(
|
67 |
$this->addColumn("category_id", array(
|
68 |
"header" => Mage::helper("categoryslider")->__("Category"),
|
69 |
"index" => "category_id",
|
70 |
+
"frame_callback" => array($this, "callback_category"),
|
71 |
"width" => "250px",
|
72 |
));
|
73 |
|
app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Renderer/category.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Kerss Infotech
|
5 |
-
* Kerss Category Banner Slider Magento Extension
|
6 |
-
*
|
7 |
-
* @category Kerss
|
8 |
-
* @package Kerss_Categoryslider
|
9 |
-
* @copyright Copyright � 2015-2016 Kerss Infotech (http://kersstech.com/)
|
10 |
-
*/
|
11 |
-
class Kerss_Categoryslider_Block_Adminhtml_Categoryslider_Renderer_Category extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
12 |
-
|
13 |
-
public function render(Varien_Object $row) {
|
14 |
-
$categoryId = explode(',', $row->getData($this->getColumn()->getIndex()));
|
15 |
-
|
16 |
-
$categoryData = array();
|
17 |
-
foreach ($categoryId as $key => $catData) {
|
18 |
-
$category = Mage::getModel('catalog/category')->load($catData);
|
19 |
-
echo $categoryData[] = $category->getName() . '<br />';
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Kerss/Categoryslider/Block/Adminhtml/Categoryslider/Renderer/image.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Kerss Infotech
|
5 |
-
* Kerss Category Banner Slider Magento Extension
|
6 |
-
*
|
7 |
-
* @category Kerss
|
8 |
-
* @package Kerss_Categoryslider
|
9 |
-
* @copyright Copyright � 2015-2016 Kerss Infotech (http://kersstech.com/)
|
10 |
-
*/
|
11 |
-
class Kerss_Categoryslider_Block_Adminhtml_Categoryslider_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
12 |
-
|
13 |
-
public function render(Varien_Object $row) {
|
14 |
-
$imgName = $row->getData($this->getColumn()->getIndex());
|
15 |
-
$mediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
16 |
-
$html = '<img id="' . $this->getColumn()->getId() . '" width="130px" src="' . $mediaUrl . $imgName . '"';
|
17 |
-
$html .= '/>';
|
18 |
-
return $html;
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Kerss_Categoryslider</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,11 @@ Features like:
|
|
14 |
- Pause the slideshow when hovering over slider
|
15 |
- Advanced slide Management
|
16 |
- Displays the progress bar for each slide to show the time delay</description>
|
17 |
-
<notes>Fixed
|
18 |
<authors><author><name>Kalpesh Sakhareliya</name><user>kersstech</user><email>kersstech@gmail.com</email></author></authors>
|
19 |
<date>2016-11-18</date>
|
20 |
-
<time>
|
21 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Kerss_Categoryslider.xml" hash="56617b81ff112e24a4f8915a663f3f57"/></dir></target><target name="magecommunity"><dir name="Kerss"><dir name="Categoryslider"><dir name="Block"><dir name="Adminhtml"><dir name="Categoryslider"><dir name="Edit"><file name="Form.php" hash="658e8f83a3bfd195f790a5e903843d47"/><dir name="Tab"><file name="Category.php" hash="ff89fbbce286567c806ed5ced941b37e"/><file name="Form.php" hash="932c52230bbf753319a5b2e570ca2c58"/></dir><file name="Tabs.php" hash="b53b22b15000923b4d8c0fa57d0345f3"/></dir><file name="Edit.php" hash="8aa301e8e0cce28bc2eb62d397f8bf10"/><file name="Grid.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Kerss_Categoryslider</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
14 |
- Pause the slideshow when hovering over slider
|
15 |
- Advanced slide Management
|
16 |
- Displays the progress bar for each slide to show the time delay</description>
|
17 |
+
<notes>Fixed admin grid renderer error</notes>
|
18 |
<authors><author><name>Kalpesh Sakhareliya</name><user>kersstech</user><email>kersstech@gmail.com</email></author></authors>
|
19 |
<date>2016-11-18</date>
|
20 |
+
<time>13:36:38</time>
|
21 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Kerss_Categoryslider.xml" hash="56617b81ff112e24a4f8915a663f3f57"/></dir></target><target name="magecommunity"><dir name="Kerss"><dir name="Categoryslider"><dir name="Block"><dir name="Adminhtml"><dir name="Categoryslider"><dir name="Edit"><file name="Form.php" hash="658e8f83a3bfd195f790a5e903843d47"/><dir name="Tab"><file name="Category.php" hash="ff89fbbce286567c806ed5ced941b37e"/><file name="Form.php" hash="932c52230bbf753319a5b2e570ca2c58"/></dir><file name="Tabs.php" hash="b53b22b15000923b4d8c0fa57d0345f3"/></dir><file name="Edit.php" hash="8aa301e8e0cce28bc2eb62d397f8bf10"/><file name="Grid.php" hash="876f018da66ff633d60eca7af329ab4f"/></dir><file name="Categoryslider.php" hash="7cef6b48f6647fb407db37bbc5164f9b"/></dir><file name="Index.php" hash="84db8af1e1dbcb9221fd41819e19d7da"/></dir><dir name="Helper"><file name="Data.php" hash="9d7c2580b7eb6c9976216b13549499c8"/></dir><dir name="Model"><file name="Categoryslider.php" hash="bf94122b539780a24f4d15ccad7027ad"/><dir name="Mysql4"><dir name="Categoryslider"><file name="Collection.php" hash="8d79ace65698e857672278ed0f06f84b"/></dir><file name="Categoryslider.php" hash="dbcf4d19a6da50acb9c136b0f3a80c80"/></dir><file name="Options.php" hash="7b5b9ec22a7d6def341a6e523907c6a4"/><file name="Status.php" hash="73683d9bdadac0fb3078febc9515f4dd"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategorysliderController.php" hash="9bbdc26d5913b7c6971761487365faae"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9e5ff987880b0049ad837bb47c9a6383"/><file name="config.xml" hash="4f1b861191358f1c412ff8e6e8a2e05a"/><file name="system.xml" hash="2d7c1afc59a8cf814cff79bd0c6fb01e"/></dir><dir name="sql"><dir name="categoryslider_setup"><file name="mysql4-install-1.0.0.php" hash="10e7fe3c4ad5b4a779729f68fa613a39"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="categoryslider.xml" hash="bf5fa65efcd1b91c1bd8f55edaeede5b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="categoryslider.xml" hash="8306abae74f08da524bccf441f29c764"/></dir><dir name="template"><dir name="categoryslider"><file name="index.phtml" hash="70ce2f4c945ac6a277d27097e8556b83"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="categoryslider"><file name="devrama-slider.css" hash="3549b749e2a4bf1e28cf376429788ca7"/></dir></dir><dir name="js"><dir name="categoryslider"><file name="jquery.devrama.slider.js" hash="b566b79b9fcf058d3d56944c9f88ac8e"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="jquery.noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/></dir></dir></dir></dir></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|