Version Notes
Bug fixes
Download this release
Release Info
Developer | Magento Core Team |
Extension | vian_pictograms_free |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
app/code/local/VIAN/Pictograms/Block/Catalog/Product/List.php
CHANGED
@@ -6,7 +6,7 @@ class VIAN_Pictograms_Block_Catalog_Product_List extends Mage_Catalog_Block_Prod
|
|
6 |
* Over price block
|
7 |
*/
|
8 |
|
9 |
-
|
10 |
|
11 |
if (! Mage::helper('pictograms')->displayFrontEnabled()){
|
12 |
return parent::getPriceHtml($product);
|
6 |
* Over price block
|
7 |
*/
|
8 |
|
9 |
+
public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix = ''){
|
10 |
|
11 |
if (! Mage::helper('pictograms')->displayFrontEnabled()){
|
12 |
return parent::getPriceHtml($product);
|
app/code/local/VIAN/Pictograms/Block/Widget/Grid/Column.php
CHANGED
@@ -1,27 +1,43 @@
|
|
1 |
<?php
|
2 |
class VIAN_Pictograms_Block_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column {
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
protected function _getRendererByType() {
|
10 |
-
|
11 |
switch (strtolower($this->getType())) {
|
12 |
case 'pictogram':
|
13 |
$rendererClass = 'pictograms/widget_grid_column_renderer_pictogram';
|
14 |
break;
|
15 |
default:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
break;
|
23 |
}
|
24 |
return $rendererClass;
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
}
|
1 |
<?php
|
2 |
class VIAN_Pictograms_Block_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column {
|
3 |
|
4 |
+
/**
|
5 |
+
* Specifies renderer class for custom 'pictogram' type
|
6 |
+
* @see Mage_Adminhtml_Block_Widget_Grid_Column::_getRendererByType()
|
7 |
+
*/
|
8 |
+
|
9 |
protected function _getRendererByType() {
|
10 |
+
|
11 |
switch (strtolower($this->getType())) {
|
12 |
case 'pictogram':
|
13 |
$rendererClass = 'pictograms/widget_grid_column_renderer_pictogram';
|
14 |
break;
|
15 |
default:
|
16 |
+
// check if TBT_Enhancedgrid is loaded
|
17 |
+
if (Mage::helper('pictograms')->isTBTEnabled()){
|
18 |
+
$rendererClass = $this->_getTBTRenderer();
|
19 |
+
} else {
|
20 |
+
$rendererClass = parent::_getRendererByType();
|
21 |
+
}
|
22 |
break;
|
23 |
}
|
24 |
return $rendererClass;
|
25 |
}
|
26 |
+
|
27 |
+
protected function _getTBTRenderer() {
|
28 |
+
|
29 |
+
switch (strtolower($this->getType())) {
|
30 |
+
case 'image':
|
31 |
+
$rendererClass = 'enhancedgrid/widget_grid_column_renderer_image';
|
32 |
+
break;
|
33 |
+
case 'category':
|
34 |
+
$rendererClass = 'enhancedgrid/widget_grid_column_renderer_category';
|
35 |
+
break;
|
36 |
+
default:
|
37 |
+
$rendererClass = parent::_getRendererByType();
|
38 |
+
break;
|
39 |
+
}
|
40 |
+
return $rendererClass;
|
41 |
+
}
|
42 |
|
43 |
}
|
app/code/local/VIAN/Pictograms/Helper/Data.php
CHANGED
@@ -47,26 +47,23 @@ class VIAN_Pictograms_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
47 |
|
48 |
public function getPictogramsHTML($product) {
|
49 |
|
50 |
-
$
|
51 |
-
$array
|
|
|
52 |
if ($data = $this->getPictograms($product->getId())){
|
53 |
-
$hasData = TRUE;
|
54 |
-
}
|
55 |
-
|
56 |
-
foreach ($data as $id){
|
57 |
-
$obj = Mage::getModel('pictograms/pictograms')->load($id);
|
58 |
-
$array[] = array('url' => $obj->getSmallImage(), 'alt' => $obj->getData('short_description'));
|
59 |
-
}
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
$output = '<div class="pictograms-mini-mainDiv">';
|
65 |
foreach ($array as $image){
|
66 |
$output .= '<span class="pictograms-mini-span"><img src="'.$image['url'].'" title="'.$image['alt'].'" alt="'.$image['alt'].'" /></span>';
|
67 |
}
|
68 |
$output .= '</div>';
|
69 |
}
|
|
|
70 |
return $output;
|
71 |
}
|
72 |
|
@@ -123,7 +120,7 @@ class VIAN_Pictograms_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
123 |
|
124 |
public function displayFrontEnabled(){
|
125 |
|
126 |
-
if (! Mage::getStoreConfig('pictograms/
|
127 |
return FALSE;
|
128 |
}
|
129 |
return TRUE;
|
47 |
|
48 |
public function getPictogramsHTML($product) {
|
49 |
|
50 |
+
$output = '';
|
51 |
+
$array = array();
|
52 |
+
|
53 |
if ($data = $this->getPictograms($product->getId())){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
foreach ($data as $id){
|
56 |
+
$obj = Mage::getModel('pictograms/pictograms')->load($id);
|
57 |
+
$array[] = array('url' => $obj->getSmallImage(), 'alt' => $obj->getData('short_description'));
|
58 |
+
}
|
59 |
+
|
60 |
$output = '<div class="pictograms-mini-mainDiv">';
|
61 |
foreach ($array as $image){
|
62 |
$output .= '<span class="pictograms-mini-span"><img src="'.$image['url'].'" title="'.$image['alt'].'" alt="'.$image['alt'].'" /></span>';
|
63 |
}
|
64 |
$output .= '</div>';
|
65 |
}
|
66 |
+
|
67 |
return $output;
|
68 |
}
|
69 |
|
120 |
|
121 |
public function displayFrontEnabled(){
|
122 |
|
123 |
+
if (! Mage::getStoreConfig('pictograms/configuration/display_in_list')){
|
124 |
return FALSE;
|
125 |
}
|
126 |
return TRUE;
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>vian_pictograms_free</name>
|
4 |
-
<version>2.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
<channel>community</channel>
|
@@ -15,11 +15,11 @@
|
|
15 |
<li>Pictograms can be easily reordered at any time</li>
|
16 |
<li>Pictograms can have up to 2 associated images: standard images are used for product view pages, while small images are used for product listing pages (optional)</li>
|
17 |
<li>The extension’s functionality code is 100% Open Source</li></description>
|
18 |
-
<notes>
|
19 |
<authors><author><name>viansolutions</name><user>auto-converted</user><email>joan.puche@viansolutions.com</email></author></authors>
|
20 |
-
<date>2012-
|
21 |
-
<time>
|
22 |
-
<contents><target name="magelocal"><dir name="VIAN"><dir name="Pictograms"><dir name="Block"><dir name="Adminhtml"><dir name="Pictograms"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="1a0bf7f170a00816bdfc9e01fbaae6a9"/></dir><file name="Form.php" hash="df28ce655944d002a9f03aad48c44037"/><file name="Tabs.php" hash="d483d18d02536d47be4894d5d80842c1"/></dir><file name="Edit.php" hash="df3bae4ece28160b469bc1c5914be853"/><file name="Grid.php" hash="732e7ddcdabe36ea975f16bd30208399"/></dir><file name="Pictograms.php" hash="1edc5fbbc32a33ee8f141eacce372bca"/></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="
|
23 |
<compatible/>
|
24 |
<dependencies/>
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>vian_pictograms_free</name>
|
4 |
+
<version>2.1.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
<channel>community</channel>
|
15 |
<li>Pictograms can be easily reordered at any time</li>
|
16 |
<li>Pictograms can have up to 2 associated images: standard images are used for product view pages, while small images are used for product listing pages (optional)</li>
|
17 |
<li>The extension’s functionality code is 100% Open Source</li></description>
|
18 |
+
<notes>Bug fixes</notes>
|
19 |
<authors><author><name>viansolutions</name><user>auto-converted</user><email>joan.puche@viansolutions.com</email></author></authors>
|
20 |
+
<date>2012-07-23</date>
|
21 |
+
<time>11:12:42</time>
|
22 |
+
<contents><target name="magelocal"><dir name="VIAN"><dir name="Pictograms"><dir name="Block"><dir name="Adminhtml"><dir name="Pictograms"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="1a0bf7f170a00816bdfc9e01fbaae6a9"/></dir><file name="Form.php" hash="df28ce655944d002a9f03aad48c44037"/><file name="Tabs.php" hash="d483d18d02536d47be4894d5d80842c1"/></dir><file name="Edit.php" hash="df3bae4ece28160b469bc1c5914be853"/><file name="Grid.php" hash="732e7ddcdabe36ea975f16bd30208399"/></dir><file name="Pictograms.php" hash="1edc5fbbc32a33ee8f141eacce372bca"/></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="75b79150f68e24bab92ffd9cbc0f2f03"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Pictogram.php" hash="23814b056cb4284d9c581d2f5129ba23"/></dir></dir><file name="Column.php" hash="45fb3a3cc90200b23726048070f3b701"/></dir></dir><file name="Button.php" hash="c93a07de834bb81ae7d43706d9344a50"/><file name="Pictograms.php" hash="3e168c1c954e77ed4bfcbcc336dfd85e"/></dir><dir name="Helper"><file name="Data.php" hash="c14c51dc9c90107af442c599d0905d59"/><file name="Uninstall.php" hash="d5fff0db0597746f0443b22eda36e3bc"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Pictograms"><file name="Collection.php" hash="b175d464ee87c4771a3accc28181bf62"/></dir><file name="Pictograms.php" hash="1a068cf73e27409ed993be2d59f9d1e9"/></dir><dir name="Product"><dir name="Attribute"><dir name="Source"><file name="Unit.php" hash="3f51c4138a924afd28acdbc9604ba0a8"/></dir></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="b0a8b5265e4c1e561624c976af0ed82e"/></dir></dir></dir><dir name="Rewrite"><file name="Action.php" hash="7e6e016228566baf868aadee2c937323"/></dir><file name="Observer.php" hash="0300fa278a9d358d3c4fa28bb78b9f7a"/><file name="Pictograms.php" hash="55dd17eb750676740c95ca2458fa9ff9"/><file name="Status.php" hash="55bb8eb5aeb77d4cc4c524699fce45ac"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PictogramsController.php" hash="99c81f9503f389f08273b0e070547a17"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9c528937b6de1e34b1200af70cdb2aea"/><file name="config.xml" hash="fff0a4f9f27d628f0a273e040c3a024d"/><file name="system.xml" hash="550088f7bb4a52b19b8242f30e7a0c47"/></dir><dir name="sql"><dir name="pictograms_setup"><file name="mysql4-install-2.0.0.php" hash="f6bd4ea418567b02f8e04f7cc216abf6"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="pictograms.xml" hash="9bf24d4be7b30614bf34e0610880cd89"/></dir><dir name="template"><dir name="pictograms"><dir name="catalog"><dir name="product"><dir name="view"><file name="pictograms.phtml" hash="d7833bc062a163ebb3f14fa725e7908e"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pictograms.xml" hash="6f99b22a2ebb7dc22f7111273a0a985a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VIAN_Pictograms.xml" hash="6b20f96c93bd0c2264d374ce5574c143"/></dir></target><target name="magelocale"><dir name="es_ES"><file name="VIAN_Pictograms.csv" hash="97cf4ae4c796715bfa1e39932c9d4a5e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="pictograms"><dir name="css"><file name="skin.css" hash="20d4bd29dd17c98d8778c5704e91a553"/></dir></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
<dependencies/>
|
25 |
</package>
|
skin/frontend/default/default/pictograms/css/skin.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
.pictograms-mini-mainDiv { border: 1px solid LightGrey
|
2 |
.pictograms-mini-span { float: left; margin: 3px; }
|
3 |
.pictograms-mini-span > img { height: 16px; width: 16px; }
|
4 |
-
.pictograms-product-mainDiv { border: 1px solid LightGrey
|
5 |
.pictograms-product-mainDiv > span { float: left; margin: 9px; }
|
6 |
.pictograms-product-mainDiv > span > img { height: 48px; width: 48px; }
|
7 |
.pictograms-clear { clear: both; }
|
1 |
+
.pictograms-mini-mainDiv { /*border: 1px solid LightGrey;*/ float: left; width: 100%; }
|
2 |
.pictograms-mini-span { float: left; margin: 3px; }
|
3 |
.pictograms-mini-span > img { height: 16px; width: 16px; }
|
4 |
+
.pictograms-product-mainDiv { /*border: 1px solid LightGrey;*/ float: left; width: 100%; }
|
5 |
.pictograms-product-mainDiv > span { float: left; margin: 9px; }
|
6 |
.pictograms-product-mainDiv > span > img { height: 48px; width: 48px; }
|
7 |
.pictograms-clear { clear: both; }
|