Version Notes
This extension is developed on magento version 1.4.2
Download this release
Release Info
Developer | Magento Core Team |
Extension | Xogenics_StockStatusImages |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- app/code/community/Xogenics/StockStatusImages/Block/Adminhtml/Fieldset/System/Logo/Global.php +83 -0
- app/code/community/Xogenics/StockStatusImages/Helper/Data.php +13 -0
- app/code/community/Xogenics/StockStatusImages/etc/config.xml +77 -0
- app/code/community/Xogenics/StockStatusImages/etc/system.xml +82 -0
- app/design/adminhtml/default/default/template/stockstatusimages/global.phtml +38 -0
- app/design/frontend/base/default/layout/stockstatusimages.xml +49 -0
- app/design/frontend/base/default/template/stockstatusimages/bundle.phtml +69 -0
- app/design/frontend/base/default/template/stockstatusimages/default.phtml +58 -0
- app/design/frontend/base/default/template/stockstatusimages/grouped.phtml +123 -0
- app/design/frontend/base/default/template/stockstatusimages/list.phtml +189 -0
- app/design/frontend/base/default/template/stockstatusimages/type.phtml +66 -0
- app/etc/modules/Xogenics_StockStatusImages.xml +9 -0
- app/locale/en_US/Xogenics_StockStatusImages.csv +11 -0
- app/locale/nl_NL/Xogenics_StockStatusImages.csv +11 -0
- app/locale/sr_RS/Xogenics_StockStatusImages.csv +11 -0
- package.xml +18 -0
- skin/adminhtml/default/default/images/xogenics/xogenics_logo_full_72ppi.png +0 -0
- skin/frontend/default/default/css/stockstatusimages.css +2 -0
app/code/community/Xogenics/StockStatusImages/Block/Adminhtml/Fieldset/System/Logo/Global.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
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://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Xogenics
|
22 |
+
* @package Xogenics_stockstatusimages
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics IT
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Fieldset renderer for stockstatusimages text and logo settings
|
29 |
+
* @author Miroslav Pavkovic
|
30 |
+
*/
|
31 |
+
class Xogenics_Stockstatusimages_Block_Adminhtml_Fieldset_System_Logo_Global
|
32 |
+
extends Mage_Adminhtml_Block_Abstract
|
33 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
34 |
+
{
|
35 |
+
/**
|
36 |
+
* Associative array of elements
|
37 |
+
*
|
38 |
+
* @var array
|
39 |
+
*/
|
40 |
+
protected $_elements = array();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Custom template
|
44 |
+
*
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
protected $_template = 'stockstatusimages/global.phtml';
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Getter for element label
|
51 |
+
*
|
52 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function getElementLabel(Varien_Data_Form_Element_Abstract $element)
|
56 |
+
{
|
57 |
+
return $element->getLabel();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Render fieldset html
|
62 |
+
*
|
63 |
+
* @param Varien_Data_Form_Element_Abstract $fieldset
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function render(Varien_Data_Form_Element_Abstract $fieldset)
|
67 |
+
{
|
68 |
+
foreach ($fieldset->getSortedElements() as $element) {
|
69 |
+
$htmlId = $element->getHtmlId();
|
70 |
+
$this->_elements[$htmlId] = $element;
|
71 |
+
}
|
72 |
+
$originalData = $fieldset->getOriginalData();
|
73 |
+
$this->addData(array(
|
74 |
+
'fieldset_label' => $fieldset->getLegend(),
|
75 |
+
'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '',
|
76 |
+
));
|
77 |
+
return $this->toHtml();
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
}
|
app/code/community/Xogenics/StockStatusImages/Helper/Data.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Magento Xogenics - hide discount and shipping estimate on shopping cart page
|
4 |
+
*
|
5 |
+
* @category Xogenics
|
6 |
+
* @package Xogenics_StockStatusImages
|
7 |
+
* @copyright Copyright (c) 2011 Xogenics.IT
|
8 |
+
* @author Miroslav Pavkovic
|
9 |
+
*/
|
10 |
+
class Xogenics_StockStatusImages_Helper_Data extends Mage_Core_Helper_Abstract
|
11 |
+
{
|
12 |
+
|
13 |
+
}
|
app/code/community/Xogenics/StockStatusImages/etc/config.xml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Xogenics_StockStatusImages>
|
5 |
+
<version>0.0.1</version>
|
6 |
+
</Xogenics_StockStatusImages>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<stockstatusimages>
|
11 |
+
<class>Xogenics_StockStatusImages_Helper</class>
|
12 |
+
</stockstatusimages>
|
13 |
+
</helpers>
|
14 |
+
<resources>
|
15 |
+
<stockstatusimages_setup>
|
16 |
+
<setup>
|
17 |
+
<module>Xogenics_StockStatusImages</module>
|
18 |
+
</setup>
|
19 |
+
<connection>
|
20 |
+
<use>core_setup</use>
|
21 |
+
</connection>
|
22 |
+
</stockstatusimages_setup>
|
23 |
+
<config_write>
|
24 |
+
<connection>
|
25 |
+
<use>core_write</use>
|
26 |
+
</connection>
|
27 |
+
</config_write>
|
28 |
+
<config_read>
|
29 |
+
<connection>
|
30 |
+
<use>core_read</use>
|
31 |
+
</connection>
|
32 |
+
</config_read>
|
33 |
+
</resources>
|
34 |
+
</global>
|
35 |
+
<frontend>
|
36 |
+
<layout>
|
37 |
+
<updates>
|
38 |
+
<stockstatusimages>
|
39 |
+
<file>stockstatusimages.xml</file>
|
40 |
+
</stockstatusimages>
|
41 |
+
</updates>
|
42 |
+
</layout>
|
43 |
+
</frontend>
|
44 |
+
<adminhtml>
|
45 |
+
<translate>
|
46 |
+
<modules>
|
47 |
+
<Xogenics_StockStatusImages>
|
48 |
+
<files>
|
49 |
+
<default>Xogenics_StockStatusImages.csv</default>
|
50 |
+
</files>
|
51 |
+
</Xogenics_StockStatusImages>
|
52 |
+
</modules>
|
53 |
+
</translate>
|
54 |
+
<acl>
|
55 |
+
<resources>
|
56 |
+
<all>
|
57 |
+
<title>Allow Everything</title>
|
58 |
+
</all>
|
59 |
+
<admin>
|
60 |
+
<children>
|
61 |
+
<system>
|
62 |
+
<children>
|
63 |
+
<config>
|
64 |
+
<children>
|
65 |
+
<stockstatusimages>
|
66 |
+
<title>Xogenics stock images</title>
|
67 |
+
</stockstatusimages>
|
68 |
+
</children>
|
69 |
+
</config>
|
70 |
+
</children>
|
71 |
+
</system>
|
72 |
+
</children>
|
73 |
+
</admin>
|
74 |
+
</resources>
|
75 |
+
</acl>
|
76 |
+
</adminhtml>
|
77 |
+
</config>
|
app/code/community/Xogenics/StockStatusImages/etc/system.xml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<Xogenics translate="label" module="stockstatusimages">
|
5 |
+
<label>Xogenics</label>
|
6 |
+
<sort_order>1000000</sort_order>
|
7 |
+
</Xogenics>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<stockstatusimages translate="label" module="stockstatusimages">
|
11 |
+
<label>Stock Status Images Configuration</label>
|
12 |
+
<tab>Xogenics</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<images translate="label">
|
20 |
+
<label>Stock Images Settings</label>
|
21 |
+
<sort_order>1</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>1</show_in_store>
|
25 |
+
<fields>
|
26 |
+
<imageinstock translate="label">
|
27 |
+
<label>In stock image</label>
|
28 |
+
<frontend_type>image</frontend_type>
|
29 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
30 |
+
<upload_dir config="system/filesystem/media" scope_info="1">instock</upload_dir>
|
31 |
+
<base_url type="media" scope_info="1">instock</base_url>
|
32 |
+
<sort_order>100</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>1</show_in_store>
|
36 |
+
<comment>Allowed file types: jpeg, gif, png.</comment>
|
37 |
+
</imageinstock>
|
38 |
+
<imageoutofstock translate="label">
|
39 |
+
<label>Out of stock image</label>
|
40 |
+
<frontend_type>image</frontend_type>
|
41 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
42 |
+
<upload_dir config="system/filesystem/media" scope_info="1">outofstock</upload_dir>
|
43 |
+
<base_url type="media" scope_info="1">outofstock</base_url>
|
44 |
+
<sort_order>200</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>1</show_in_store>
|
48 |
+
<comment>Allowed file types: jpeg, gif, png.</comment>
|
49 |
+
</imageoutofstock>
|
50 |
+
</fields>
|
51 |
+
</images>
|
52 |
+
<quantity translate="label comment">
|
53 |
+
<label>Quantity Field Settings</label>
|
54 |
+
<sort_order>2</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>1</show_in_website>
|
57 |
+
<show_in_store>1</show_in_store>
|
58 |
+
<fields>
|
59 |
+
<show_qty>
|
60 |
+
<label>Show Quantity Field In Product Listing</label>
|
61 |
+
<frontend_type>select</frontend_type>
|
62 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
63 |
+
<sort_order>20</sort_order>
|
64 |
+
<show_in_default>1</show_in_default>
|
65 |
+
<show_in_website>1</show_in_website>
|
66 |
+
<show_in_store>1</show_in_store>
|
67 |
+
<comment>Enable showing qty field on product listing page</comment>
|
68 |
+
</show_qty>
|
69 |
+
</fields>
|
70 |
+
</quantity>
|
71 |
+
<global translate="label">
|
72 |
+
<label>Thank you for choosing Xogenics!</label>
|
73 |
+
<frontend_type>text</frontend_type>
|
74 |
+
<frontend_model>Xogenics_StockStatusImages_Block_Adminhtml_Fieldset_System_Logo_Global</frontend_model>
|
75 |
+
<sort_order>3</sort_order>
|
76 |
+
<show_in_default>1</show_in_default>
|
77 |
+
<show_in_website>1</show_in_website>
|
78 |
+
</global>
|
79 |
+
</groups>
|
80 |
+
</stockstatusimages>
|
81 |
+
</sections>
|
82 |
+
</config>
|
app/design/adminhtml/default/default/template/stockstatusimages/global.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Xogenics_stockstatusimages_adminhtml_fieldset_system_logo_global
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<table style="width: 80%; margin-top:20px;" cellspacing="0">
|
33 |
+
<tbody>
|
34 |
+
<tr><td align="center"><?php echo $this->escapeHtml($this->getFieldsetLabel()) ?></td></tr>
|
35 |
+
<tr><td align="center"><a href="<?php echo $this->escapeHtml('http://www.xogenics.com') ?>" target="_blank"><img src="<?php echo $this->getSkinUrl('images/xogenics/xogenics_logo_full_72ppi.png')?>" alt="Xogenics" /></a></td></tr>
|
36 |
+
<tr><td align="center"><?php echo Mage::helper('stockstatusimages')->__('We value customer feedback! Please ')?><a href="<?php echo $this->escapeHtml('http://www.xogenics.com') ?>" target="_blank"><?php echo Mage::helper('stockstatusimages')->__('help us improve this extension')?></a></td></tr>
|
37 |
+
</tbody>
|
38 |
+
</table>
|
app/design/frontend/base/default/layout/stockstatusimages.xml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layoutUpdate>
|
3 |
+
<catalog_category_default translate="label">
|
4 |
+
<reference name="product_list">
|
5 |
+
<action method="setTemplate"><template>stockstatusimages/list.phtml</template></action>
|
6 |
+
</reference>
|
7 |
+
<reference name="head">
|
8 |
+
<action method="addItem" ifconfig="stockstatusimages/images/imageinstock"><type>skin_css</type><name>css/stockstatusimages.css</name></action>
|
9 |
+
</reference>
|
10 |
+
</catalog_category_default>
|
11 |
+
<catalog_category_layered>
|
12 |
+
<reference name="product_list">
|
13 |
+
<action method="setTemplate"><template>stockstatusimages/list.phtml</template></action>
|
14 |
+
</reference>
|
15 |
+
<reference name="head">
|
16 |
+
<action method="addItem" ifconfig="stockstatusimages/images/imageinstock"><type>skin_css</type><name>css/stockstatusimages.css</name></action>
|
17 |
+
</reference>
|
18 |
+
</catalog_category_layered>
|
19 |
+
<PRODUCT_TYPE_simple translate="label" module="catalog">
|
20 |
+
<reference name="product.info.simple">
|
21 |
+
<action method="setTemplate"><template>stockstatusimages/default.phtml</template></action>
|
22 |
+
</reference>
|
23 |
+
</PRODUCT_TYPE_simple>
|
24 |
+
<PRODUCT_TYPE_configurable translate="label" module="catalog">
|
25 |
+
<reference name="product.info.configurable">
|
26 |
+
<action method="setTemplate"><template>stockstatusimages/default.phtml</template></action>
|
27 |
+
</reference>
|
28 |
+
</PRODUCT_TYPE_configurable>
|
29 |
+
<PRODUCT_TYPE_grouped translate="label" module="catalog">
|
30 |
+
<reference name="product.info.grouped">
|
31 |
+
<action method="setTemplate"><template>stockstatusimages/grouped.phtml</template></action>
|
32 |
+
</reference>
|
33 |
+
</PRODUCT_TYPE_grouped>
|
34 |
+
<PRODUCT_TYPE_virtual translate="label" module="catalog">
|
35 |
+
<reference name="product.info.virtual">
|
36 |
+
<action method="setTemplate"><template>stockstatusimages/default.phtml</template></action>
|
37 |
+
</reference>
|
38 |
+
</PRODUCT_TYPE_virtual>
|
39 |
+
<PRODUCT_TYPE_bundle translate="label" module="bundle">
|
40 |
+
<reference name="product.info.bundle">
|
41 |
+
<action method="setTemplate"><template>stockstatusimages/bundle.phtml</template></action>
|
42 |
+
</reference>
|
43 |
+
</PRODUCT_TYPE_bundle>
|
44 |
+
<PRODUCT_TYPE_downloadable translate="label" module="downloadable">
|
45 |
+
<reference name="product.info.downloadable">
|
46 |
+
<action method="setTemplate"><template>stockstatusimages/type.phtml</template></action>
|
47 |
+
</reference>
|
48 |
+
</PRODUCT_TYPE_downloadable>
|
49 |
+
</layoutUpdate>
|
app/design/frontend/base/default/template/stockstatusimages/bundle.phtml
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics.IT
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<?php
|
29 |
+
$_stockImagesConfig = Mage::getStoreConfig('stockstatusimages/images');
|
30 |
+
$media_path = Mage::getBaseUrl('media');
|
31 |
+
$inStockImage = $_stockImagesConfig['imageinstock'];
|
32 |
+
$outOfStockImage = $_stockImagesConfig['imageoutofstock'];
|
33 |
+
?>
|
34 |
+
<?php $_product = $this->getProduct() ?>
|
35 |
+
|
36 |
+
<?php if($_product->isSaleable()): ?>
|
37 |
+
<script type="text/javascript">
|
38 |
+
//<![CDATA[
|
39 |
+
var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>);
|
40 |
+
//]]>
|
41 |
+
</script>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php if ($_product->isAvailable()): ?>
|
44 |
+
<p class="availability in-stock"><?php echo $this->helper('catalog')->__('Availability:') ?>
|
45 |
+
<span>
|
46 |
+
<?php if($inStockImage != ""):?>
|
47 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
48 |
+
<?php else: ?>
|
49 |
+
<?php echo $this->__('In stock') ?>
|
50 |
+
<?php endif; ?>
|
51 |
+
</span>
|
52 |
+
</p>
|
53 |
+
<?php else: ?>
|
54 |
+
<p class="availability out-of-stock"><?php echo $this->helper('catalog')->__('Availability:') ?>
|
55 |
+
<span>
|
56 |
+
<?php if($outOfStockImage != ""):?>
|
57 |
+
<div class="out-of-stock">
|
58 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
59 |
+
</div>
|
60 |
+
<?php else: ?>
|
61 |
+
<?php echo $this->__('Out of stock') ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
</span>
|
64 |
+
</p>
|
65 |
+
<?php endif; ?>
|
66 |
+
<div class="price-box-bundle">
|
67 |
+
<?php echo $this->getPriceHtml($_product) ?>
|
68 |
+
</div>
|
69 |
+
<?php echo $this->getChildHtml('bundle_prices') ?>
|
app/design/frontend/base/default/template/stockstatusimages/default.phtml
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
$_stockImagesConfig = Mage::getStoreConfig('stockstatusimages/images');
|
29 |
+
$media_path = Mage::getBaseUrl('media');
|
30 |
+
$inStockImage = $_stockImagesConfig['imageinstock'];
|
31 |
+
$outOfStockImage = $_stockImagesConfig['imageoutofstock'];
|
32 |
+
?>
|
33 |
+
<?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
|
34 |
+
<?php $_product = $this->getProduct() ?>
|
35 |
+
|
36 |
+
<?php if ($_product->isAvailable()): ?>
|
37 |
+
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span>
|
38 |
+
<?php if($inStockImage != ""):?>
|
39 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
40 |
+
<?php else: ?>
|
41 |
+
<?php echo $this->__('In stock') ?>
|
42 |
+
<?php endif; ?>
|
43 |
+
</span></p>
|
44 |
+
<?php else: ?>
|
45 |
+
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?>
|
46 |
+
<span>
|
47 |
+
<?php if($outOfStockImage != ""):?>
|
48 |
+
<div class="out-of-stock">
|
49 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
50 |
+
</div>
|
51 |
+
<?php else: ?>
|
52 |
+
<?php echo $this->__('Out of stock') ?>
|
53 |
+
<?php endif; ?>
|
54 |
+
</span>
|
55 |
+
</p>
|
56 |
+
<?php endif; ?>
|
57 |
+
<?php echo $this->getChildHtml('product_type_data_extra') ?>
|
58 |
+
<?php echo $this->getPriceHtml($_product) ?>
|
app/design/frontend/base/default/template/stockstatusimages/grouped.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Grouped product data template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Media
|
31 |
+
* @see Mage_Catalog_Block_Product_View_Type_Grouped
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_stockImagesConfig = Mage::getStoreConfig('stockstatusimages/images');
|
36 |
+
$media_path = Mage::getBaseUrl('media');
|
37 |
+
$inStockImage = $_stockImagesConfig['imageinstock'];
|
38 |
+
$outOfStockImage = $_stockImagesConfig['imageoutofstock'];
|
39 |
+
?>
|
40 |
+
<?php
|
41 |
+
$_product = $this->getProduct();
|
42 |
+
$_associatedProducts = $this->getAssociatedProducts();
|
43 |
+
$_hasAssociatedProducts = count($_associatedProducts) > 0;
|
44 |
+
?>
|
45 |
+
<?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
|
46 |
+
<p class="availability in-stock"><?php echo $this->__('Availability:') ?>
|
47 |
+
<span>
|
48 |
+
<?php if($inStockImage != ""):?>
|
49 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
50 |
+
<?php else: ?>
|
51 |
+
<?php echo $this->__('In stock') ?>
|
52 |
+
<?php endif; ?>
|
53 |
+
</span>
|
54 |
+
</p>
|
55 |
+
<?php else: ?>
|
56 |
+
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span>
|
57 |
+
<?php if($outOfStockImage != ""):?>
|
58 |
+
<div class="out-of-stock">
|
59 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
60 |
+
</div>
|
61 |
+
<?php else: ?>
|
62 |
+
<?php echo $this->__('Out of stock') ?>
|
63 |
+
<?php endif; ?> </span></p>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php echo $this->getChildHtml('product_type_data_extra') ?>
|
66 |
+
<table class="data-table grouped-items-table" id="super-product-table">
|
67 |
+
<col />
|
68 |
+
<col />
|
69 |
+
<col width="1" />
|
70 |
+
<thead>
|
71 |
+
<tr>
|
72 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
73 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
74 |
+
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
75 |
+
<?php endif; ?>
|
76 |
+
<?php if ($_product->isSaleable()): ?>
|
77 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
78 |
+
<?php endif; ?>
|
79 |
+
</tr>
|
80 |
+
</thead>
|
81 |
+
<tbody>
|
82 |
+
<?php if ($_hasAssociatedProducts): ?>
|
83 |
+
<?php foreach ($_associatedProducts as $_item): ?>
|
84 |
+
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
|
85 |
+
<tr>
|
86 |
+
<td><?php echo $this->htmlEscape($_item->getName()) ?></td>
|
87 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
88 |
+
<td class="a-right">
|
89 |
+
<?php if ($this->getCanShowProductPrice($_item)): ?>
|
90 |
+
<?php echo $this->getPriceHtml($_item, true) ?>
|
91 |
+
<?php echo $this->getTierPriceHtml($_item) ?>
|
92 |
+
<?php endif; ?>
|
93 |
+
</td>
|
94 |
+
<?php endif; ?>
|
95 |
+
<?php if ($_product->isSaleable()): ?>
|
96 |
+
<td class="a-center">
|
97 |
+
<?php if ($_item->isSaleable()) : ?>
|
98 |
+
<input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
99 |
+
<?php else: ?>
|
100 |
+
<p class="availability out-of-stock">
|
101 |
+
<span>
|
102 |
+
<?php if($outOfStockImage != ""):?>
|
103 |
+
<div class="out-of-stock">
|
104 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
105 |
+
</div>
|
106 |
+
<?php else: ?>
|
107 |
+
<?php echo $this->__('Out of stock') ?>
|
108 |
+
<?php endif; ?>
|
109 |
+
</span>
|
110 |
+
</p>
|
111 |
+
<?php endif; ?>
|
112 |
+
</td>
|
113 |
+
<?php endif; ?>
|
114 |
+
</tr>
|
115 |
+
<?php endforeach; ?>
|
116 |
+
<?php else: ?>
|
117 |
+
<tr>
|
118 |
+
<td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
|
119 |
+
</tr>
|
120 |
+
<?php endif; ?>
|
121 |
+
</tbody>
|
122 |
+
</table>
|
123 |
+
<script type="text/javascript">decorateTable('super-product-table')</script>
|
app/design/frontend/base/default/template/stockstatusimages/list.phtml
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Product list template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_stockImagesConfig = Mage::getStoreConfig('stockstatusimages/images');
|
36 |
+
$media_path = Mage::getBaseUrl('media');
|
37 |
+
$inStockImage = $_stockImagesConfig['imageinstock'];
|
38 |
+
$outOfStockImage = $_stockImagesConfig['imageoutofstock'];
|
39 |
+
$_stockQuantityConfig = Mage::getStoreConfig('stockstatusimages/quantity');
|
40 |
+
$_productCollection=$this->getLoadedProductCollection();
|
41 |
+
$_helper = $this->helper('catalog/output');
|
42 |
+
?>
|
43 |
+
<?php if(!$_productCollection->count()): ?>
|
44 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
45 |
+
<?php else: ?>
|
46 |
+
<div class="category-products">
|
47 |
+
<?php echo $this->getToolbarHtml() ?>
|
48 |
+
<?php // List mode ?>
|
49 |
+
<?php if($this->getMode()!='grid'): ?>
|
50 |
+
<?php $_iterator = 0; ?>
|
51 |
+
<ol class="products-list" id="products-list">
|
52 |
+
<?php foreach ($_productCollection as $_product): ?>
|
53 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
54 |
+
<?php // Product Image ?>
|
55 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
56 |
+
<?php // Product description ?>
|
57 |
+
<div class="product-shop">
|
58 |
+
<div class="f-fix">
|
59 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
60 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
61 |
+
<?php if($_product->getRatingSummary()): ?>
|
62 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
65 |
+
<?php if($_product->isSaleable()): ?>
|
66 |
+
<?php if($inStockImage != ""):?>
|
67 |
+
<div class="in-stock">
|
68 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
69 |
+
</div>
|
70 |
+
<?php endif; ?>
|
71 |
+
<?php if($_stockQuantityConfig["show_qty"]):?>
|
72 |
+
<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId(); ?>">
|
73 |
+
<div class="add-to-cart">
|
74 |
+
<span class="qty-box"><label for="qty"><?php echo $this->__('Qty') ?>:</label><input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" /></span>
|
75 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="productAddToCartForm_<?php echo $_product->getId(); ?>.submit()"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
76 |
+
</div>
|
77 |
+
</form>
|
78 |
+
<script type="text/javascript">
|
79 |
+
var productAddToCartForm_<?php echo $_product->getId(); ?> = new VarienForm('product_addtocart_form_<?php echo $_product->getId(); ?>');
|
80 |
+
productAddToCartForm_<?php echo $_product->getId(); ?>.submit = function(){
|
81 |
+
if (this.validator.validate()) {
|
82 |
+
this.form.submit();
|
83 |
+
}
|
84 |
+
}.bind(productAddToCartForm_<?php echo $_product->getId(); ?>);
|
85 |
+
</script>
|
86 |
+
<?php else: ?>
|
87 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
88 |
+
<?php endif; ?>
|
89 |
+
<?php else: ?>
|
90 |
+
<?php if($outOfStockImage != ""):?>
|
91 |
+
<div class="out-of-stock">
|
92 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
93 |
+
</div>
|
94 |
+
<?php else: ?>
|
95 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
96 |
+
<?php endif; ?>
|
97 |
+
<?php endif; ?>
|
98 |
+
<div class="desc std">
|
99 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
100 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
101 |
+
</div>
|
102 |
+
<ul class="add-to-links">
|
103 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
104 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
105 |
+
<?php endif; ?>
|
106 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
107 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
108 |
+
<?php endif; ?>
|
109 |
+
</ul>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</li>
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</ol>
|
115 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
116 |
+
|
117 |
+
<?php else: ?>
|
118 |
+
|
119 |
+
<?php // Grid Mode ?>
|
120 |
+
|
121 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
122 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
123 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
124 |
+
<?php if ($i++%$_columnCount==0): ?>
|
125 |
+
<ul class="products-grid">
|
126 |
+
<?php endif ?>
|
127 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
128 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
129 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
130 |
+
<?php if($_product->getRatingSummary()): ?>
|
131 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
134 |
+
<?php if($_product->isSaleable() && $inStockImage != ""):?>
|
135 |
+
<div class="in-stock">
|
136 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
137 |
+
</div>
|
138 |
+
<?php endif; ?>
|
139 |
+
<div class="actions">
|
140 |
+
<?php if($_product->isSaleable()): ?>
|
141 |
+
<?php if($_stockQuantityConfig["show_qty"]):?>
|
142 |
+
<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId(); ?>">
|
143 |
+
<div class="add-to-cart">
|
144 |
+
<span class="qty-box"><label for="qty"><?php echo $this->__('Qty') ?>:</label><input name="qty" type="text" class="input-text qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" /></span>
|
145 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="productAddToCartForm_<?php echo $_product->getId(); ?>.submit()"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
146 |
+
</div>
|
147 |
+
</form>
|
148 |
+
<script type="text/javascript">
|
149 |
+
var productAddToCartForm_<?php echo $_product->getId(); ?> = new VarienForm('product_addtocart_form_<?php echo $_product->getId(); ?>');
|
150 |
+
productAddToCartForm_<?php echo $_product->getId(); ?>.submit = function(){
|
151 |
+
if (this.validator.validate()) {
|
152 |
+
this.form.submit();
|
153 |
+
}
|
154 |
+
}.bind(productAddToCartForm_<?php echo $_product->getId(); ?>);
|
155 |
+
</script>
|
156 |
+
<?php else: ?>
|
157 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
158 |
+
<?php endif; ?>
|
159 |
+
<?php else: ?>
|
160 |
+
<?php if($outOfStockImage != ""):?>
|
161 |
+
<div class="out-of-stock">
|
162 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
163 |
+
</div>
|
164 |
+
<?php else: ?>
|
165 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
166 |
+
<?php endif; ?>
|
167 |
+
<?php endif; ?>
|
168 |
+
<ul class="add-to-links">
|
169 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
170 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
171 |
+
<?php endif; ?>
|
172 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
173 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
174 |
+
<?php endif; ?>
|
175 |
+
</ul>
|
176 |
+
</div>
|
177 |
+
</li>
|
178 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
179 |
+
</ul>
|
180 |
+
<?php endif ?>
|
181 |
+
<?php endforeach ?>
|
182 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
183 |
+
<?php endif; ?>
|
184 |
+
|
185 |
+
<div class="toolbar-bottom">
|
186 |
+
<?php echo $this->getToolbarHtml() ?>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/stockstatusimages/type.phtml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Xogenics
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Downloadable product type
|
29 |
+
*
|
30 |
+
* @see Mage_Downloadable_Block_Catalog_Product_View_Type
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php
|
34 |
+
$_stockImagesConfig = Mage::getStoreConfig('stockstatusimages/images');
|
35 |
+
$media_path = Mage::getBaseUrl('media');
|
36 |
+
$inStockImage = $_stockImagesConfig['imageinstock'];
|
37 |
+
$outOfStockImage = $_stockImagesConfig['imageoutofstock'];
|
38 |
+
?>
|
39 |
+
<?php $_product = $this->getProduct() ?>
|
40 |
+
|
41 |
+
<?php if($_product->isSaleable()): ?>
|
42 |
+
<p class="availability in-stock"><?php echo $this->__('Availability:') ?>
|
43 |
+
<span>
|
44 |
+
<?php if($inStockImage != ""):?>
|
45 |
+
<img src="<?php echo $media_path."instock/".$inStockImage ?>" alt="In stock" />
|
46 |
+
<?php else: ?>
|
47 |
+
<?php echo $this->__('In stock') ?>
|
48 |
+
<?php endif; ?>
|
49 |
+
</span>
|
50 |
+
</p>
|
51 |
+
<?php else: ?>
|
52 |
+
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?>
|
53 |
+
<span>
|
54 |
+
<?php if($outOfStockImage != ""):?>
|
55 |
+
<div class="out-of-stock">
|
56 |
+
<img src="<?php echo $media_path."outofstock/".$outOfStockImage ?>" alt="Out of stock" />
|
57 |
+
</div>
|
58 |
+
<?php else: ?>
|
59 |
+
<?php echo $this->__('Out of stock') ?>
|
60 |
+
<?php endif; ?>
|
61 |
+
</span>
|
62 |
+
</p>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php echo $this->getChildHtml('product_type_data_extra') ?>
|
65 |
+
<?php echo $this->getPriceHtml($_product) ?>
|
66 |
+
<?php echo $this->getChildHtml('samples') ?>
|
app/etc/modules/Xogenics_StockStatusImages.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Xogenics_StockStatusImages>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Xogenics_StockStatusImages>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/locale/en_US/Xogenics_StockStatusImages.csv
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Stock Images Settings","Stock Images Settings"
|
2 |
+
"In stock image","In stock image"
|
3 |
+
"Out of stock image","Out of stock image"
|
4 |
+
"Allowed file types: jpeg, gif, png.","Allowed file types: jpeg, gif, png."
|
5 |
+
"Quantity Field Settings","Quantity Field Settings"
|
6 |
+
"Show Quantity Field In Product Listing","Show Quantity Field In Product Listing"
|
7 |
+
"Stock Status Images Configuration","Stock Status Images Configuration"
|
8 |
+
"Enable showing qty field on product listing page","Enable showing qty field on product listing page"
|
9 |
+
"Thank you for choosing Xogenics!","Thank you for choosing Xogenics!"
|
10 |
+
"We value customer feedback! Please ","We value customer feedback! Please "
|
11 |
+
"help us improve this extension","help us improve this extension"
|
app/locale/nl_NL/Xogenics_StockStatusImages.csv
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Stock Images Settings","Voorraadstatus afbeeldingen"
|
2 |
+
"In stock image","In voorraad afbeelding"
|
3 |
+
"Out of stock image","Niet op voorraad afbeelding"
|
4 |
+
"Allowed file types: jpeg, gif, png.","Toegestane bestandstypes: jpeg, gif, png."
|
5 |
+
"Quantity Field Settings","Aantallen veld instellingen"
|
6 |
+
"Show Quantity Field In Product Listing","Toon bestelaantal veld in product lijst"
|
7 |
+
"Stock Status Images Configuration","Voorraadstatus afbeeldingen configuratie"
|
8 |
+
"Enable showing qty field on product listing page","Toon bestelaantal veld op lijstpaginas"
|
9 |
+
"Thank you for choosing Xogenics!","Bedankt voor het kiezen Xogenics!"
|
10 |
+
"We value customer feedback! Please ","Wij waarderen feedback van de klant! Alstublieft "
|
11 |
+
"help us improve this extension","helpen ons bij het verbeteren deze uitbreiding"
|
app/locale/sr_RS/Xogenics_StockStatusImages.csv
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Stock Images Settings","Podesavanja slike zaliha"
|
2 |
+
"In stock image","Na lageru slika"
|
3 |
+
"Out of stock image","Nema na lageru slika"
|
4 |
+
"Allowed file types: jpeg, gif, png.","Dozvoljeni tipovi fajlova: jpeg, gif, png."
|
5 |
+
"Quantity Field Settings","Podesavanja polja za kolicinu"
|
6 |
+
"Show Quantity Field In Product Listing","Prikazi polje za kolicinu u listi proizvoda"
|
7 |
+
"Stock Status Images Configuration","Stock Status Images Konfiguracija"
|
8 |
+
"Enable showing qty field on product listing page","Omoguci prikaz polja za kolicinu proizvoda na lista proizvoda strani"
|
9 |
+
"Thank you for choosing Xogenics!","Hvala sto ste izabrali Xogenics!"
|
10 |
+
"We value customer feedback! Please ","Mi cenimo misljenje nasih klijenata! Molimo vas "
|
11 |
+
"help us improve this extension","pomozite nam da popravimo ovaj proizvod"
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Xogenics_StockStatusImages</name>
|
4 |
+
<version>1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Images speak louder than a thousand words, right? So instead of displaying product availability with words, show it with a small image! Simply create the image you'd like to display for "in stock" and "out of stock" products and upload them. The best part is, this handy extension is totally free!</summary>
|
10 |
+
<description>Images speak louder than a thousand words, right? So instead of displaying product availability with words, show it with a small image! Simply create the image you'd like to display for "in stock" and "out of stock" products and upload them. Furthermore, we added an option that enables you to display quantity input boxes on your product pages. This enables customers to directly add a product in the desired quantity without having to go to the product page first. The best part is, this nifty extension is completely free!</description>
|
11 |
+
<notes>This extension is developed on magento version 1.4.2</notes>
|
12 |
+
<authors><author><name>Miroslav Pavkovic</name><user>auto-converted</user><email>ms.pavkovic@levi9.com</email></author></authors>
|
13 |
+
<date>2011-10-05</date>
|
14 |
+
<time>09:54:43</time>
|
15 |
+
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="xogenics"><file name="xogenics_logo_full_72ppi.png" hash="92fe62378d1e07b3fcf0afadcd72bc82"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="stockstatusimages.css" hash="06993aea1844ff386fe2222728fed1f2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="stockstatusimages"><file name="global.phtml" hash="872225d00ea8678d1dd314ed462ba84d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="stockstatusimages.xml" hash="dce569db14d938ab8636d940e34698c8"/></dir><dir name="template"><dir name="stockstatusimages"><file name="bundle.phtml" hash="780cc86cb0f7c4ecfc2f9a1559118729"/><file name="default.phtml" hash="11321b89bd726d8674358d7da0635738"/><file name="grouped.phtml" hash="4217ae3f2631fd11d8fb82405275d245"/><file name="list.phtml" hash="d29e1397af2739df1213a82b14dc6bcd"/><file name="type.phtml" hash="41e580878ae94ae148ae8134a8ee83fa"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Xogenics_StockStatusImages.csv" hash="e248e8af128bbaae7ea3ffcf62573129"/></dir><dir name="nl_NL"><file name="Xogenics_StockStatusImages.csv" hash="0c29a4d3b028ad37a978af718dba677c"/></dir><dir name="sr_RS"><file name="Xogenics_StockStatusImages.csv" hash="09624d618d9df2ce59ecf7ffe9524f9a"/></dir></target><target name="mageetc"><dir name="modules"><file name="Xogenics_StockStatusImages.xml " hash="f7bfc016c4cb8a4b418fe4304c27427c"/></dir></target><target name="magecommunity"><dir name="Xogenics"><dir name="StockStatusImages"><dir name="Block"><dir name="Adminhtml"><dir name="Fieldset"><dir name="System"><dir name="Logo"><file name="Global.php" hash="abd8127f5678c4a8e4924bf39a644af3"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="cb7d93db4470a771d8469064498cea96"/><file name="system.xml" hash="db7a202ddd2d22d1fd580a91f9b747ab"/></dir><dir name="Helper"><file name="Data.php" hash="92120e7d0eaa0de74d1d1a400e5b88fa"/></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|
skin/adminhtml/default/default/images/xogenics/xogenics_logo_full_72ppi.png
ADDED
Binary file
|
skin/frontend/default/default/css/stockstatusimages.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.in-stock, .availability-in-stock {padding-top:10px;color:#000000; font-weight:bold; text-align: left;}
|
2 |
+
.out-of-stock {padding-top:10px;color:#000000; font-weight:bold; text-align: left;}
|