Version Notes
Fix issues on catalogsearch result page.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Safal_Catalogpreview |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Safal/Catalogpreview/Block/Adminhtml/System/Config/Form/Fieldset/Catalogpreview/Categories.php +11 -2
- app/code/community/Safal/Catalogpreview/Block/Catalogpreview.php +6 -0
- app/code/community/Safal/Catalogpreview/Helper/Data.php +17 -1
- app/code/community/Safal/Catalogpreview/etc/config.xml +2 -2
- app/code/community/Safal/Catalogpreview/etc/system.xml +31 -31
- app/design/frontend/default/default/layout/catalogpreview.xml +15 -0
- app/design/frontend/rwd/default/layout/catalogpreview.xml +15 -0
- package.xml +5 -5
app/code/community/Safal/Catalogpreview/Block/Adminhtml/System/Config/Form/Fieldset/Catalogpreview/Categories.php
CHANGED
@@ -19,7 +19,16 @@ class Safal_Catalogpreview_Block_Adminhtml_System_Config_Form_Fieldset_Catalogpr
|
|
19 |
var idoc= iframe.contentDocument || iframe.contentWindow.document;
|
20 |
var iwin= iframe.contentWindow || iframe.contentDocument.defaultView;
|
21 |
iwin.Element.extend(idoc); // use the copy of Prototype in the iframe's window
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
return true;
|
24 |
}
|
25 |
catch(e){
|
@@ -31,7 +40,7 @@ class Safal_Catalogpreview_Block_Adminhtml_System_Config_Form_Fieldset_Catalogpr
|
|
31 |
});
|
32 |
</script>";
|
33 |
$html .= '</script>';
|
34 |
-
$html .= "<label style='float: left; width: 210px;'>Select category</label><div class='form-list'><button id='selectcategoriesbtn' type='button'><span><span>Select Categories</span></span></button><p class='note' style='float: left; width:
|
35 |
$html .= "<input type='hidden' name='".$element->getName()."' id='".$element->getId()."' value='".$element->getValue()."'/>";
|
36 |
$html .= "<style type='text/css'>.dialog {background: none repeat scroll 0 0 #FFFFFF;padding-bottom: 25px;border: 1px solid #555555;position: absolute;z-index: 10000 !important;}.magento_title {font: bold 12px/24px Arial,Helvetica,sans-serif;}.magento_nw {height: 8px;}.magento_n {height: 8px;}.magento_ne {height: 8px;}.table_window{width:100%;}</style>";
|
37 |
$html .= $javaScript;
|
19 |
var idoc= iframe.contentDocument || iframe.contentWindow.document;
|
20 |
var iwin= iframe.contentWindow || iframe.contentDocument.defaultView;
|
21 |
iwin.Element.extend(idoc); // use the copy of Prototype in the iframe's window
|
22 |
+
iframvalues = idoc.getElementById('product_categories').value.split(',');
|
23 |
+
var sorted_arr = iframvalues.sort(); // You can define the comparing function here.
|
24 |
+
// JS by default uses a crappy string compare.
|
25 |
+
var results = [];
|
26 |
+
for (var i = 0; i < iframvalues.length - 1; i++) {
|
27 |
+
if (sorted_arr[i + 1] == sorted_arr[i]) {
|
28 |
+
results.push(sorted_arr[i]);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
$('".$element->getId()."').value = results;
|
32 |
return true;
|
33 |
}
|
34 |
catch(e){
|
40 |
});
|
41 |
</script>";
|
42 |
$html .= '</script>';
|
43 |
+
$html .= "<label style='float: left; width: 210px;'>Select category</label><div class='form-list'><button id='selectcategoriesbtn' type='button'><span><span>Select Categories</span></span></button><p class='note' style='float: left; width: 84%; margin-left: 210px;'><span>Select categories to display popup on specific categories.</span></p><div>";
|
44 |
$html .= "<input type='hidden' name='".$element->getName()."' id='".$element->getId()."' value='".$element->getValue()."'/>";
|
45 |
$html .= "<style type='text/css'>.dialog {background: none repeat scroll 0 0 #FFFFFF;padding-bottom: 25px;border: 1px solid #555555;position: absolute;z-index: 10000 !important;}.magento_title {font: bold 12px/24px Arial,Helvetica,sans-serif;}.magento_nw {height: 8px;}.magento_n {height: 8px;}.magento_ne {height: 8px;}.table_window{width:100%;}</style>";
|
46 |
$html .= $javaScript;
|
app/code/community/Safal/Catalogpreview/Block/Catalogpreview.php
CHANGED
@@ -3,6 +3,12 @@ class Safal_Catalogpreview_Block_Catalogpreview extends Mage_Core_Block_Template
|
|
3 |
{
|
4 |
public function canShowPreview()
|
5 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
if($this->getRequest()->getControllerName() == "category" && $this->getRequest()->getModuleName() == "catalog"){
|
7 |
$currentcategory = Mage::registry('current_category');
|
8 |
$categories = array_filter(array_unique(explode(",",$this->helper('catalogpreview')->getConfig('catalogpreview/general/selectcategory'))));
|
3 |
{
|
4 |
public function canShowPreview()
|
5 |
{
|
6 |
+
if(($this->getRequest()->getControllerName() == "category" || $this->getRequest()->getModuleName() == "catalogsearch") && !Mage::helper("catalogpreview")->isEnable()) return false;
|
7 |
+
|
8 |
+
if($this->getRequest()->getModuleName() == "catalog" && !Mage::helper("catalogpreview")->isEnabledOnUpsell()) return false;
|
9 |
+
|
10 |
+
if($this->getRequest()->getModuleName() == "checkout" && !Mage::helper("catalogpreview")->isEnabledOnCrosssell()) return false;
|
11 |
+
|
12 |
if($this->getRequest()->getControllerName() == "category" && $this->getRequest()->getModuleName() == "catalog"){
|
13 |
$currentcategory = Mage::registry('current_category');
|
14 |
$categories = array_filter(array_unique(explode(",",$this->helper('catalogpreview')->getConfig('catalogpreview/general/selectcategory'))));
|
app/code/community/Safal/Catalogpreview/Helper/Data.php
CHANGED
@@ -13,6 +13,14 @@ class Safal_Catalogpreview_Helper_Data extends Mage_Core_Helper_Abstract
|
|
13 |
{
|
14 |
return $this->getConfig("catalogpreview/general/enabled");
|
15 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
public function getStyle()
|
17 |
{
|
18 |
$configs = $this->getConfig("catalogpreview/style");
|
@@ -43,10 +51,17 @@ class Safal_Catalogpreview_Helper_Data extends Mage_Core_Helper_Abstract
|
|
43 |
}
|
44 |
public function getProductRel(Mage_Catalog_Model_Product $_product)
|
45 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
if(!$_product->getImage()){
|
47 |
$_product = Mage::getModel('catalog/product')->load($_product->getId());
|
48 |
}
|
49 |
-
if($_product
|
50 |
try{
|
51 |
$configs = $this->getConfig("catalogpreview/style");
|
52 |
return Mage::helper('catalog/image')->init($_product, $this->getConfig("catalogpreview/general/imagescope"))->resize($configs['previewwidth']);
|
@@ -56,6 +71,7 @@ class Safal_Catalogpreview_Helper_Data extends Mage_Core_Helper_Abstract
|
|
56 |
return;
|
57 |
}
|
58 |
}
|
|
|
59 |
}
|
60 |
public function getConfigJson()
|
61 |
{
|
13 |
{
|
14 |
return $this->getConfig("catalogpreview/general/enabled");
|
15 |
}
|
16 |
+
public function isEnabledOnUpsell()
|
17 |
+
{
|
18 |
+
return $this->getConfig("catalogpreview/general/enableforupsell");
|
19 |
+
}
|
20 |
+
public function isEnabledOnCrosssell()
|
21 |
+
{
|
22 |
+
return $this->getConfig("catalogpreview/general/enableforcrosssell");
|
23 |
+
}
|
24 |
public function getStyle()
|
25 |
{
|
26 |
$configs = $this->getConfig("catalogpreview/style");
|
51 |
}
|
52 |
public function getProductRel(Mage_Catalog_Model_Product $_product)
|
53 |
{
|
54 |
+
|
55 |
+
if((Mage::app()->getRequest()->getControllerName() == "category" || Mage::app()->getRequest()->getModuleName() == "catalogsearch") && !$this->isEnable()) return false;
|
56 |
+
|
57 |
+
if(Mage::app()->getRequest()->getModuleName() == "catalog" && !$this->isEnabledOnUpsell()) return false;
|
58 |
+
|
59 |
+
if(Mage::app()->getRequest()->getModuleName() == "checkout" && !$this->isEnabledOnCrosssell()) return false;
|
60 |
+
|
61 |
if(!$_product->getImage()){
|
62 |
$_product = Mage::getModel('catalog/product')->load($_product->getId());
|
63 |
}
|
64 |
+
if($_product){
|
65 |
try{
|
66 |
$configs = $this->getConfig("catalogpreview/style");
|
67 |
return Mage::helper('catalog/image')->init($_product, $this->getConfig("catalogpreview/general/imagescope"))->resize($configs['previewwidth']);
|
71 |
return;
|
72 |
}
|
73 |
}
|
74 |
+
return null;
|
75 |
}
|
76 |
public function getConfigJson()
|
77 |
{
|
app/code/community/Safal/Catalogpreview/etc/config.xml
CHANGED
@@ -55,7 +55,7 @@
|
|
55 |
<catalogpreview>
|
56 |
<general>
|
57 |
<enabled>0</enabled>
|
58 |
-
<selectcategory>
|
59 |
<enableforupsell>0</enableforupsell>
|
60 |
<enableforcrosssell>0</enableforcrosssell>
|
61 |
<includejquery>0</includejquery>
|
@@ -74,7 +74,7 @@
|
|
74 |
<previewpadding>10</previewpadding>
|
75 |
<previewwidth>500</previewwidth>
|
76 |
<previewzindex>10</previewzindex>
|
77 |
-
<animation
|
78 |
</style>
|
79 |
</catalogpreview>
|
80 |
</default>
|
55 |
<catalogpreview>
|
56 |
<general>
|
57 |
<enabled>0</enabled>
|
58 |
+
<selectcategory>0</selectcategory>
|
59 |
<enableforupsell>0</enableforupsell>
|
60 |
<enableforcrosssell>0</enableforcrosssell>
|
61 |
<includejquery>0</includejquery>
|
74 |
<previewpadding>10</previewpadding>
|
75 |
<previewwidth>500</previewwidth>
|
76 |
<previewzindex>10</previewzindex>
|
77 |
+
<animation>default/loader.gif</animation>
|
78 |
</style>
|
79 |
</catalogpreview>
|
80 |
</default>
|
app/code/community/Safal/Catalogpreview/etc/system.xml
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
</safal>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
-
<catalogpreview>
|
11 |
<label>Catalog Preview</label>
|
12 |
<tab>safal</tab>
|
13 |
<frontend_type>text</frontend_type>
|
@@ -24,27 +24,27 @@
|
|
24 |
<show_in_website>1</show_in_website>
|
25 |
<show_in_store>1</show_in_store>
|
26 |
<fields>
|
27 |
-
<
|
28 |
-
<label>Enable Catalog Preview for product listing</label>
|
29 |
-
<frontend_type>select</frontend_type>
|
30 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
-
<sort_order>610</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 |
-
<comment>Display product preview on product list page.</comment>
|
36 |
-
</enabled>
|
37 |
-
<selectcategory>
|
38 |
<label>Select Category</label>
|
39 |
<frontend_type>text</frontend_type>
|
40 |
<frontend_model>catalogpreview/adminhtml_system_config_form_fieldset_catalogpreview_categories</frontend_model>
|
41 |
-
<sort_order>
|
42 |
<show_in_default>1</show_in_default>
|
43 |
<show_in_website>1</show_in_website>
|
44 |
<show_in_store>1</show_in_store>
|
45 |
<comment>Display product preview on product list page.</comment>
|
46 |
</selectcategory>
|
47 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
<label>Enable Catalog Preview for Upsell Product</label>
|
49 |
<frontend_type>select</frontend_type>
|
50 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -54,7 +54,7 @@
|
|
54 |
<show_in_store>1</show_in_store>
|
55 |
<comment>Display product preview on Upsell product list section on product detail page.</comment>
|
56 |
</enableforupsell>
|
57 |
-
<enableforcrosssell>
|
58 |
<label>Enable Catalog Preview for Crosssell Product</label>
|
59 |
<frontend_type>select</frontend_type>
|
60 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -64,7 +64,7 @@
|
|
64 |
<show_in_store>1</show_in_store>
|
65 |
<comment>Display product preview on Crosssell product list section on product detail page.</comment>
|
66 |
</enableforcrosssell>
|
67 |
-
<imagescope>
|
68 |
<label>Image Type to display</label>
|
69 |
<frontend_type>select</frontend_type>
|
70 |
<source_model>catalogpreview/adminhtml_system_config_source_imagescope</source_model>
|
@@ -76,7 +76,7 @@
|
|
76 |
</imagescope>
|
77 |
</fields>
|
78 |
</general>
|
79 |
-
<style>
|
80 |
<label>Preview Style</label>
|
81 |
<frontend_type>text</frontend_type>
|
82 |
<sort_order>600</sort_order>
|
@@ -84,7 +84,7 @@
|
|
84 |
<show_in_website>1</show_in_website>
|
85 |
<show_in_store>1</show_in_store>
|
86 |
<fields>
|
87 |
-
<backgroundcolor>
|
88 |
<label>Preview Image Background Color</label>
|
89 |
<frontend_type>text</frontend_type>
|
90 |
<sort_order>10</sort_order>
|
@@ -93,7 +93,7 @@
|
|
93 |
<show_in_store>1</show_in_store>
|
94 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
95 |
</backgroundcolor>
|
96 |
-
<borderwidth>
|
97 |
<label>Preview Image Border Width</label>
|
98 |
<frontend_type>text</frontend_type>
|
99 |
<sort_order>20</sort_order>
|
@@ -102,7 +102,7 @@
|
|
102 |
<show_in_store>1</show_in_store>
|
103 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
104 |
</borderwidth>
|
105 |
-
<bordercolor>
|
106 |
<label>Preview Image Border Color</label>
|
107 |
<frontend_type>text</frontend_type>
|
108 |
<sort_order>30</sort_order>
|
@@ -111,7 +111,7 @@
|
|
111 |
<show_in_store>1</show_in_store>
|
112 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
113 |
</bordercolor>
|
114 |
-
<title>
|
115 |
<label>Show Title [Product Title]</label>
|
116 |
<frontend_type>select</frontend_type>
|
117 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -121,7 +121,7 @@
|
|
121 |
<show_in_store>1</show_in_store>
|
122 |
<comment>Show product name as product title.</comment>
|
123 |
</title>
|
124 |
-
<titlefontsize>
|
125 |
<label>Preview Image Title Size</label>
|
126 |
<frontend_type>text</frontend_type>
|
127 |
<sort_order>50</sort_order>
|
@@ -130,7 +130,7 @@
|
|
130 |
<show_in_store>1</show_in_store>
|
131 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
132 |
</titlefontsize>
|
133 |
-
<titlebold>
|
134 |
<label>Bold Preview Image Title</label>
|
135 |
<frontend_type>select</frontend_type>
|
136 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -139,7 +139,7 @@
|
|
139 |
<show_in_website>1</show_in_website>
|
140 |
<show_in_store>1</show_in_store>
|
141 |
</titlebold>
|
142 |
-
<titlecolor>
|
143 |
<label>Preview Image Title Color</label>
|
144 |
<frontend_type>text</frontend_type>
|
145 |
<sort_order>60</sort_order>
|
@@ -148,7 +148,7 @@
|
|
148 |
<show_in_store>1</show_in_store>
|
149 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
150 |
</titlecolor>
|
151 |
-
<titleposition>
|
152 |
<label>Preview Image Title Position</label>
|
153 |
<frontend_type>select</frontend_type>
|
154 |
<source_model>catalogpreview/adminhtml_system_config_source_position</source_model>
|
@@ -157,7 +157,7 @@
|
|
157 |
<show_in_website>1</show_in_website>
|
158 |
<show_in_store>1</show_in_store>
|
159 |
</titleposition>
|
160 |
-
<titlealign>
|
161 |
<label>Preview Image Title Alignment</label>
|
162 |
<frontend_type>select</frontend_type>
|
163 |
<source_model>catalogpreview/adminhtml_system_config_source_alignment</source_model>
|
@@ -166,7 +166,7 @@
|
|
166 |
<show_in_website>1</show_in_website>
|
167 |
<show_in_store>1</show_in_store>
|
168 |
</titlealign>
|
169 |
-
<previewpadding>
|
170 |
<label>Preview Image Padding</label>
|
171 |
<frontend_type>text</frontend_type>
|
172 |
<sort_order>80</sort_order>
|
@@ -175,7 +175,7 @@
|
|
175 |
<show_in_store>1</show_in_store>
|
176 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
177 |
</previewpadding>
|
178 |
-
<previewwidth>
|
179 |
<label>Preview Image Width</label>
|
180 |
<frontend_type>text</frontend_type>
|
181 |
<sort_order>90</sort_order>
|
@@ -184,7 +184,7 @@
|
|
184 |
<show_in_store>1</show_in_store>
|
185 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
186 |
</previewwidth>
|
187 |
-
<previewzindex>
|
188 |
<label>Preview Image Z-Index</label>
|
189 |
<frontend_type>text</frontend_type>
|
190 |
<sort_order>100</sort_order>
|
@@ -193,8 +193,9 @@
|
|
193 |
<show_in_store>1</show_in_store>
|
194 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
195 |
</previewzindex>
|
196 |
-
<animation>
|
197 |
<label>Loading Animation</label>
|
|
|
198 |
<frontend_type>image</frontend_type>
|
199 |
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
200 |
<upload_dir config="system/filesystem/media" scope_info="1">swcp</upload_dir>
|
@@ -203,7 +204,6 @@
|
|
203 |
<show_in_default>1</show_in_default>
|
204 |
<show_in_website>1</show_in_website>
|
205 |
<show_in_store>1</show_in_store>
|
206 |
-
<comment>Allowed file types: jpeg, gif, png.</comment>
|
207 |
</animation>
|
208 |
</fields>
|
209 |
</style>
|
7 |
</safal>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
+
<catalogpreview translate="label" module="catalogpreview">
|
11 |
<label>Catalog Preview</label>
|
12 |
<tab>safal</tab>
|
13 |
<frontend_type>text</frontend_type>
|
24 |
<show_in_website>1</show_in_website>
|
25 |
<show_in_store>1</show_in_store>
|
26 |
<fields>
|
27 |
+
<selectcategory translate="label comment">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<label>Select Category</label>
|
29 |
<frontend_type>text</frontend_type>
|
30 |
<frontend_model>catalogpreview/adminhtml_system_config_form_fieldset_catalogpreview_categories</frontend_model>
|
31 |
+
<sort_order>600</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 |
<comment>Display product preview on product list page.</comment>
|
36 |
</selectcategory>
|
37 |
+
<enabled translate="label comment">
|
38 |
+
<label>Enable Catalog Preview for product listing</label>
|
39 |
+
<frontend_type>select</frontend_type>
|
40 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
41 |
+
<sort_order>605</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
<comment>Display product preview on product list page.</comment>
|
46 |
+
</enabled>
|
47 |
+
<enableforupsell translate="label comment">
|
48 |
<label>Enable Catalog Preview for Upsell Product</label>
|
49 |
<frontend_type>select</frontend_type>
|
50 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
<comment>Display product preview on Upsell product list section on product detail page.</comment>
|
56 |
</enableforupsell>
|
57 |
+
<enableforcrosssell translate="label comment">
|
58 |
<label>Enable Catalog Preview for Crosssell Product</label>
|
59 |
<frontend_type>select</frontend_type>
|
60 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
64 |
<show_in_store>1</show_in_store>
|
65 |
<comment>Display product preview on Crosssell product list section on product detail page.</comment>
|
66 |
</enableforcrosssell>
|
67 |
+
<imagescope translate="label comment">
|
68 |
<label>Image Type to display</label>
|
69 |
<frontend_type>select</frontend_type>
|
70 |
<source_model>catalogpreview/adminhtml_system_config_source_imagescope</source_model>
|
76 |
</imagescope>
|
77 |
</fields>
|
78 |
</general>
|
79 |
+
<style translate="label">
|
80 |
<label>Preview Style</label>
|
81 |
<frontend_type>text</frontend_type>
|
82 |
<sort_order>600</sort_order>
|
84 |
<show_in_website>1</show_in_website>
|
85 |
<show_in_store>1</show_in_store>
|
86 |
<fields>
|
87 |
+
<backgroundcolor translate="label comment">
|
88 |
<label>Preview Image Background Color</label>
|
89 |
<frontend_type>text</frontend_type>
|
90 |
<sort_order>10</sort_order>
|
93 |
<show_in_store>1</show_in_store>
|
94 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
95 |
</backgroundcolor>
|
96 |
+
<borderwidth translate="label comment">
|
97 |
<label>Preview Image Border Width</label>
|
98 |
<frontend_type>text</frontend_type>
|
99 |
<sort_order>20</sort_order>
|
102 |
<show_in_store>1</show_in_store>
|
103 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
104 |
</borderwidth>
|
105 |
+
<bordercolor translate="label comment">
|
106 |
<label>Preview Image Border Color</label>
|
107 |
<frontend_type>text</frontend_type>
|
108 |
<sort_order>30</sort_order>
|
111 |
<show_in_store>1</show_in_store>
|
112 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
113 |
</bordercolor>
|
114 |
+
<title translate="label comment">
|
115 |
<label>Show Title [Product Title]</label>
|
116 |
<frontend_type>select</frontend_type>
|
117 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
121 |
<show_in_store>1</show_in_store>
|
122 |
<comment>Show product name as product title.</comment>
|
123 |
</title>
|
124 |
+
<titlefontsize translate="label comment">
|
125 |
<label>Preview Image Title Size</label>
|
126 |
<frontend_type>text</frontend_type>
|
127 |
<sort_order>50</sort_order>
|
130 |
<show_in_store>1</show_in_store>
|
131 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
132 |
</titlefontsize>
|
133 |
+
<titlebold translate="label">
|
134 |
<label>Bold Preview Image Title</label>
|
135 |
<frontend_type>select</frontend_type>
|
136 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
139 |
<show_in_website>1</show_in_website>
|
140 |
<show_in_store>1</show_in_store>
|
141 |
</titlebold>
|
142 |
+
<titlecolor translate="label comment">
|
143 |
<label>Preview Image Title Color</label>
|
144 |
<frontend_type>text</frontend_type>
|
145 |
<sort_order>60</sort_order>
|
148 |
<show_in_store>1</show_in_store>
|
149 |
<comment>Use append [#] to colorcode or use color name.</comment>
|
150 |
</titlecolor>
|
151 |
+
<titleposition translate="label">
|
152 |
<label>Preview Image Title Position</label>
|
153 |
<frontend_type>select</frontend_type>
|
154 |
<source_model>catalogpreview/adminhtml_system_config_source_position</source_model>
|
157 |
<show_in_website>1</show_in_website>
|
158 |
<show_in_store>1</show_in_store>
|
159 |
</titleposition>
|
160 |
+
<titlealign translate="label">
|
161 |
<label>Preview Image Title Alignment</label>
|
162 |
<frontend_type>select</frontend_type>
|
163 |
<source_model>catalogpreview/adminhtml_system_config_source_alignment</source_model>
|
166 |
<show_in_website>1</show_in_website>
|
167 |
<show_in_store>1</show_in_store>
|
168 |
</titlealign>
|
169 |
+
<previewpadding translate="label comment">
|
170 |
<label>Preview Image Padding</label>
|
171 |
<frontend_type>text</frontend_type>
|
172 |
<sort_order>80</sort_order>
|
175 |
<show_in_store>1</show_in_store>
|
176 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
177 |
</previewpadding>
|
178 |
+
<previewwidth translate="label comment">
|
179 |
<label>Preview Image Width</label>
|
180 |
<frontend_type>text</frontend_type>
|
181 |
<sort_order>90</sort_order>
|
184 |
<show_in_store>1</show_in_store>
|
185 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
186 |
</previewwidth>
|
187 |
+
<previewzindex translate="label comment">
|
188 |
<label>Preview Image Z-Index</label>
|
189 |
<frontend_type>text</frontend_type>
|
190 |
<sort_order>100</sort_order>
|
193 |
<show_in_store>1</show_in_store>
|
194 |
<comment>Integer value in px. Do not prepend [px].</comment>
|
195 |
</previewzindex>
|
196 |
+
<animation translate="label comment">
|
197 |
<label>Loading Animation</label>
|
198 |
+
<comment>Allowed file types: jpeg, gif, png.</comment>
|
199 |
<frontend_type>image</frontend_type>
|
200 |
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
201 |
<upload_dir config="system/filesystem/media" scope_info="1">swcp</upload_dir>
|
204 |
<show_in_default>1</show_in_default>
|
205 |
<show_in_website>1</show_in_website>
|
206 |
<show_in_store>1</show_in_store>
|
|
|
207 |
</animation>
|
208 |
</fields>
|
209 |
</style>
|
app/design/frontend/default/default/layout/catalogpreview.xml
CHANGED
@@ -30,6 +30,21 @@
|
|
30 |
</action>
|
31 |
</reference>
|
32 |
</catalog_category_layered>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<catalog_product_view>
|
34 |
<reference name="head">
|
35 |
<action method="addJs" ifconfig="catalogpreview/general/enableforupsell">
|
30 |
</action>
|
31 |
</reference>
|
32 |
</catalog_category_layered>
|
33 |
+
<catalogsearch_result_index>
|
34 |
+
<reference name="head">
|
35 |
+
<action method="addJs">
|
36 |
+
<script>swcatalogpreview/preview.js</script>
|
37 |
+
</action>
|
38 |
+
</reference>
|
39 |
+
<reference name="after_body_start">
|
40 |
+
<block type="catalogpreview/catalogpreview" name="previewstyle" template="catalogpreview/style.phtml"/>
|
41 |
+
</reference>
|
42 |
+
<reference name="search_result_list">
|
43 |
+
<action method="setTemplate" ifconfig="catalogpreview/general/enabled">
|
44 |
+
<template>catalogpreview/catalog/product/list.phtml</template>
|
45 |
+
</action>
|
46 |
+
</reference>
|
47 |
+
</catalogsearch_result_index>
|
48 |
<catalog_product_view>
|
49 |
<reference name="head">
|
50 |
<action method="addJs" ifconfig="catalogpreview/general/enableforupsell">
|
app/design/frontend/rwd/default/layout/catalogpreview.xml
CHANGED
@@ -30,6 +30,21 @@
|
|
30 |
</action>
|
31 |
</reference>
|
32 |
</catalog_category_layered>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<catalog_product_view>
|
34 |
<reference name="head">
|
35 |
<action method="addJs" ifconfig="catalogpreview/general/enableforupsell">
|
30 |
</action>
|
31 |
</reference>
|
32 |
</catalog_category_layered>
|
33 |
+
<catalogsearch_result_index>
|
34 |
+
<reference name="head">
|
35 |
+
<action method="addJs">
|
36 |
+
<script>swcatalogpreview/preview.js</script>
|
37 |
+
</action>
|
38 |
+
</reference>
|
39 |
+
<reference name="after_body_start">
|
40 |
+
<block type="catalogpreview/catalogpreview" name="previewstyle" template="catalogpreview/style.phtml"/>
|
41 |
+
</reference>
|
42 |
+
<reference name="search_result_list">
|
43 |
+
<action method="setTemplate" ifconfig="catalogpreview/general/enabled">
|
44 |
+
<template>catalogpreview/catalog/product/list.phtml</template>
|
45 |
+
</action>
|
46 |
+
</reference>
|
47 |
+
</catalogsearch_result_index>
|
48 |
<catalog_product_view>
|
49 |
<reference name="head">
|
50 |
<action method="addJs" ifconfig="catalogpreview/general/enableforupsell">
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Safal_Catalogpreview</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
@@ -24,11 +24,11 @@ It's fully customizable from admin.</summary>
|
|
24 |
<p>9. Use Prototype lib instead of jQuery to avoid javascript conflicts and errors.</p>
|
25 |

|
26 |
<strong>Support: <a href="http://www.safalweb.com/contact.html">http://www.safalweb.com/contact.html</a></strong></description>
|
27 |
-
<notes>Fix issues on
|
28 |
<authors><author><name>SafalWeb</name><user>auto-converted</user><email>ankit.ank25@gmail.com</email></author></authors>
|
29 |
-
<date>2014-05-
|
30 |
-
<time>
|
31 |
-
<contents><target name="magecommunity"><dir name="Safal"><dir name="Catalogpreview"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Catalogpreview"><file name="Categories.php" hash="
|
32 |
<compatible/>
|
33 |
<dependencies/>
|
34 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Safal_Catalogpreview</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
24 |
<p>9. Use Prototype lib instead of jQuery to avoid javascript conflicts and errors.</p>
|
25 |

|
26 |
<strong>Support: <a href="http://www.safalweb.com/contact.html">http://www.safalweb.com/contact.html</a></strong></description>
|
27 |
+
<notes>Fix issues on catalogsearch result page.</notes>
|
28 |
<authors><author><name>SafalWeb</name><user>auto-converted</user><email>ankit.ank25@gmail.com</email></author></authors>
|
29 |
+
<date>2014-05-26</date>
|
30 |
+
<time>19:26:02</time>
|
31 |
+
<contents><target name="magecommunity"><dir name="Safal"><dir name="Catalogpreview"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Catalogpreview"><file name="Categories.php" hash="aac2220f5b9b1b59b70db057437f0b01"/></dir></dir></dir></dir></dir><file name="Categories.php" hash="842f28b5f5f69be96bc91d161d4b15d0"/></dir><file name="Catalogpreview.php" hash="65ef81b8de62c5551a63b14f14de3303"/></dir><dir name="Helper"><file name="Data.php" hash="2208dee40c9e6926ea852872fa3f6414"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Alignment.php" hash="b133cde2e56815e6270d56fc29a029a5"/><file name="Imagescope.php" hash="5276b9384ed16d904cf9ccdcc3f0a014"/><file name="Position.php" hash="bc66a19a21030d55e3314f0a9aad12cd"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CatalogpreviewController.php" hash="534e2f363bc134ab9e5d8fcc50a7ebdb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="14dde62e014b85fe9a77620bcc11b505"/><file name="config.xml" hash="7e06367f1f45201e9cd42a0ddb6eafd4"/><file name="system.xml" hash="39a7f75b63b160bf1b32275742ab80ac"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="catalogpreview.xml" hash="c9fcc29e5d6084cc898cb8bb4bea2cda"/></dir><dir name="template"><dir name="catalogpreview"><dir name="catalog"><dir name="product"><dir name="list"><file name="upsell.phtml" hash="8eb66ac0f99c203bf7aa7ac368ee8dec"/></dir><file name="list.phtml" hash="160f0a000dfe43a00abf007c6e2ff29a"/></dir></dir><dir name="checkout"><dir name="cart"><file name="crosssell.phtml" hash="de74e5942f9ced6039bf0fb3095223db"/></dir></dir><file name="style.phtml" hash="c12abc92decce588afeed63597cb3fd8"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="catalogpreview.xml" hash="c9fcc29e5d6084cc898cb8bb4bea2cda"/></dir><dir name="template"><dir name="catalogpreview"><dir name="catalog"><dir name="product"><dir name="list"><file name="upsell.phtml" hash="4673c9967ef2f7cd1970ee45c53761dd"/></dir><file name="list.phtml" hash="e5c25a931dccfdcb3a449a874c858dfd"/></dir></dir><dir name="checkout"><dir name="cart"><file name="crosssell.phtml" hash="706598580a7bb92b9eb36fc29d54050b"/></dir></dir><file name="style.phtml" hash="c12abc92decce588afeed63597cb3fd8"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="catalogpreview.xml" hash="cfdde1a60db12387094aad8b0f68d0d1"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="swcatalogpreview"><file name="preview.js" hash="b365a50ca46ac9b7fa87d4ab87862047"/></dir></dir></target><target name="magemedia"><dir name="swcp"><dir name="default"><file name="loader.gif" hash="dceb764a37e08003943a1a2210333a8f"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="safalweb"><dir name="all"><dir name="images"><file name="ok.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/></dir></dir></dir><dir name="lib"><dir name="prototype"><dir name="windows"><dir name="themes"><dir name="safal"><file name="btn_bg.gif" hash="37c51a4d48a92da9648dcd3ca011039f"/><file name="content_bg.gif" hash="21278ea0da2d4256f4ced96b6080ba2e"/><file name="top_bg.gif" hash="26f28090de87d64f9b01bf624f89bfe2"/><file name="window_close.png" hash="3af14f053f360bf31f8ba2df73ec7f1e"/></dir><file name="safal.css" hash="7539a58d28ecac8cc10c80f56991dc30"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Safal_Catalogpreview.xml" hash="49aec5229090faa3b4bb6e724c4bc43d"/></dir></target></contents>
|
32 |
<compatible/>
|
33 |
<dependencies/>
|
34 |
</package>
|