Version Notes
First release of extention
Download this release
Release Info
Developer | Magento Core Team |
Extension | Amar_Address |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
app/code/local/Amar/Address/Block/Address.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Amar_Address_Block_Address extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
}
|
app/code/local/Amar/Address/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Amar_Address_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/local/Amar/Address/etc/config.xml
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Amar_Address>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Amar_Address>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<address>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Amar_Address</module>
|
14 |
+
<frontName>address</frontName>
|
15 |
+
</args>
|
16 |
+
</address>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<address>
|
21 |
+
<file>address.xml</file>
|
22 |
+
</address>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<models>
|
28 |
+
<address>
|
29 |
+
<class>Amar_Address_Model</class>
|
30 |
+
<resourceModel>address_mysql4</resourceModel>
|
31 |
+
</address>
|
32 |
+
<address_mysql4>
|
33 |
+
<class>Amar_Address_Model_Mysql4</class>
|
34 |
+
<entities>
|
35 |
+
<address>
|
36 |
+
<table>address</table>
|
37 |
+
</address>
|
38 |
+
</entities>
|
39 |
+
</address_mysql4>
|
40 |
+
</models>
|
41 |
+
<resources>
|
42 |
+
<address_setup>
|
43 |
+
<setup>
|
44 |
+
<module>Amar_Address</module>
|
45 |
+
<class>Mage_Customer_Model_Entity_Setup</class>
|
46 |
+
</setup>
|
47 |
+
<connection>
|
48 |
+
<use>core_setup</use>
|
49 |
+
</connection>
|
50 |
+
</address_setup>
|
51 |
+
<address_write>
|
52 |
+
<connection>
|
53 |
+
<use>core_write</use>
|
54 |
+
</connection>
|
55 |
+
</address_write>
|
56 |
+
<address_read>
|
57 |
+
<connection>
|
58 |
+
<use>core_read</use>
|
59 |
+
</connection>
|
60 |
+
</address_read>
|
61 |
+
</resources>
|
62 |
+
<blocks>
|
63 |
+
<address>
|
64 |
+
<class>Amar_Address_Block</class>
|
65 |
+
</address>
|
66 |
+
</blocks>
|
67 |
+
<helpers>
|
68 |
+
<address>
|
69 |
+
<class>Amar_Address_Helper</class>
|
70 |
+
</address>
|
71 |
+
</helpers>
|
72 |
+
</global>
|
73 |
+
<global>
|
74 |
+
<fieldsets>
|
75 |
+
<sales_convert_quote_address>
|
76 |
+
<govt_id>
|
77 |
+
<to_order_address>*</to_order_address>
|
78 |
+
<to_customer_address>*</to_customer_address>
|
79 |
+
</govt_id>
|
80 |
+
</sales_convert_quote_address>
|
81 |
+
<customer_address>
|
82 |
+
<govt_id>
|
83 |
+
<to_quote_address>*</to_quote_address>
|
84 |
+
</govt_id>
|
85 |
+
</customer_address>
|
86 |
+
</fieldsets>
|
87 |
+
</global>
|
88 |
+
</config>
|
app/code/local/Amar/Address/sql/address_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$this->addAttribute('customer_address', 'govt_id', array(
|
8 |
+
'type' => 'varchar',
|
9 |
+
'input' => 'text',
|
10 |
+
'label' => 'Govt ID NO#',
|
11 |
+
'global' => 1,
|
12 |
+
'visible' => 1,
|
13 |
+
'required' => 0,
|
14 |
+
'user_defined' => 1,
|
15 |
+
'visible_on_front' => 1
|
16 |
+
));
|
17 |
+
|
18 |
+
|
19 |
+
if (version_compare(Mage::getVersion(), '1.6.0', '<='))
|
20 |
+
{
|
21 |
+
$customer = Mage::getModel('customer/address');
|
22 |
+
$attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
|
23 |
+
$this->addAttributeToSet('customer_address', $attrSetId, 'General', 'govt_id');
|
24 |
+
}
|
25 |
+
|
26 |
+
if (version_compare(Mage::getVersion(), '1.4.2', '>='))
|
27 |
+
{
|
28 |
+
Mage::getSingleton('eav/config')
|
29 |
+
->getAttribute('customer_address', 'govt_id')
|
30 |
+
->setData('used_in_forms', array('customer_register_address','customer_address_edit','adminhtml_customer_address'))
|
31 |
+
->save();
|
32 |
+
}
|
33 |
+
|
34 |
+
$tablequote = $this->getTable('sales/quote_address');
|
35 |
+
$installer->run("
|
36 |
+
ALTER TABLE $tablequote ADD `govt_id` varchar(255) NOT NULL
|
37 |
+
");
|
38 |
+
|
39 |
+
$tablequote = $this->getTable('sales/order_address');
|
40 |
+
$installer->run("
|
41 |
+
ALTER TABLE $tablequote ADD `govt_id` varchar(255) NOT NULL
|
42 |
+
");
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/etc/modules/Amar_Address.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Amar_Address>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Amar_Address>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Amar_Address</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Add new address attribute in named Govt ID# in address in admin, customer registration form, customer edit address and checkout pages.</summary>
|
10 |
+
<description>Add new address attribute in named Govt ID# in address in admin, customer registration form, customer edit address and checkout pages.</description>
|
11 |
+
<notes>First release of extention</notes>
|
12 |
+
<authors><author><name>jaimin</name><user>auto-converted</user><email>jaimin85india@yahoo.com</email></author></authors>
|
13 |
+
<date>2012-07-02</date>
|
14 |
+
<time>12:19:37</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Amar"><dir name="Address"><dir name="Block"><file name="Address.php" hash="998b6d6189deef45541f1b6cc727dba1"/></dir><dir name="Helper"><file name="Data.php" hash="c7c9e812cf2b939509bdd9fce8f78732"/></dir><dir name="etc"><file name="config.xml" hash="b3a589695a862de5468339ef329310f2"/></dir><dir name="sql"><dir name="address_setup"><file name="mysql4-install-0.1.0.php" hash="66e62f5822815783e105bac5e06d4d81"/></dir></dir></dir></dir><dir name="fontend"><dir name="base"><dir name="default"><dir name="layout"><file name="address.xml" hash=""/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amar_Address.xml" hash="80597bd9f3c6ed2e92c26588567c5116"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|