Daffodil_Stock - Version 1.0.0.1

Version Notes

First Release

Download this release

Release Info

Developer Daffodil Software
Extension Daffodil_Stock
Version 1.0.0.1
Comparing to
See all releases


Version 1.0.0.1

app/code/local/Daffodil/Stock/Helper/Data.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ /*
4
+ * Stock Management Extension Developed by Daffodil S/w Ltd.
5
+ */
6
+ ?>
7
+ <?php
8
+ class Daffodil_Stock_Helper_Data extends Mage_Core_Helper_Abstract
9
+ {
10
+ }
11
+
app/code/local/Daffodil/Stock/etc/config.xml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Daffodil_Stock>
5
+ <version>0.1.0</version>
6
+ </Daffodil_Stock>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <stock>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Daffodil_Stock</module>
14
+ <frontName>stock</frontName>
15
+ </args>
16
+ </stock>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <stock>
21
+ <file>stock.xml</file>
22
+ </stock>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <stock>
29
+ <class>Daffodil_Stock_Helper</class>
30
+ </stock>
31
+ </helpers>
32
+ </global>
33
+ <adminhtml>
34
+ <acl>
35
+ <resources>
36
+ <admin>
37
+ <children>
38
+ <system>
39
+ <children>
40
+ <config>
41
+ <children>
42
+ <stock>
43
+ <title>Stock Management</title>
44
+ </stock>
45
+ </children>
46
+ </config>
47
+ </children>
48
+ </system>
49
+ </children>
50
+ </admin>
51
+ </resources>
52
+ </acl>
53
+ </adminhtml>
54
+ <default>
55
+ <stock>
56
+ <all_settings>
57
+ <enabled>1</enabled>
58
+ <stock_msg>Please hurry only few products are left!!!</stock_msg>
59
+ <stock_items>8</stock_items>
60
+ </all_settings>
61
+ </stock>
62
+ </default>
63
+ </config>
app/code/local/Daffodil/Stock/etc/config.xml~ ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Daffodil_Stock>
5
+ <version>0.1.0</version>
6
+ </Daffodil_Stock>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <stock>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Daffodil_Stock</module>
14
+ <frontName>stock</frontName>
15
+ </args>
16
+ </stock>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <stock>
21
+ <file>stock.xml</file>
22
+ </stock>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <stock>
29
+ <class>Daffodil_Stock_Helper</class>
30
+ </stock>
31
+ </helpers>
32
+ </global>
33
+ <adminhtml>
34
+ <acl>
35
+ <resources>
36
+ <admin>
37
+ <children>
38
+ <system>
39
+ <children>
40
+ <config>
41
+ <children>
42
+ <stock>
43
+ <title>Stock Management</title>
44
+ </stock>
45
+ </children>
46
+ </config>
47
+ </children>
48
+ </system>
49
+ </children>
50
+ </admin>
51
+ </resources>
52
+ </acl>
53
+ </adminhtml>
54
+ <default>
55
+ <stock>
56
+ <all_settings>
57
+ <enabled>1</enabled>
58
+ <stock_msg>Please hurry only few products are left!!!</stock_msg>
59
+ <stock_items>8</stock_items>
60
+ </all_settings>
61
+ </stock>
62
+ </default>
63
+ </config>
app/code/local/Daffodil/Stock/etc/system.xml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <stock translate="label" module="stock">
5
+ <label>Stock alert</label>
6
+ <sort_order>700</sort_order>
7
+ </stock>
8
+ </tabs>
9
+ <sections>
10
+ <stock translate="label" module="stock">
11
+ <tab>stock</tab>
12
+ <label>Stock alert Setting</label>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1000</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
+ <all_settings translate="label">
20
+ <label>Show message on low Stock</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+ <fields>
27
+ <enabled translate="label">
28
+ <label>Enable Feature Product Extension</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>1</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
+ </enabled>
36
+ <stock_items translate="label comment">
37
+ <label>Minimum no of product</label>
38
+ <comment>Set the limt after that product stock will show low </comment>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>6</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </stock_items>
45
+ <stock_msg translate="label comment">
46
+ <label>Set your message</label>
47
+ <comment>You can set your custom message for low stock </comment>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>7</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </stock_msg>
54
+ </fields>
55
+ </all_settings>
56
+ </groups>
57
+ </stock>
58
+ </sections>
59
+ </config>
app/design/frontend/default/default/layout/stock.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>css/stock.css</stylesheet></action>
6
+
7
+ </reference>
8
+ </default>
9
+ <catalog_product_view translate="label">
10
+ <reference name="product.info.extrahint" >
11
+ <block type="core/template" name="stock">
12
+ <action method="setTemplate" ifconfig="stock/all_settings/enabled">
13
+ <template>stock/stock.phtml</template>
14
+ </action>
15
+ </block>
16
+ </reference>
17
+ </catalog_product_view>
18
+ </layout>
app/design/frontend/default/default/template/stock/stock.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ /*
4
+ * Stock Management Extension Developed by Daffodil S/w Ltd.
5
+ */
6
+ ?>
7
+ <?php
8
+ $mystock=Mage::getStoreConfig('stock/all_settings/stock_items');
9
+ $lowmessage=Mage::getStoreConfig('stock/all_settings/stock_msg');
10
+ $_product = Mage::registry('current_product');
11
+ $_product = Mage::registry('current_product');
12
+ $__manStock = $_product->getStockItem()->getManageStock();
13
+ $__invAmt = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
14
+ if ($mystock >=$__invAmt)
15
+ {
16
+ echo '<div class="stockmsg" >'.$lowmessage.'</div>';
17
+ }
18
+ ?>
19
+
20
+
app/etc/modules/Daffodil_Stock.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Daffodil_Stock>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Daffodil_Stock>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Daffodil_Stock</name>
4
+ <version>1.0.0.1</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Show message if quantity of product is low.</summary>
10
+ <description>This Extension provide us facility to show message if quantity of product is less than a certain amount.&#xD;
11
+ For Example if quantity is less than 10 then it shows message like "Please hurry only few products are left."&#xD;
12
+ We can set quantity of products from admin. If product quantity is equl or less than set quantity then it start showing message in product detail page.</description>
13
+ <notes>First Release</notes>
14
+ <authors><author><name>Daffodil Software</name><user>daffodilsw</user><email>ashish.mittal@daffodilsw.com</email></author></authors>
15
+ <date>2012-12-28</date>
16
+ <time>12:08:06</time>
17
+ <contents><target name="magelocal"><dir name="Daffodil"><dir name="Stock"><dir name="Helper"><file name="Data.php" hash="aebfc2d3ea2566f6ffd6677eeb3c1286"/></dir><dir name="etc"><file name="config.xml" hash="6a480fa8c3b9b197c60e16fb18e043f2"/><file name="config.xml~" hash="0557195d1dd78f42345bd8c2f5b2880d"/><file name="system.xml" hash="fd6d96bbc3a7d8b5f5fe8f741b036794"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="stock.xml" hash="c8842ac5705097400625dae3eb71cefb"/></dir><dir name="template"><dir name="stock"><file name="stock.phtml" hash="a15cc194ec6f4893915ccbb89829ab13"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Daffodil_Stock.xml" hash="9a9fbf436a4bd167b79390a53aa8a927"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="stock.css" hash="24cd510cf49f058261f91b62653839a5"/></dir></dir></dir></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
20
+ </package>
skin/frontend/default/default/css/stock.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+
2
+ .stockmsg{
3
+ background: none repeat scroll 0 0 #808000;
4
+ border: 1px solid #CCCCCC;
5
+ border-radius: 15px 15px 15px 15px;
6
+ color: #FFFFFF;
7
+ font-size: 15px;
8
+ padding: 5px 2px 12px 12px;
9
+ }