Version Notes
First Release
Download this release
Release Info
| Developer | NG |
| Extension | ng_customer |
| Version | 1.0.1 |
| Comparing to | |
| See all releases | |
Version 1.0.1
- app/code/community/NG/Customer/Helper/Data.php +24 -0
- app/code/community/NG/Customer/controllers/IndexController.php +36 -0
- app/code/community/NG/Customer/etc/adminhtml.xml +47 -0
- app/code/community/NG/Customer/etc/config.xml +51 -0
- app/code/community/NG/Customer/etc/system.xml +66 -0
- app/design/frontend/base/default/layout/ng_customer.xml +36 -0
- app/design/frontend/base/default/template/Customer/link.phtml +26 -0
- app/etc/modules/NG_Customer.xml +26 -0
- package.xml +18 -0
app/code/community/NG/Customer/Helper/Data.php
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/
|
| 18 |
+
class NG_Customer_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 19 |
+
|
| 20 |
+
public function getLinkLabel() {
|
| 21 |
+
return ucwords(Mage::getStoreConfig('ng_customer/link/name'));
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
}
|
app/code/community/NG/Customer/controllers/IndexController.php
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/
|
| 18 |
+
class NG_Customer_IndexController extends Mage_Core_Controller_Front_Action {
|
| 19 |
+
|
| 20 |
+
public function preDispatch() {
|
| 21 |
+
parent::preDispatch();
|
| 22 |
+
$action = $this->getRequest()->getActionName();
|
| 23 |
+
$loginUrl = Mage::helper('customer')->getLoginUrl();
|
| 24 |
+
|
| 25 |
+
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
|
| 26 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
public function indexAction() {
|
| 31 |
+
$this->loadLayout();
|
| 32 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
|
| 33 |
+
$this->renderLayout();
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
}
|
app/code/community/NG/Customer/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/-->
|
| 18 |
+
<config>
|
| 19 |
+
<acl>
|
| 20 |
+
<resources>
|
| 21 |
+
<admin>
|
| 22 |
+
<children>
|
| 23 |
+
<system>
|
| 24 |
+
<children>
|
| 25 |
+
<config>
|
| 26 |
+
<children>
|
| 27 |
+
<ng_customer translate="title" module="ng_customer">
|
| 28 |
+
<title>My Account Configuration</title>
|
| 29 |
+
</ng_customer>
|
| 30 |
+
</children>
|
| 31 |
+
</config>
|
| 32 |
+
</children>
|
| 33 |
+
</system>
|
| 34 |
+
<ng_customer translate="title" module="ng_customer">
|
| 35 |
+
<title>My Account Configuration</title>
|
| 36 |
+
<children>
|
| 37 |
+
<link translate="title" module="ng_customer">
|
| 38 |
+
<title>Link Name</title>
|
| 39 |
+
<sort_order>0</sort_order>
|
| 40 |
+
</link>
|
| 41 |
+
</children>
|
| 42 |
+
</ng_customer>
|
| 43 |
+
</children>
|
| 44 |
+
</admin>
|
| 45 |
+
</resources>
|
| 46 |
+
</acl>
|
| 47 |
+
</config>
|
app/code/community/NG/Customer/etc/config.xml
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/
|
| 18 |
+
-->
|
| 19 |
+
<config>
|
| 20 |
+
<modules>
|
| 21 |
+
<NG_Customer>
|
| 22 |
+
<version>1.0.1</version>
|
| 23 |
+
</NG_Customer>
|
| 24 |
+
</modules>
|
| 25 |
+
<frontend>
|
| 26 |
+
<layout>
|
| 27 |
+
<updates>
|
| 28 |
+
<ng_customer module="NG_Customer">
|
| 29 |
+
<file>ng_customer.xml</file>
|
| 30 |
+
</ng_customer>
|
| 31 |
+
</updates>
|
| 32 |
+
</layout>
|
| 33 |
+
<routers>
|
| 34 |
+
<ng_customer>
|
| 35 |
+
<use>standard</use>
|
| 36 |
+
<args>
|
| 37 |
+
<module>NG_Customer</module>
|
| 38 |
+
<frontName>ng_customer</frontName>
|
| 39 |
+
</args>
|
| 40 |
+
</ng_customer>
|
| 41 |
+
</routers>
|
| 42 |
+
</frontend>
|
| 43 |
+
|
| 44 |
+
<global>
|
| 45 |
+
<helpers>
|
| 46 |
+
<ng_customer>
|
| 47 |
+
<class>NG_Customer_Helper</class>
|
| 48 |
+
</ng_customer>
|
| 49 |
+
</helpers>
|
| 50 |
+
</global>
|
| 51 |
+
</config>
|
app/code/community/NG/Customer/etc/system.xml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/-->
|
| 18 |
+
<config>
|
| 19 |
+
<tabs>
|
| 20 |
+
<ng translate="label" module="ng_customer">
|
| 21 |
+
<label>NG Extensions</label>
|
| 22 |
+
<sort_order>102</sort_order>
|
| 23 |
+
</ng>
|
| 24 |
+
</tabs>
|
| 25 |
+
<sections>
|
| 26 |
+
<ng_customer translate="label" module="ng_customer">
|
| 27 |
+
<class>separator-top</class>
|
| 28 |
+
<label>My Account Configuration</label>
|
| 29 |
+
<tab>ng</tab>
|
| 30 |
+
<frontend_type>text</frontend_type>
|
| 31 |
+
<sort_order>100</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 |
+
<groups>
|
| 36 |
+
<link translate="label" module="ng_customer">
|
| 37 |
+
<label>Settings</label>
|
| 38 |
+
<frontend_type>text</frontend_type>
|
| 39 |
+
<sort_order>0</sort_order>
|
| 40 |
+
<show_in_default>1</show_in_default>
|
| 41 |
+
<show_in_website>1</show_in_website>
|
| 42 |
+
<show_in_store>1</show_in_store>
|
| 43 |
+
<fields>
|
| 44 |
+
<enable translate="label">
|
| 45 |
+
<label>Enable</label>
|
| 46 |
+
<frontend_type>select</frontend_type>
|
| 47 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 48 |
+
<sort_order>1</sort_order>
|
| 49 |
+
<show_in_default>1</show_in_default>
|
| 50 |
+
<show_in_website>1</show_in_website>
|
| 51 |
+
<show_in_store>1</show_in_store>
|
| 52 |
+
</enable>
|
| 53 |
+
<name translate="label">
|
| 54 |
+
<label>Link Name</label>
|
| 55 |
+
<frontend_type>text</frontend_type>
|
| 56 |
+
<sort_order>2</sort_order>
|
| 57 |
+
<show_in_default>1</show_in_default>
|
| 58 |
+
<show_in_website>1</show_in_website>
|
| 59 |
+
<show_in_store>1</show_in_store>
|
| 60 |
+
</name>
|
| 61 |
+
</fields>
|
| 62 |
+
</link>
|
| 63 |
+
</groups>
|
| 64 |
+
</ng_customer>
|
| 65 |
+
</sections>
|
| 66 |
+
</config>
|
app/design/frontend/base/default/layout/ng_customer.xml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/
|
| 18 |
+
-->
|
| 19 |
+
<layout>
|
| 20 |
+
<customer_account>
|
| 21 |
+
<reference name="customer_account_navigation">
|
| 22 |
+
<action method="addLink" ifconfig="ng_customer/link/enable">
|
| 23 |
+
<name>custom_module_section</name>
|
| 24 |
+
<path>ng_customer/index/index</path>
|
| 25 |
+
<label helper="ng_customer/data/getLinkLabel" />
|
| 26 |
+
</action>
|
| 27 |
+
</reference>
|
| 28 |
+
</customer_account>
|
| 29 |
+
|
| 30 |
+
<ng_customer_index_index>
|
| 31 |
+
<update handle="customer_account" />
|
| 32 |
+
<reference name="my.account.wrapper">
|
| 33 |
+
<block type="core/template" name="ng_customer_content" template="Customer/link.phtml"/>
|
| 34 |
+
</reference>
|
| 35 |
+
</ng_customer_index_index>
|
| 36 |
+
</layout>
|
app/design/frontend/base/default/template/Customer/link.phtml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* NG_Customer extension
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the MIT License
|
| 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/mit-license.php
|
| 11 |
+
*
|
| 12 |
+
* @category NG
|
| 13 |
+
* @package NG_Customer
|
| 14 |
+
* @copyright Copyright (c) 2014
|
| 15 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 16 |
+
*/?>
|
| 17 |
+
|
| 18 |
+
<div class = "dashboard">
|
| 19 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml()
|
| 20 |
+
?>
|
| 21 |
+
<div class="box-account box-info">
|
| 22 |
+
<div class="box-head">
|
| 23 |
+
<h2><?php echo $this->__('My Custom Link Page') ?></h2>
|
| 24 |
+
</div>
|
| 25 |
+
</div>
|
| 26 |
+
</div>
|
app/etc/modules/NG_Customer.xml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NG_Customer extension
|
| 5 |
+
*
|
| 6 |
+
* NOTICE OF LICENSE
|
| 7 |
+
*
|
| 8 |
+
* This source file is subject to the MIT License
|
| 9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
+
* It is also available through the world-wide-web at this URL:
|
| 11 |
+
* http://opensource.org/licenses/mit-license.php
|
| 12 |
+
*
|
| 13 |
+
* @category NG
|
| 14 |
+
* @package NG_Customer
|
| 15 |
+
* @copyright Copyright (c) 2014
|
| 16 |
+
* @license http://opensource.org/licenses/mit-license.php MIT License
|
| 17 |
+
*/
|
| 18 |
+
-->
|
| 19 |
+
<config>
|
| 20 |
+
<modules>
|
| 21 |
+
<NG_Customer>
|
| 22 |
+
<active>true</active>
|
| 23 |
+
<codePool>community</codePool>
|
| 24 |
+
</NG_Customer>
|
| 25 |
+
</modules>
|
| 26 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>ng_customer</name>
|
| 4 |
+
<version>1.0.1</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license>MIT</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>This extension is related to add new link in my account left navigation bar and add its respective page.</summary>
|
| 10 |
+
<description>This extension is related to add new link in my account left navigation bar and add its respective page.</description>
|
| 11 |
+
<notes>First Release</notes>
|
| 12 |
+
<authors><author><name>NG</name><user>gargneeraj98</user><email>gargneeraj98@gmail.com</email></author></authors>
|
| 13 |
+
<date>2014-12-06</date>
|
| 14 |
+
<time>16:21:26</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="NG"><dir name="Customer"><dir name="Helper"><file name="Data.php" hash="7e4137b3e38ef81c527a5da03982b592"/></dir><dir name="controllers"><file name="IndexController.php" hash="6204bfc42db6e2913c95fd44f0ee391f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="aac5d5bd7f02b23d561fd3775702ae05"/><file name="config.xml" hash="095ca191150f6bdd98c67645eb2c06ee"/><file name="system.xml" hash="71e78ae61a42f4f857efccdb155fb870"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ng_customer.xml" hash="00df09add768e9556d4432ab4c623a9d"/></dir><dir name="template"><dir name="Customer"><file name="link.phtml" hash="35905cc0abbad056ec78bd9124817c6b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NG_Customer.xml" hash="c0d9e8763a6504de4d034553f4d4b270"/></dir></target></contents>
|
| 16 |
+
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
+
</package>
|
