Version Notes
Bug Fixes
Download this release
Release Info
Developer | Exinent |
Extension | Wholesale_Customer_Activation |
Version | 9.0.2 |
Comparing to | |
See all releases |
Code changes from version 9.0.1 to 9.0.2
- app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Customer/Edit/Tab/Customerimages.php +44 -44
- app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Rewrite/Fieldset.php +11 -11
- app/code/community/Exinent/CustomerActivation/Block/Adminhtml/System/Config/Date.php +22 -22
- app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Widget/Grid/Column/Renderer/Boolean.php +25 -25
- app/code/community/Exinent/CustomerActivation/Block/Orderproduct.php +121 -120
- app/code/community/Exinent/CustomerActivation/Block/Page/Html/Topmenu.php +28 -28
- app/code/community/Exinent/CustomerActivation/Block/Purchaseorder.php +10 -10
- app/code/community/Exinent/CustomerActivation/Block/Purchaseorderinfo.php +15 -15
- app/code/community/Exinent/CustomerActivation/Block/Rewrite/Fieldset.php +8 -8
- app/code/community/Exinent/CustomerActivation/Block/collection/toobar.php +25 -25
- app/code/community/Exinent/CustomerActivation/Block/toobar.php +25 -25
- app/code/community/Exinent/CustomerActivation/Helper/Data.php +180 -179
- app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Categories → Config/Source/Categories/Group}/Multiselect.php +27 -27
- app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Customer → Config/Source/Customer/Group}/Multiselect.php +18 -18
- app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Pages → Config/Source/Pages/Group}/Multiselect.php +19 -19
- app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Products → Config/Source/Products}/Group/Multiselect.php +33 -26
- app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Products → Config/Source/Products}/Price/Multiselect.php +25 -25
- app/code/community/Exinent/CustomerActivation/Model/Customer.php +15 -15
- app/code/community/Exinent/CustomerActivation/Model/Info.php +43 -43
- app/code/community/Exinent/CustomerActivation/Model/Mysql4/Info.php +75 -75
- app/code/community/Exinent/CustomerActivation/Model/Mysql4/Subscriber.php +8 -8
- app/code/community/Exinent/CustomerActivation/Model/Mysql4/Subscriber/Collection.php +30 -30
- app/code/community/Exinent/CustomerActivation/Model/Net15.php +25 -25
- app/code/community/Exinent/CustomerActivation/Model/Net30.php +25 -25
- app/code/community/Exinent/CustomerActivation/Model/Observer.php +337 -337
- app/code/community/Exinent/CustomerActivation/Model/Order.php +88 -88
- app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php +41 -41
- app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customerpayment.php +71 -71
- app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customershippingmethods.php +63 -63
- app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Iswebsitelive.php +63 -63
- app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/StoreType.php +91 -91
- app/code/community/Exinent/CustomerActivation/Model/Resource/Customer.php +63 -63
- app/code/community/Exinent/CustomerActivation/Model/Subscriber.php +11 -11
- app/code/community/Exinent/CustomerActivation/Model/Thirdparty.php +61 -61
- app/code/community/Exinent/CustomerActivation/Model/Thirdpartyfed.php +62 -62
- app/code/community/Exinent/CustomerActivation/Model/Thirdpartyfedex.php +68 -68
- app/code/community/Exinent/CustomerActivation/Model/Thirdpartyups.php +67 -67
- app/code/community/Exinent/CustomerActivation/controllers/AccountController.php +430 -427
- app/code/community/Exinent/CustomerActivation/controllers/AdminController.php +93 -93
- app/code/community/Exinent/CustomerActivation/controllers/CategoryController.php +77 -77
- app/code/community/Exinent/CustomerActivation/controllers/IndexController.php +29 -29
- app/code/community/Exinent/CustomerActivation/controllers/PageController.php +53 -53
- app/code/community/Exinent/CustomerActivation/controllers/ProductController.php +73 -73
- app/code/community/Exinent/CustomerActivation/controllers/QuickorderController.php +98 -0
- app/code/community/Exinent/CustomerActivation/controllers/productOrderController.php +96 -96
- app/code/community/Exinent/CustomerActivation/etc/config.xml +301 -301
- app/code/community/Exinent/CustomerActivation/etc/system.xml +371 -371
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-install-0.1.0.php +18 -18
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.0-0.1.1.php +8 -8
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.1-0.1.2.php +11 -11
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.2-0.1.3.php +14 -14
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.3-0.1.4.php +68 -68
- app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.4-0.1.5.php +155 -155
- app/design/adminhtml/default/default/layout/customerActivation.xml +12 -12
- app/design/adminhtml/default/default/template/customerActivation/customerActivation.phtml +58 -58
- app/design/adminhtml/default/default/template/customerActivation/customerImages.phtml +52 -52
- app/design/adminhtml/default/default/template/customerActivation/info/purchaseorder.phtml +1 -1
- app/design/frontend/base/default/layout/customerActivation.xml +102 -75
- app/design/frontend/base/default/template/customerActivation/checkout/cart/shipping.phtml +158 -0
- app/design/frontend/base/default/template/customerActivation/checkout/onepage/payment/methods.phtml +90 -90
- app/design/frontend/base/default/template/customerActivation/checkout/onepage/shipping_method/available.phtml +168 -153
- app/design/frontend/base/default/template/customerActivation/customerActivation.phtml +81 -75
- app/design/frontend/base/default/template/customerActivation/form/purchaseorder.phtml +7 -7
- app/design/frontend/base/default/template/customerActivation/info/purchaseorder.phtml +4 -4
- app/design/frontend/base/default/template/customerActivation/onepage/shipping_method/available.phtml +131 -131
- app/design/frontend/base/default/template/customerActivation/quickorderproduct.phtml +87 -87
- app/design/frontend/base/default/template/customerActivation/review/shipping/method.phtml +63 -0
- app/design/frontend/base/default/template/customerActivation/wholesaleLogin.phtml +86 -86
- app/design/frontend/base/default/template/customerActivation/wholesaleRegister.phtml +489 -486
- app/etc/modules/Exinent_CustomerActivation.xml +14 -14
- package.xml +9 -9
app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Customer/Edit/Tab/Customerimages.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Adminhtml_Customer_Edit_Tab_Customerimages extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface {
|
4 |
-
|
5 |
-
public function __construct() {
|
6 |
-
//parent::_construct();
|
7 |
-
$this->setTemplate('customerActivation/customerImages.phtml');
|
8 |
-
}
|
9 |
-
|
10 |
-
public function getCustomtabInfo() {
|
11 |
-
$customer = Mage::registry('current_customer');
|
12 |
-
$customtab = 'My Custom tab Action Contents Here';
|
13 |
-
return $customtab;
|
14 |
-
}
|
15 |
-
|
16 |
-
public function getTabLabel() {
|
17 |
-
return $this->__('CustomerImages');
|
18 |
-
}
|
19 |
-
|
20 |
-
public function getTabTitle() {
|
21 |
-
return $this->__('Customer Uploded Images');
|
22 |
-
}
|
23 |
-
|
24 |
-
public function canShowTab() {
|
25 |
-
$customer = Mage::registry('current_customer');
|
26 |
-
return (bool) $customer->getId();
|
27 |
-
}
|
28 |
-
|
29 |
-
public function isHidden() {
|
30 |
-
return false;
|
31 |
-
}
|
32 |
-
|
33 |
-
public function getAfter() {
|
34 |
-
return 'tags';
|
35 |
-
}
|
36 |
-
|
37 |
-
public function getCustomerimages() {
|
38 |
-
$customerId = $this->getRequest()->getParam('id');
|
39 |
-
$customerObject = Mage::getModel('customer/customer')->load($customerId);
|
40 |
-
|
41 |
-
return $customerObject;
|
42 |
-
}
|
43 |
-
|
44 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Adminhtml_Customer_Edit_Tab_Customerimages extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
//parent::_construct();
|
7 |
+
$this->setTemplate('customerActivation/customerImages.phtml');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getCustomtabInfo() {
|
11 |
+
$customer = Mage::registry('current_customer');
|
12 |
+
$customtab = 'My Custom tab Action Contents Here';
|
13 |
+
return $customtab;
|
14 |
+
}
|
15 |
+
|
16 |
+
public function getTabLabel() {
|
17 |
+
return $this->__('CustomerImages');
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getTabTitle() {
|
21 |
+
return $this->__('Customer Uploded Images');
|
22 |
+
}
|
23 |
+
|
24 |
+
public function canShowTab() {
|
25 |
+
$customer = Mage::registry('current_customer');
|
26 |
+
return (bool) $customer->getId();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function isHidden() {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getAfter() {
|
34 |
+
return 'tags';
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getCustomerimages() {
|
38 |
+
$customerId = $this->getRequest()->getParam('id');
|
39 |
+
$customerObject = Mage::getModel('customer/customer')->load($customerId);
|
40 |
+
|
41 |
+
return $customerObject;
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Rewrite/Fieldset.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once("Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php");
|
4 |
-
class Exinent_CustomerActivation_Block_Adminhtml_Rewrite_Fieldset extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset
|
5 |
-
{
|
6 |
-
protected $_element;
|
7 |
-
protected function _construct()
|
8 |
-
{
|
9 |
-
$this->setTemplate('customerActivation/fieldset.phtml');
|
10 |
-
}
|
11 |
-
|
12 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once("Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php");
|
4 |
+
class Exinent_CustomerActivation_Block_Adminhtml_Rewrite_Fieldset extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset
|
5 |
+
{
|
6 |
+
protected $_element;
|
7 |
+
protected function _construct()
|
8 |
+
{
|
9 |
+
$this->setTemplate('customerActivation/fieldset.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
}
|
app/code/community/Exinent/CustomerActivation/Block/Adminhtml/System/Config/Date.php
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
<?php
|
2 |
-
class Exinent_CustomerActivation_Block_Adminhtml_System_Config_Date extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
-
{
|
4 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
-
{
|
6 |
-
$date = new Varien_Data_Form_Element_Date;
|
7 |
-
$format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
8 |
-
|
9 |
-
$data = array(
|
10 |
-
'name' => $element->getName(),
|
11 |
-
'html_id' => $element->getId(),
|
12 |
-
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
13 |
-
);
|
14 |
-
$date->setData($data);
|
15 |
-
$date->setValue($element->getValue(), $format);
|
16 |
-
$date->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT));
|
17 |
-
$date->setClass($element->getFieldConfig()->validate->asArray());
|
18 |
-
$date->setForm($element->getForm());
|
19 |
-
|
20 |
-
return $date->getElementHtml();
|
21 |
-
}
|
22 |
-
}
|
23 |
?>
|
1 |
+
<?php
|
2 |
+
class Exinent_CustomerActivation_Block_Adminhtml_System_Config_Date extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
+
{
|
6 |
+
$date = new Varien_Data_Form_Element_Date;
|
7 |
+
$format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
8 |
+
|
9 |
+
$data = array(
|
10 |
+
'name' => $element->getName(),
|
11 |
+
'html_id' => $element->getId(),
|
12 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
13 |
+
);
|
14 |
+
$date->setData($data);
|
15 |
+
$date->setValue($element->getValue(), $format);
|
16 |
+
$date->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT));
|
17 |
+
$date->setClass($element->getFieldConfig()->validate->asArray());
|
18 |
+
$date->setForm($element->getForm());
|
19 |
+
|
20 |
+
return $date->getElementHtml();
|
21 |
+
}
|
22 |
+
}
|
23 |
?>
|
app/code/community/Exinent/CustomerActivation/Block/Adminhtml/Widget/Grid/Column/Renderer/Boolean.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Adminhtml_Widget_Grid_Column_Renderer_Boolean extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text {
|
4 |
-
|
5 |
-
public function render(Varien_Object $row) {
|
6 |
-
$data = $row->getCustomerActivated();
|
7 |
-
if ($data == 'New')
|
8 |
-
$data = 3;
|
9 |
-
switch ($data) {
|
10 |
-
case 1:
|
11 |
-
return $this->__('Approved');
|
12 |
-
case 2:
|
13 |
-
return $this->__('Pending');
|
14 |
-
case 0:
|
15 |
-
return $this->__('Rejected');
|
16 |
-
case 3:
|
17 |
-
return $this->__('New');
|
18 |
-
case 4:
|
19 |
-
return $this->__('In Active');
|
20 |
-
case 5:
|
21 |
-
return $this->__('On Hold');
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Adminhtml_Widget_Grid_Column_Renderer_Boolean extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text {
|
4 |
+
|
5 |
+
public function render(Varien_Object $row) {
|
6 |
+
$data = $row->getCustomerActivated();
|
7 |
+
if ($data == 'New')
|
8 |
+
$data = 3;
|
9 |
+
switch ($data) {
|
10 |
+
case 1:
|
11 |
+
return $this->__('Approved');
|
12 |
+
case 2:
|
13 |
+
return $this->__('Pending');
|
14 |
+
case 0:
|
15 |
+
return $this->__('Rejected');
|
16 |
+
case 3:
|
17 |
+
return $this->__('New');
|
18 |
+
case 4:
|
19 |
+
return $this->__('In Active');
|
20 |
+
case 5:
|
21 |
+
return $this->__('On Hold');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Exinent/CustomerActivation/Block/Orderproduct.php
CHANGED
@@ -1,120 +1,121 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Orderproduct extends Mage_Core_Block_Template {
|
4 |
-
|
5 |
-
public function getSubCategories() {
|
6 |
-
$cat = Mage::getModel('catalog/category')->load(2);
|
7 |
-
return $cat->getChildren();
|
8 |
-
}
|
9 |
-
|
10 |
-
public function getCategoryObject($subCatid) {
|
11 |
-
return Mage::getModel('catalog/category')->load($subCatid);
|
12 |
-
}
|
13 |
-
|
14 |
-
public function getProductCollection($_category) {
|
15 |
-
$productCollection = Mage::getResourceModel('catalog/product_collection')
|
16 |
-
->addCategoryFilter($_category)
|
17 |
-
->addAttributeToFilter('type_id', 'configurable')
|
18 |
-
->addAttributeToSelect('*');
|
19 |
-
return $productCollection;
|
20 |
-
}
|
21 |
-
|
22 |
-
public function loadProduct($productId) {
|
23 |
-
return Mage::getModel('catalog/product')->load($productId);
|
24 |
-
}
|
25 |
-
|
26 |
-
public function getAttributes($product) {
|
27 |
-
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
28 |
-
return $attributes;
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getQty($product) {
|
32 |
-
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
33 |
-
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
|
34 |
-
$stockArray = array();
|
35 |
-
foreach ($simple_collection as $simple_product) {
|
36 |
-
if ($simple_product->isSaleable()) {
|
37 |
-
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($simple_product);
|
38 |
-
array_push($stockArray, $stock->getQty());
|
39 |
-
}
|
40 |
-
}
|
41 |
-
return $stockArray;
|
42 |
-
}
|
43 |
-
|
44 |
-
public function getSku($product) {
|
45 |
-
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
46 |
-
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
|
47 |
-
$stockArray = array();
|
48 |
-
foreach ($simple_collection as $simple_product) {
|
49 |
-
if ($simple_product->isSaleable()) {
|
50 |
-
array_push($stockArray, $simple_product->getId());
|
51 |
-
}
|
52 |
-
}
|
53 |
-
return $stockArray;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getOrderSimpleProducts() {
|
57 |
-
|
58 |
-
$collectionSimple = Mage::getResourceModel('catalog/product_collection')
|
59 |
-
->addAttributeToFilter('type_id', array('eq' => 'simple'))->addAttributeToSelect('*');
|
60 |
-
$i = 0;
|
61 |
-
foreach ($collectionSimple as $product) {
|
62 |
-
if ($product->isSaleable()) {
|
63 |
-
|
64 |
-
$orderProduct[$i]['
|
65 |
-
$orderProduct[$i]['
|
66 |
-
$orderProduct[$i]['
|
67 |
-
$orderProduct[$i]['
|
68 |
-
$orderProduct[$i]['
|
69 |
-
$i
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$
|
79 |
-
$
|
80 |
-
$
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$
|
85 |
-
$orderProduct['
|
86 |
-
$orderProduct['
|
87 |
-
$orderProduct['
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
$
|
97 |
-
$
|
98 |
-
|
99 |
-
$
|
100 |
-
$orderProduct['
|
101 |
-
$orderProduct['
|
102 |
-
$orderProduct['
|
103 |
-
$orderProduct['
|
104 |
-
$orderProduct['
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
$
|
114 |
-
$data[
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Orderproduct extends Mage_Core_Block_Template {
|
4 |
+
|
5 |
+
public function getSubCategories() {
|
6 |
+
$cat = Mage::getModel('catalog/category')->load(2);
|
7 |
+
return $cat->getChildren();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function getCategoryObject($subCatid) {
|
11 |
+
return Mage::getModel('catalog/category')->load($subCatid);
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getProductCollection($_category) {
|
15 |
+
$productCollection = Mage::getResourceModel('catalog/product_collection')
|
16 |
+
->addCategoryFilter($_category)
|
17 |
+
->addAttributeToFilter('type_id', 'configurable')
|
18 |
+
->addAttributeToSelect('*');
|
19 |
+
return $productCollection;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function loadProduct($productId) {
|
23 |
+
return Mage::getModel('catalog/product')->load($productId);
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getAttributes($product) {
|
27 |
+
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
|
28 |
+
return $attributes;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getQty($product) {
|
32 |
+
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
33 |
+
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
|
34 |
+
$stockArray = array();
|
35 |
+
foreach ($simple_collection as $simple_product) {
|
36 |
+
if ($simple_product->isSaleable()) {
|
37 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($simple_product);
|
38 |
+
array_push($stockArray, $stock->getQty());
|
39 |
+
}
|
40 |
+
}
|
41 |
+
return $stockArray;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getSku($product) {
|
45 |
+
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
46 |
+
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
|
47 |
+
$stockArray = array();
|
48 |
+
foreach ($simple_collection as $simple_product) {
|
49 |
+
if ($simple_product->isSaleable()) {
|
50 |
+
array_push($stockArray, $simple_product->getId());
|
51 |
+
}
|
52 |
+
}
|
53 |
+
return $stockArray;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getOrderSimpleProducts() {
|
57 |
+
|
58 |
+
$collectionSimple = Mage::getResourceModel('catalog/product_collection')
|
59 |
+
->addAttributeToFilter('type_id', array('eq' => 'simple'))->addAttributeToSelect('*');
|
60 |
+
$i = 0;
|
61 |
+
foreach ($collectionSimple as $product) {
|
62 |
+
if ($product->isSaleable()) {
|
63 |
+
$Products_one = Mage::getModel('catalog/product')->load($product->getId());
|
64 |
+
$orderProduct[$i]['product_id'] = $product->getId();
|
65 |
+
$orderProduct[$i]['product_url'] = $product->getUrlKey();
|
66 |
+
$orderProduct[$i]['name'] = $product->getName();
|
67 |
+
$orderProduct[$i]['price'] = $product->getFinalPrice();
|
68 |
+
$orderProduct[$i]['sku'] = $product->getSku();
|
69 |
+
$orderProduct[$i]['image'] = $Products_one->getImageUrl();
|
70 |
+
$i++;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
return $orderProduct;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getOrderProduct() {
|
77 |
+
// Mage::log('getOrderProduct',null,'yams.log');
|
78 |
+
$orderProducts = array();
|
79 |
+
$categoryArray = array();
|
80 |
+
$data = array();
|
81 |
+
$collectionSimple = Mage::getResourceModel('catalog/product_collection')
|
82 |
+
->addAttributeToFilter('type_id', array('eq' => 'simple'));
|
83 |
+
$orderProduct['category'] = $_category->getName();
|
84 |
+
array_push($categoryArray, $_category->getName());
|
85 |
+
$orderProduct['name'] = $product->getName();
|
86 |
+
$orderProduct['image'] = $product->getImageUrl();
|
87 |
+
$orderProduct['qty'] = $this->getQty($product);
|
88 |
+
$orderProduct['sku'] = $this->getSku($product);
|
89 |
+
|
90 |
+
$subcats = $this->getSubCategories();
|
91 |
+
foreach (explode(',', $subcats) as $subCatid) {
|
92 |
+
$_category = $this->getCategoryObject($subCatid);
|
93 |
+
if ($_category->getIsActive()) {
|
94 |
+
$productCollection = $this->getProductCollection($_category);
|
95 |
+
foreach ($productCollection as $product) {
|
96 |
+
$orderProduct = array();
|
97 |
+
$product = $this->loadProduct($product->getId());
|
98 |
+
$orderProduct['category'] = $_category->getName();
|
99 |
+
array_push($categoryArray, $_category->getName());
|
100 |
+
$orderProduct['confsku'] = $product->getSku();
|
101 |
+
$orderProduct['conf_id'] = $product->getId();
|
102 |
+
$orderProduct['name'] = $product->getName();
|
103 |
+
$orderProduct['image'] = $product->getImageUrl();
|
104 |
+
$orderProduct['qty'] = $this->getQty($product);
|
105 |
+
$orderProduct['sku'] = $this->getSku($product);
|
106 |
+
if (empty($orderProduct['qty'])) {
|
107 |
+
continue;
|
108 |
+
}
|
109 |
+
array_push($orderProducts, $orderProduct);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
$categoryuniquearray = array_unique($categoryArray);
|
114 |
+
$data[0] = $categoryuniquearray;
|
115 |
+
$data[1] = $orderProducts;
|
116 |
+
return $data;
|
117 |
+
}
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
?>
|
app/code/community/Exinent/CustomerActivation/Block/Page/Html/Topmenu.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Page_Html_Topmenu extends Mage_Page_Block_Html_Topmenu {
|
4 |
-
|
5 |
-
protected $additionalLinks = array();
|
6 |
-
|
7 |
-
public function addLink($label, $type, $value) {
|
8 |
-
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
-
|
10 |
-
if ('path' == $type && $ModuleStatus == 1) {
|
11 |
-
$_coreUrlHelper = $this->helper('core/url');
|
12 |
-
$currentPath = str_replace(Mage::getBaseUrl(), '', $_coreUrlHelper->getCurrentUrl());
|
13 |
-
$url = Mage::getUrl($value);
|
14 |
-
$data = array(
|
15 |
-
'label' => $label,
|
16 |
-
'url' => $url,
|
17 |
-
'is_active' => (int) ($value == $currentPath),
|
18 |
-
);
|
19 |
-
$this->additionalLinks[$url] = $data;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
public function getAdditionalLinks() {
|
24 |
-
return $this->additionalLinks;
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Page_Html_Topmenu extends Mage_Page_Block_Html_Topmenu {
|
4 |
+
|
5 |
+
protected $additionalLinks = array();
|
6 |
+
|
7 |
+
public function addLink($label, $type, $value) {
|
8 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
+
|
10 |
+
if ('path' == $type && $ModuleStatus == 1) {
|
11 |
+
$_coreUrlHelper = $this->helper('core/url');
|
12 |
+
$currentPath = str_replace(Mage::getBaseUrl(), '', $_coreUrlHelper->getCurrentUrl());
|
13 |
+
$url = Mage::getUrl($value);
|
14 |
+
$data = array(
|
15 |
+
'label' => $label,
|
16 |
+
'url' => $url,
|
17 |
+
'is_active' => (int) ($value == $currentPath),
|
18 |
+
);
|
19 |
+
$this->additionalLinks[$url] = $data;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getAdditionalLinks() {
|
24 |
+
return $this->additionalLinks;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
?>
|
app/code/community/Exinent/CustomerActivation/Block/Purchaseorder.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Purchaseorder extends Mage_Payment_Block_Form_Purchaseorder {
|
4 |
-
|
5 |
-
protected function _construct() {
|
6 |
-
parent::_construct();
|
7 |
-
$this->setTemplate('customerActivation/form/purchaseorder.phtml');
|
8 |
-
}
|
9 |
-
|
10 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Purchaseorder extends Mage_Payment_Block_Form_Purchaseorder {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('customerActivation/form/purchaseorder.phtml');
|
8 |
+
}
|
9 |
+
|
10 |
+
}
|
app/code/community/Exinent/CustomerActivation/Block/Purchaseorderinfo.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Purchaseorderinfo extends Mage_Payment_Block_Info {
|
4 |
-
|
5 |
-
protected function _construct() {
|
6 |
-
parent::_construct();
|
7 |
-
$this->setTemplate('customerActivation/info/purchaseorder.phtml');
|
8 |
-
}
|
9 |
-
|
10 |
-
public function toPdf() {
|
11 |
-
$this->setTemplate('payment/info/pdf/purchaseorder.phtml');
|
12 |
-
return $this->toHtml();
|
13 |
-
}
|
14 |
-
|
15 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Purchaseorderinfo extends Mage_Payment_Block_Info {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('customerActivation/info/purchaseorder.phtml');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function toPdf() {
|
11 |
+
$this->setTemplate('payment/info/pdf/purchaseorder.phtml');
|
12 |
+
return $this->toHtml();
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Exinent/CustomerActivation/Block/Rewrite/Fieldset.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
class Exinent_CustomerActivation_Block_Rewrite_Fieldset extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset
|
3 |
-
{
|
4 |
-
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->setTemplate('customerActivation/fieldset.phtml');
|
8 |
-
}
|
9 |
}
|
1 |
+
<?php
|
2 |
+
class Exinent_CustomerActivation_Block_Rewrite_Fieldset extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset
|
3 |
+
{
|
4 |
+
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->setTemplate('customerActivation/fieldset.phtml');
|
8 |
+
}
|
9 |
}
|
app/code/community/Exinent/CustomerActivation/Block/collection/toobar.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar {
|
4 |
-
|
5 |
-
public function getPagerHtml()
|
6 |
-
{
|
7 |
-
$pagerBlock = $this->getLayout()->createBlock('page/html_pager');
|
8 |
-
|
9 |
-
if ($pagerBlock instanceof Varien_Object) {
|
10 |
-
|
11 |
-
/* @var $pagerBlock Mage_Page_Block_Html_Pager */
|
12 |
-
$pagerBlock->setAvailableLimit($this->getAvailableLimit());
|
13 |
-
|
14 |
-
$pagerBlock->setUseContainer(false)
|
15 |
-
->setShowPerPage(false)
|
16 |
-
->setShowAmounts(false)
|
17 |
-
->setLimitVarName($this->getLimitVarName())
|
18 |
-
->setPageVarName($this->getPageVarName())
|
19 |
-
->setLimit($this->getLimit())
|
20 |
-
->setCollection($this->getCollection());
|
21 |
-
return $pagerBlock->toHtml();
|
22 |
-
}
|
23 |
-
return '';
|
24 |
-
}
|
25 |
-
}
|
26 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar {
|
4 |
+
|
5 |
+
public function getPagerHtml()
|
6 |
+
{
|
7 |
+
$pagerBlock = $this->getLayout()->createBlock('page/html_pager');
|
8 |
+
|
9 |
+
if ($pagerBlock instanceof Varien_Object) {
|
10 |
+
|
11 |
+
/* @var $pagerBlock Mage_Page_Block_Html_Pager */
|
12 |
+
$pagerBlock->setAvailableLimit($this->getAvailableLimit());
|
13 |
+
|
14 |
+
$pagerBlock->setUseContainer(false)
|
15 |
+
->setShowPerPage(false)
|
16 |
+
->setShowAmounts(false)
|
17 |
+
->setLimitVarName($this->getLimitVarName())
|
18 |
+
->setPageVarName($this->getPageVarName())
|
19 |
+
->setLimit($this->getLimit())
|
20 |
+
->setCollection($this->getCollection());
|
21 |
+
return $pagerBlock->toHtml();
|
22 |
+
}
|
23 |
+
return '';
|
24 |
+
}
|
25 |
+
}
|
26 |
?>
|
app/code/community/Exinent/CustomerActivation/Block/toobar.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Block_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar {
|
4 |
-
|
5 |
-
public function getPagerHtml()
|
6 |
-
{
|
7 |
-
$pagerBlock = $this->getLayout()->createBlock('page/html_pager');
|
8 |
-
|
9 |
-
if ($pagerBlock instanceof Varien_Object) {
|
10 |
-
|
11 |
-
/* @var $pagerBlock Mage_Page_Block_Html_Pager */
|
12 |
-
$pagerBlock->setAvailableLimit($this->getAvailableLimit());
|
13 |
-
|
14 |
-
$pagerBlock->setUseContainer(false)
|
15 |
-
->setShowPerPage(false)
|
16 |
-
->setShowAmounts(false)
|
17 |
-
->setLimitVarName($this->getLimitVarName())
|
18 |
-
->setPageVarName($this->getPageVarName())
|
19 |
-
->setLimit($this->getLimit())
|
20 |
-
->setCollection($this->getCollection());
|
21 |
-
return $pagerBlock->toHtml();
|
22 |
-
}
|
23 |
-
return '';
|
24 |
-
}
|
25 |
-
}
|
26 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Block_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar {
|
4 |
+
|
5 |
+
public function getPagerHtml()
|
6 |
+
{
|
7 |
+
$pagerBlock = $this->getLayout()->createBlock('page/html_pager');
|
8 |
+
|
9 |
+
if ($pagerBlock instanceof Varien_Object) {
|
10 |
+
|
11 |
+
/* @var $pagerBlock Mage_Page_Block_Html_Pager */
|
12 |
+
$pagerBlock->setAvailableLimit($this->getAvailableLimit());
|
13 |
+
|
14 |
+
$pagerBlock->setUseContainer(false)
|
15 |
+
->setShowPerPage(false)
|
16 |
+
->setShowAmounts(false)
|
17 |
+
->setLimitVarName($this->getLimitVarName())
|
18 |
+
->setPageVarName($this->getPageVarName())
|
19 |
+
->setLimit($this->getLimit())
|
20 |
+
->setCollection($this->getCollection());
|
21 |
+
return $pagerBlock->toHtml();
|
22 |
+
}
|
23 |
+
return '';
|
24 |
+
}
|
25 |
+
}
|
26 |
?>
|
app/code/community/Exinent/CustomerActivation/Helper/Data.php
CHANGED
@@ -1,179 +1,180 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
-
|
5 |
-
const XML_PATH_EMAIL_ADMIN_NOTIFICATION = 'customer/customeractivation/admin_email';
|
6 |
-
const XML_PATH_EMAIL_ADMIN_NOTIFICATION_TEMPLATE = 'customer/customeractivation/registration_admin_template';
|
7 |
-
const XML_PATH_EMAIL_CUSTOMER_NOTIFICATION_TEMPLATE = 'customer/customeractivation/activation_template';
|
8 |
-
const
|
9 |
-
const
|
10 |
-
const
|
11 |
-
const
|
12 |
-
const
|
13 |
-
const
|
14 |
-
const
|
15 |
-
const
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
$
|
24 |
-
$
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
'
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
$
|
50 |
-
$
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
|
68 |
-
//
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
//
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
'
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
'
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
//
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
$
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
'
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
const XML_PATH_EMAIL_ADMIN_NOTIFICATION = 'customer/customeractivation/admin_email';
|
6 |
+
const XML_PATH_EMAIL_ADMIN_NOTIFICATION_TEMPLATE = 'customer/customeractivation/registration_admin_template';
|
7 |
+
const XML_PATH_EMAIL_CUSTOMER_NOTIFICATION_TEMPLATE = 'customer/customeractivation/activation_template';
|
8 |
+
const XML_PATH_EMAIL_CUSTOMER_NOTIFICATION_TEMPLATE1 = 'customer/customeractivation/activation_template1';
|
9 |
+
const XML_PATH_ALERT_CUSTOMER = 'customer/customeractivation/alert_customer';
|
10 |
+
const XML_PATH_ALERT_ADMIN = 'customer/customeractivation/alert_admin';
|
11 |
+
const XML_PATH_DEFAULT_STATUS = 'customer/customeractivation/activation_status_default';
|
12 |
+
const XML_PATH_DEFAULT_STATUS_BY_GROUP = 'customer/customeractivation/require_activation_for_specific_groups';
|
13 |
+
const XML_PATH_DEFAULT_STATUS_GROUPS = 'customer/customeractivation/require_activation_groups';
|
14 |
+
const STATUS_ACTIVATE_WITHOUT_EMAIL = 1;
|
15 |
+
const STATUS_ACTIVATE_WITH_EMAIL = 2;
|
16 |
+
const STATUS_DEACTIVATE = 0;
|
17 |
+
|
18 |
+
protected $_origEmailDesignConfig;
|
19 |
+
|
20 |
+
public function sendAdminNotificationEmail(Mage_Customer_Model_Customer $customer) {
|
21 |
+
$storeId = $this->getCustomerStoreId($customer);
|
22 |
+
if (Mage::getStoreConfig(self::XML_PATH_ALERT_ADMIN, $storeId)) {
|
23 |
+
$to = $this->_getEmails(self::XML_PATH_EMAIL_ADMIN_NOTIFICATION, $storeId);
|
24 |
+
$storeId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
25 |
+
$this->_sendNotificationEmail($to, $customer, self::XML_PATH_EMAIL_ADMIN_NOTIFICATION_TEMPLATE, $storeId);
|
26 |
+
}
|
27 |
+
return $this;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function sendCustomerNotificationEmail(Mage_Customer_Model_Customer $customer) {
|
31 |
+
if (Mage::getStoreConfig(self::XML_PATH_ALERT_CUSTOMER, $this->getCustomerStoreId($customer))) {
|
32 |
+
$to = array(array(
|
33 |
+
'name' => $customer->getName(),
|
34 |
+
'email' => $customer->getEmail(),
|
35 |
+
));
|
36 |
+
$this->_sendNotificationEmail($to, $customer, self::XML_PATH_EMAIL_CUSTOMER_NOTIFICATION_TEMPLATE);
|
37 |
+
}
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function _sendNotificationEmail($to, $customer, $templateConfigPath, $storeId = null) {
|
42 |
+
if (!$to)
|
43 |
+
return;
|
44 |
+
if (is_null($storeId)) {
|
45 |
+
$storeId = $this->getCustomerStoreId($customer);
|
46 |
+
}
|
47 |
+
$translate = Mage::getSingleton('core/translate')
|
48 |
+
->setTranslateInline(false);
|
49 |
+
$mailTemplate = Mage::getModel('core/email_template');
|
50 |
+
$template = Mage::getStoreConfig($templateConfigPath, $storeId);
|
51 |
+
$sendTo = array();
|
52 |
+
foreach ($to as $recipient) {
|
53 |
+
if (is_array($recipient)) {
|
54 |
+
$sendTo[] = $recipient;
|
55 |
+
} else {
|
56 |
+
$sendTo[] = array('email' => $recipient, 'name' => null);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->_setEmailDesignConfig($mailTemplate, $storeId);
|
61 |
+
foreach ($sendTo as $recipient) {
|
62 |
+
$mailTemplate->sendTransactional(
|
63 |
+
$template, Mage::getStoreConfig(Mage_Customer_Model_Customer::XML_PATH_REGISTER_EMAIL_IDENTITY, $storeId), $recipient['email'], $recipient['name'], array(
|
64 |
+
'customer' => $customer,
|
65 |
+
'shipping' => $customer->getPrimaryShippingAddress(),
|
66 |
+
'billing' => $customer->getPrimaryBillingAddress(),
|
67 |
+
'store' => Mage::app()->getStore(
|
68 |
+
// In case of admin store emails, $storeId is set to 0.
|
69 |
+
// We want 'store' to always be set to the customers store.
|
70 |
+
$this->getCustomerStoreId($customer)
|
71 |
+
),
|
72 |
+
)
|
73 |
+
);
|
74 |
+
}
|
75 |
+
$this->_revertEmailDesignConfig($mailTemplate);
|
76 |
+
$translate->setTranslateInline(true);
|
77 |
+
return $this;
|
78 |
+
}
|
79 |
+
|
80 |
+
protected function _setEmailDesignConfig(Mage_Core_Model_Email_Template $mailTemplate, $storeId) {
|
81 |
+
$this->_origEmailDesignConfig = null;
|
82 |
+
|
83 |
+
// Workaround for bug in Mage_Core_Model_Template where getDesignConfig is protected
|
84 |
+
if (is_callable(array($mailTemplate, 'getDesignConfig'))) {
|
85 |
+
// Use standard way to fetch the current design config (if possible)
|
86 |
+
$this->_origEmailDesignConfig = $mailTemplate->getDesignConfig();
|
87 |
+
} elseif (version_compare(phpversion(), '5.3.2', '>=')) {
|
88 |
+
// ReflectionMethod::setAccessible() is only available in 5.3.2 or newer
|
89 |
+
$method = new ReflectionMethod($mailTemplate, 'getDesignConfig');
|
90 |
+
if ($method->isProtected()) {
|
91 |
+
$method->setAccessible(true);
|
92 |
+
}
|
93 |
+
if ($this->_origEmailDesignConfig = $method->invoke($mailTemplate)) {
|
94 |
+
$this->_origEmailDesignConfig = $this->_origEmailDesignConfig->getData();
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
// Fallback if neither of the previous versions is available or if
|
99 |
+
// there was no design configuration set on the mail template instance
|
100 |
+
if (!$this->_origEmailDesignConfig) {
|
101 |
+
$this->_origEmailDesignConfig = array(
|
102 |
+
'area' => Mage::app()->getStore()->isAdmin() ? 'adminhtml' : 'frontend',
|
103 |
+
'store' => Mage::app()->getStore()->getId()
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
+
$mailTemplate->setDesignConfig(array(
|
108 |
+
'area' => Mage::app()->getStore($storeId)->isAdmin() ? 'adminhtml' : 'frontend',
|
109 |
+
'store' => $storeId)
|
110 |
+
);
|
111 |
+
|
112 |
+
return $this;
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function _revertEmailDesignConfig(Mage_Core_Model_Email_Template $mailTemplate) {
|
116 |
+
$mailTemplate->setDesignConfig($this->_origEmailDesignConfig);
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
|
120 |
+
protected function _getEmails($configPath, $storeId = null) {
|
121 |
+
$data = Mage::getStoreConfig($configPath, $storeId);
|
122 |
+
if (!empty($data)) {
|
123 |
+
return explode(',', $data);
|
124 |
+
}
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getCustomerStoreId(Mage_Customer_Model_Customer $customer) {
|
129 |
+
if (!($storeId = $customer->getSendemailStoreId())) {
|
130 |
+
/*
|
131 |
+
* store_id might be zero if the account was created in the admin interface
|
132 |
+
*/
|
133 |
+
$storeId = $customer->getStoreId();
|
134 |
+
if (!$storeId && $customer->getWebsiteId()) {
|
135 |
+
/*
|
136 |
+
* Use the default store groups store of the customers website
|
137 |
+
*/
|
138 |
+
if ($store = Mage::app()->getWebsite($customer->getWebsiteId())->getDefaultStore()) {
|
139 |
+
$storeId = $store->getId();
|
140 |
+
}
|
141 |
+
}
|
142 |
+
// In case the website_id is not yet set on the customer, and the
|
143 |
+
// current store is a frontend store, use the current store ID
|
144 |
+
if (!$storeId && !Mage::app()->getStore()->isAdmin()) {
|
145 |
+
$storeId = Mage::app()->getStore()->getId();
|
146 |
+
}
|
147 |
+
}
|
148 |
+
return $storeId;
|
149 |
+
}
|
150 |
+
|
151 |
+
public function getDefaultActivationStatus($groupId, $storeId) {
|
152 |
+
$defaultIsActive = Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS, $storeId);
|
153 |
+
$activateByGroup = Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_BY_GROUP, $storeId);
|
154 |
+
|
155 |
+
if (!$defaultIsActive && $activateByGroup) {
|
156 |
+
$notActiveGroups = explode(',', Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_GROUPS, $storeId));
|
157 |
+
$isActive = in_array($groupId, $notActiveGroups) ? false : true;
|
158 |
+
} else {
|
159 |
+
$isActive = $defaultIsActive;
|
160 |
+
}
|
161 |
+
|
162 |
+
return $isActive;
|
163 |
+
}
|
164 |
+
|
165 |
+
public function getCustomerGroupId() {
|
166 |
+
return Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_GROUPS, Mage::app()->getStore());
|
167 |
+
}
|
168 |
+
public function sendCustomer1NotificationEmail(Mage_Customer_Model_Customer $customer)
|
169 |
+
{
|
170 |
+
if (Mage::getStoreConfig(self::XML_PATH_ALERT_CUSTOMER, $this->getCustomerStoreId($customer))) {
|
171 |
+
$to = array(array(
|
172 |
+
'name' => $customer->getName(),
|
173 |
+
'email' => $customer->getEmail(),
|
174 |
+
));
|
175 |
+
$this->_sendNotificationEmail($to, $customer, self::XML_PATH_EMAIL_CUSTOMER_NOTIFICATION_TEMPLATE1);
|
176 |
+
}
|
177 |
+
return $this;
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Categories → Config/Source/Categories/Group}/Multiselect.php
RENAMED
@@ -1,27 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
|
5 |
-
protected $_options;
|
6 |
-
|
7 |
-
public function toOptionArray() {
|
8 |
-
if (!$this->_options) {
|
9 |
-
$categoryCollection = Mage::getModel('catalog/category')
|
10 |
-
->getCollection()
|
11 |
-
->addAttributeToFilter('parent_id', array('gt' => 1))
|
12 |
-
->addAttributeToSelect('*')
|
13 |
-
->addIsActiveFilter();
|
14 |
-
}
|
15 |
-
$optionArrays = array();
|
16 |
-
foreach ($categoryCollection as $category) {
|
17 |
-
$optionArray = array();
|
18 |
-
$optionArray['value'] = $category->getUrlKey();
|
19 |
-
$optionArray['label'] = $category->getName();
|
20 |
-
array_push($optionArrays, $optionArray);
|
21 |
-
}
|
22 |
-
$this->_options = $optionArrays;
|
23 |
-
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Category Selected')));
|
24 |
-
return $this->_options;
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Adminhtml_System_Config_Source_Categories_Group_Multiselect {
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray() {
|
8 |
+
if (!$this->_options) {
|
9 |
+
$categoryCollection = Mage::getModel('catalog/category')
|
10 |
+
->getCollection()
|
11 |
+
->addAttributeToFilter('parent_id', array('gt' => 1))
|
12 |
+
->addAttributeToSelect('*')
|
13 |
+
->addIsActiveFilter();
|
14 |
+
}
|
15 |
+
$optionArrays = array();
|
16 |
+
foreach ($categoryCollection as $category) {
|
17 |
+
$optionArray = array();
|
18 |
+
$optionArray['value'] = $category->getUrlKey();
|
19 |
+
$optionArray['label'] = $category->getName();
|
20 |
+
array_push($optionArrays, $optionArray);
|
21 |
+
}
|
22 |
+
$this->_options = $optionArrays;
|
23 |
+
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Category Selected')));
|
24 |
+
return $this->_options;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Customer → Config/Source/Customer/Group}/Multiselect.php
RENAMED
@@ -1,18 +1,18 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
|
5 |
-
protected $_options;
|
6 |
-
|
7 |
-
public function toOptionArray() {
|
8 |
-
if (!$this->_options) {
|
9 |
-
$this->_options = Mage::getResourceModel('customer/group_collection')
|
10 |
-
->setRealGroupsFilter()
|
11 |
-
->addFieldToFilter('customer_group_id', array('neq' => 1))
|
12 |
-
->loadData()->toOptionArray();
|
13 |
-
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Group Selected')));
|
14 |
-
}
|
15 |
-
return $this->_options;
|
16 |
-
}
|
17 |
-
|
18 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Adminhtml_System_Config_Source_Customer_Group_Multiselect {
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray() {
|
8 |
+
if (!$this->_options) {
|
9 |
+
$this->_options = Mage::getResourceModel('customer/group_collection')
|
10 |
+
->setRealGroupsFilter()
|
11 |
+
->addFieldToFilter('customer_group_id', array('neq' => 1))
|
12 |
+
->loadData()->toOptionArray();
|
13 |
+
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Group Selected')));
|
14 |
+
}
|
15 |
+
return $this->_options;
|
16 |
+
}
|
17 |
+
|
18 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Pages → Config/Source/Pages/Group}/Multiselect.php
RENAMED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
|
5 |
-
protected $_options;
|
6 |
-
|
7 |
-
public function toOptionArray() {
|
8 |
-
if (!$this->_options) {
|
9 |
-
$this->_options = Mage::getModel('cms/page')->getCollection()
|
10 |
-
|
11 |
-
->addFieldToFilter('is_active',1)
|
12 |
-
->addFieldToFilter('identifier',array(array('nin'=>array('home','enable-cookies'))))->toOptionArray();
|
13 |
-
// echo '<pre>';print_r($this->_options);
|
14 |
-
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No page Selected')));
|
15 |
-
}
|
16 |
-
return $this->_options;
|
17 |
-
}
|
18 |
-
|
19 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Adminhtml_System_Config_Source_Pages_Group_Multiselect {
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray() {
|
8 |
+
if (!$this->_options) {
|
9 |
+
$this->_options = Mage::getModel('cms/page')->getCollection()
|
10 |
+
|
11 |
+
->addFieldToFilter('is_active',1)
|
12 |
+
->addFieldToFilter('identifier',array(array('nin'=>array('home','enable-cookies'))))->toOptionArray();
|
13 |
+
// echo '<pre>';print_r($this->_options);
|
14 |
+
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No page Selected')));
|
15 |
+
}
|
16 |
+
return $this->_options;
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Products → Config/Source/Products}/Group/Multiselect.php
RENAMED
@@ -1,26 +1,33 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
|
5 |
-
protected $_options;
|
6 |
-
|
7 |
-
public function toOptionArray() {
|
8 |
-
if (!$this->_options) {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
}
|
21 |
-
$
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Adminhtml_System_Config_Source_Products_Group_Multiselect {
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray() {
|
8 |
+
if (!$this->_options) {
|
9 |
+
|
10 |
+
$categoryCollection = Mage::getResourceModel('catalog/product_collection')
|
11 |
+
->addAttributeToFilter('type_id', array('eq' => 'simple'))
|
12 |
+
->addAttributeToFilter('status', array('eq' => '1'))
|
13 |
+
->addAttributeToSelect('*');
|
14 |
+
$categoryCollection->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
15 |
+
|
16 |
+
/*$categoryCollection = Mage::getModel('catalog/product')
|
17 |
+
->getCollection()
|
18 |
+
->addAttributeToFilter('status', array('eq'=>'1'))
|
19 |
+
->addAttributeToSelect('*');*/
|
20 |
+
}
|
21 |
+
$optionArrays = array();
|
22 |
+
foreach ($categoryCollection as $category) {
|
23 |
+
$optionArray = array();
|
24 |
+
$optionArray['value'] = $category->getUrlKey();
|
25 |
+
$optionArray['label'] = $category->getName();
|
26 |
+
array_push($optionArrays, $optionArray);
|
27 |
+
}
|
28 |
+
$this->_options = $optionArrays;
|
29 |
+
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Product Selected')));
|
30 |
+
return $this->_options;
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Adminhtml/System/{Products → Config/Source/Products}/Price/Multiselect.php
RENAMED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
|
5 |
-
protected $_options;
|
6 |
-
|
7 |
-
public function toOptionArray() {
|
8 |
-
if (!$this->_options) {
|
9 |
-
$categoryCollection = Mage::getModel('catalog/product')
|
10 |
-
->getCollection()
|
11 |
-
->addAttributeToSelect('*');
|
12 |
-
}
|
13 |
-
$optionArrays = array();
|
14 |
-
foreach ($categoryCollection as $category) {
|
15 |
-
$optionArray = array();
|
16 |
-
$optionArray['value'] = $category->getUrlKey();
|
17 |
-
$optionArray['label'] = $category->getName();
|
18 |
-
array_push($optionArrays, $optionArray);
|
19 |
-
}
|
20 |
-
$this->_options = $optionArrays;
|
21 |
-
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Product Selected')));
|
22 |
-
return $this->_options;
|
23 |
-
}
|
24 |
-
|
25 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Adminhtml_System_Config_Source_Products_Price_Multiselect {
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray() {
|
8 |
+
if (!$this->_options) {
|
9 |
+
$categoryCollection = Mage::getModel('catalog/product')
|
10 |
+
->getCollection()
|
11 |
+
->addAttributeToSelect('*');
|
12 |
+
}
|
13 |
+
$optionArrays = array();
|
14 |
+
foreach ($categoryCollection as $category) {
|
15 |
+
$optionArray = array();
|
16 |
+
$optionArray['value'] = $category->getUrlKey();
|
17 |
+
$optionArray['label'] = $category->getName();
|
18 |
+
array_push($optionArrays, $optionArray);
|
19 |
+
}
|
20 |
+
$this->_options = $optionArrays;
|
21 |
+
array_unshift($this->_options, array('value' => '', 'label' => Mage::helper('adminhtml')->__('No Product Selected')));
|
22 |
+
return $this->_options;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Customer.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Customer extends Mage_Customer_Model_Customer {
|
4 |
-
|
5 |
-
public function authenticate($login, $password) {
|
6 |
-
$groupid = Mage::registry('groupId');
|
7 |
-
if ($groupid == 2) {
|
8 |
-
$collection = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('uniquelogin_id', $login);
|
9 |
-
$custData = $collection->getData();
|
10 |
-
$login = $custData[0]['email'];
|
11 |
-
}
|
12 |
-
return parent::authenticate($login, $password);
|
13 |
-
}
|
14 |
-
|
15 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Customer extends Mage_Customer_Model_Customer {
|
4 |
+
|
5 |
+
public function authenticate($login, $password) {
|
6 |
+
$groupid = Mage::registry('groupId');
|
7 |
+
if ($groupid == 2) {
|
8 |
+
$collection = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('uniquelogin_id', $login);
|
9 |
+
$custData = $collection->getData();
|
10 |
+
$login = $custData[0]['email'];
|
11 |
+
}
|
12 |
+
return parent::authenticate($login, $password);
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Info.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Info extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
|
8 |
-
}
|
9 |
-
|
10 |
-
public function saveSubscrition($productId, $email)
|
11 |
-
{
|
12 |
-
Mage::getResourceSingleton('outofstocksubscription/info')->saveSubscrition($productId, $email);
|
13 |
-
}
|
14 |
-
|
15 |
-
public function deleteSubscrition($id)
|
16 |
-
{
|
17 |
-
Mage::getResourceSingleton('outofstocksubscription/info')->deleteSubscrition($id);
|
18 |
-
}
|
19 |
-
|
20 |
-
public function getProducts()
|
21 |
-
{
|
22 |
-
return Mage::getResourceSingleton('outofstocksubscription/info')->getProducts();
|
23 |
-
}
|
24 |
-
|
25 |
-
public function saveProductAttributesInfo($productId, $supplier, $supplierSku)
|
26 |
-
{
|
27 |
-
Mage::getResourceSingleton('outofstocksubscription/info')->saveProductAttributesInfo($productId, $supplier, $supplierSku);
|
28 |
-
}
|
29 |
-
|
30 |
-
public function getSupplierAttributeId()
|
31 |
-
{
|
32 |
-
return Mage::getResourceSingleton('outofstocksubscription/info')->getSupplierAttributeId();
|
33 |
-
}
|
34 |
-
|
35 |
-
public function getSupplierValues($supplierAttributeId)
|
36 |
-
{
|
37 |
-
return Mage::getResourceSingleton('outofstocksubscription/info')->getSupplierValues($supplierAttributeId);
|
38 |
-
}
|
39 |
-
|
40 |
-
public function getCollection()
|
41 |
-
{
|
42 |
-
return Mage::getResourceSingleton('outofstocksubscription/info')->getCollection();
|
43 |
-
}
|
44 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Info extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
public function saveSubscrition($productId, $email)
|
11 |
+
{
|
12 |
+
Mage::getResourceSingleton('outofstocksubscription/info')->saveSubscrition($productId, $email);
|
13 |
+
}
|
14 |
+
|
15 |
+
public function deleteSubscrition($id)
|
16 |
+
{
|
17 |
+
Mage::getResourceSingleton('outofstocksubscription/info')->deleteSubscrition($id);
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getProducts()
|
21 |
+
{
|
22 |
+
return Mage::getResourceSingleton('outofstocksubscription/info')->getProducts();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function saveProductAttributesInfo($productId, $supplier, $supplierSku)
|
26 |
+
{
|
27 |
+
Mage::getResourceSingleton('outofstocksubscription/info')->saveProductAttributesInfo($productId, $supplier, $supplierSku);
|
28 |
+
}
|
29 |
+
|
30 |
+
public function getSupplierAttributeId()
|
31 |
+
{
|
32 |
+
return Mage::getResourceSingleton('outofstocksubscription/info')->getSupplierAttributeId();
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getSupplierValues($supplierAttributeId)
|
36 |
+
{
|
37 |
+
return Mage::getResourceSingleton('outofstocksubscription/info')->getSupplierValues($supplierAttributeId);
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getCollection()
|
41 |
+
{
|
42 |
+
return Mage::getResourceSingleton('outofstocksubscription/info')->getCollection();
|
43 |
+
}
|
44 |
}
|
app/code/community/Exinent/CustomerActivation/Model/Mysql4/Info.php
CHANGED
@@ -1,76 +1,76 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Mysql4_Info extends Mage_Core_Model_Mysql4_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('core/store', 'store_id');
|
8 |
-
}
|
9 |
-
|
10 |
-
public function saveSubscrition($productId, $email)
|
11 |
-
{
|
12 |
-
$write = $this->_getWriteAdapter();
|
13 |
-
$read = $this->_getReadAdapter();
|
14 |
-
|
15 |
-
$select = $read->select()
|
16 |
-
->from($this->getTable('outofstocksubscription/info'))
|
17 |
-
->where("product_id = ".$productId." AND email = '".$email."'");
|
18 |
-
$result = $read->fetchRow($select);
|
19 |
-
|
20 |
-
if (!isset($result['id'])) {
|
21 |
-
$write->insert($this->getTable('outofstocksubscription/info'), array('product_id'=>$productId, 'email'=>$email, 'date'=>date('Y-m-d H:i:s')));
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
public function deleteSubscrition($id)
|
26 |
-
{
|
27 |
-
if ($id)
|
28 |
-
{
|
29 |
-
$write = $this->_getWriteAdapter();
|
30 |
-
$write->delete($this->getTable('outofstocksubscription/info'), 'id='.$id);
|
31 |
-
}
|
32 |
-
}
|
33 |
-
|
34 |
-
public function getProducts()
|
35 |
-
{
|
36 |
-
$read = $this->_getReadAdapter();
|
37 |
-
|
38 |
-
$select = "SELECT DISTINCT(product_id) FROM ".$this->getTable('outofstocksubscription/info');
|
39 |
-
|
40 |
-
return $read->fetchAll($select);
|
41 |
-
}
|
42 |
-
|
43 |
-
public function getSubscriptions($productId)
|
44 |
-
{
|
45 |
-
$read = $this->_getReadAdapter();
|
46 |
-
|
47 |
-
$select = $read->select()
|
48 |
-
->from($this->getTable('outofstocksubscription/info'))
|
49 |
-
->where("product_id = ".$productId);
|
50 |
-
|
51 |
-
return $read->fetchAll($select);
|
52 |
-
}
|
53 |
-
|
54 |
-
public function deleteSubscription($id)
|
55 |
-
{
|
56 |
-
$write = $this->_getWriteAdapter();
|
57 |
-
$write->delete($this->getTable('outofstocksubscription/info'), 'id='.$id);
|
58 |
-
}
|
59 |
-
|
60 |
-
public function getAttributeId()
|
61 |
-
{
|
62 |
-
$read = $this->_getReadAdapter();
|
63 |
-
|
64 |
-
$select = $read->select()
|
65 |
-
->from('eav_entity_type', 'entity_type_id')
|
66 |
-
->where("entity_type_code = 'catalog_product'");
|
67 |
-
$entityTypeId = $read->fetchOne($select);
|
68 |
-
if (!$entityTypeId) {
|
69 |
-
$entityTypeId = 4;
|
70 |
-
}
|
71 |
-
$select = $read->select()
|
72 |
-
->from('eav_attribute', 'attribute_id')
|
73 |
-
->where("entity_type_id = ".$entityTypeId." AND attribute_code = 'name'");
|
74 |
-
return $read->fetchOne($select);
|
75 |
-
}
|
76 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Mysql4_Info extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('core/store', 'store_id');
|
8 |
+
}
|
9 |
+
|
10 |
+
public function saveSubscrition($productId, $email)
|
11 |
+
{
|
12 |
+
$write = $this->_getWriteAdapter();
|
13 |
+
$read = $this->_getReadAdapter();
|
14 |
+
|
15 |
+
$select = $read->select()
|
16 |
+
->from($this->getTable('outofstocksubscription/info'))
|
17 |
+
->where("product_id = ".$productId." AND email = '".$email."'");
|
18 |
+
$result = $read->fetchRow($select);
|
19 |
+
|
20 |
+
if (!isset($result['id'])) {
|
21 |
+
$write->insert($this->getTable('outofstocksubscription/info'), array('product_id'=>$productId, 'email'=>$email, 'date'=>date('Y-m-d H:i:s')));
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
public function deleteSubscrition($id)
|
26 |
+
{
|
27 |
+
if ($id)
|
28 |
+
{
|
29 |
+
$write = $this->_getWriteAdapter();
|
30 |
+
$write->delete($this->getTable('outofstocksubscription/info'), 'id='.$id);
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getProducts()
|
35 |
+
{
|
36 |
+
$read = $this->_getReadAdapter();
|
37 |
+
|
38 |
+
$select = "SELECT DISTINCT(product_id) FROM ".$this->getTable('outofstocksubscription/info');
|
39 |
+
|
40 |
+
return $read->fetchAll($select);
|
41 |
+
}
|
42 |
+
|
43 |
+
public function getSubscriptions($productId)
|
44 |
+
{
|
45 |
+
$read = $this->_getReadAdapter();
|
46 |
+
|
47 |
+
$select = $read->select()
|
48 |
+
->from($this->getTable('outofstocksubscription/info'))
|
49 |
+
->where("product_id = ".$productId);
|
50 |
+
|
51 |
+
return $read->fetchAll($select);
|
52 |
+
}
|
53 |
+
|
54 |
+
public function deleteSubscription($id)
|
55 |
+
{
|
56 |
+
$write = $this->_getWriteAdapter();
|
57 |
+
$write->delete($this->getTable('outofstocksubscription/info'), 'id='.$id);
|
58 |
+
}
|
59 |
+
|
60 |
+
public function getAttributeId()
|
61 |
+
{
|
62 |
+
$read = $this->_getReadAdapter();
|
63 |
+
|
64 |
+
$select = $read->select()
|
65 |
+
->from('eav_entity_type', 'entity_type_id')
|
66 |
+
->where("entity_type_code = 'catalog_product'");
|
67 |
+
$entityTypeId = $read->fetchOne($select);
|
68 |
+
if (!$entityTypeId) {
|
69 |
+
$entityTypeId = 4;
|
70 |
+
}
|
71 |
+
$select = $read->select()
|
72 |
+
->from('eav_attribute', 'attribute_id')
|
73 |
+
->where("entity_type_id = ".$entityTypeId." AND attribute_code = 'name'");
|
74 |
+
return $read->fetchOne($select);
|
75 |
+
}
|
76 |
}
|
app/code/community/Exinent/CustomerActivation/Model/Mysql4/Subscriber.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Mysql4_Subscriber extends Mage_Core_Model_Mysql4_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('outofstocksubscription/info', 'id');
|
8 |
-
}
|
9 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Mysql4_Subscriber extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('outofstocksubscription/info', 'id');
|
8 |
+
}
|
9 |
}
|
app/code/community/Exinent/CustomerActivation/Model/Mysql4/Subscriber/Collection.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @category BusinessKing
|
5 |
-
* @package BusinessKing_OutofStockSubscription
|
6 |
-
*/
|
7 |
-
class Exinent_CustomerActivation_Model_Mysql4_Subscriber_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* Initialize collection
|
11 |
-
*
|
12 |
-
*/
|
13 |
-
protected function _construct()
|
14 |
-
{
|
15 |
-
$this->_init('outofstocksubscription/subscriber');
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _initSelect()
|
19 |
-
{
|
20 |
-
parent::_initSelect();
|
21 |
-
//$attributeId = Mage::getResourceSingleton('outofstocksubscription/info')->getAttributeId();
|
22 |
-
$this->getSelect()->join(array("cpe" => 'catalog_product_entity'), 'main_table.product_id=cpe.entity_id', array('sku'=>'cpe.sku'));
|
23 |
-
//$this->getSelect()->join(array("cpev" => 'catalog_product_entity_varchar'), 'cpe.entity_id=cpev.entity_id', array('value'=>'cpev.value'));
|
24 |
-
//$this->getSelect()->where("cpev.attribute_id=".$attributeId);
|
25 |
-
|
26 |
-
//$this->getSelect()->group("con.ticket_id");
|
27 |
-
//$this->getSelect()->order("con.comment_date DESC");
|
28 |
-
//exit($this->getSelect());
|
29 |
-
}
|
30 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @category BusinessKing
|
5 |
+
* @package BusinessKing_OutofStockSubscription
|
6 |
+
*/
|
7 |
+
class Exinent_CustomerActivation_Model_Mysql4_Subscriber_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Initialize collection
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
protected function _construct()
|
14 |
+
{
|
15 |
+
$this->_init('outofstocksubscription/subscriber');
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _initSelect()
|
19 |
+
{
|
20 |
+
parent::_initSelect();
|
21 |
+
//$attributeId = Mage::getResourceSingleton('outofstocksubscription/info')->getAttributeId();
|
22 |
+
$this->getSelect()->join(array("cpe" => 'catalog_product_entity'), 'main_table.product_id=cpe.entity_id', array('sku'=>'cpe.sku'));
|
23 |
+
//$this->getSelect()->join(array("cpev" => 'catalog_product_entity_varchar'), 'cpe.entity_id=cpev.entity_id', array('value'=>'cpev.value'));
|
24 |
+
//$this->getSelect()->where("cpev.attribute_id=".$attributeId);
|
25 |
+
|
26 |
+
//$this->getSelect()->group("con.ticket_id");
|
27 |
+
//$this->getSelect()->order("con.comment_date DESC");
|
28 |
+
//exit($this->getSelect());
|
29 |
+
}
|
30 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Net15.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Net15 extends Mage_Payment_Model_Method_Abstract {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* unique internal payment method identifier
|
7 |
-
*
|
8 |
-
* @var string [a-z0-9_]
|
9 |
-
*/
|
10 |
-
protected $_code = 'net15';
|
11 |
-
protected $_formBlockType = 'customeractivation/purchaseorder';
|
12 |
-
protected $_infoBlockType = 'customeractivation/purchaseorderinfo';
|
13 |
-
|
14 |
-
public function assignData($data) {
|
15 |
-
if (!($data instanceof Varien_Object)) {
|
16 |
-
$data = new Varien_Object($data);
|
17 |
-
}
|
18 |
-
|
19 |
-
$this->getInfoInstance()->setPoNumber($data->getPoNumber());
|
20 |
-
|
21 |
-
|
22 |
-
return $this;
|
23 |
-
}
|
24 |
-
|
25 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Net15 extends Mage_Payment_Model_Method_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* unique internal payment method identifier
|
7 |
+
*
|
8 |
+
* @var string [a-z0-9_]
|
9 |
+
*/
|
10 |
+
protected $_code = 'net15';
|
11 |
+
protected $_formBlockType = 'customeractivation/purchaseorder';
|
12 |
+
protected $_infoBlockType = 'customeractivation/purchaseorderinfo';
|
13 |
+
|
14 |
+
public function assignData($data) {
|
15 |
+
if (!($data instanceof Varien_Object)) {
|
16 |
+
$data = new Varien_Object($data);
|
17 |
+
}
|
18 |
+
|
19 |
+
$this->getInfoInstance()->setPoNumber($data->getPoNumber());
|
20 |
+
|
21 |
+
|
22 |
+
return $this;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Net30.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Net30 extends Mage_Payment_Model_Method_Purchaseorder {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* unique internal payment method identifier
|
7 |
-
*
|
8 |
-
* @var string [a-z0-9_]
|
9 |
-
*/
|
10 |
-
protected $_code = 'net30';
|
11 |
-
protected $_formBlockType = 'customeractivation/purchaseorder';
|
12 |
-
protected $_infoBlockType = 'customeractivation/purchaseorderinfo';
|
13 |
-
|
14 |
-
public function assignData($data) {
|
15 |
-
if (!($data instanceof Varien_Object)) {
|
16 |
-
$data = new Varien_Object($data);
|
17 |
-
}
|
18 |
-
|
19 |
-
$this->getInfoInstance()->setPoNumber($data->getPoNumber());
|
20 |
-
|
21 |
-
|
22 |
-
return $this;
|
23 |
-
}
|
24 |
-
|
25 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Net30 extends Mage_Payment_Model_Method_Purchaseorder {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* unique internal payment method identifier
|
7 |
+
*
|
8 |
+
* @var string [a-z0-9_]
|
9 |
+
*/
|
10 |
+
protected $_code = 'net30';
|
11 |
+
protected $_formBlockType = 'customeractivation/purchaseorder';
|
12 |
+
protected $_infoBlockType = 'customeractivation/purchaseorderinfo';
|
13 |
+
|
14 |
+
public function assignData($data) {
|
15 |
+
if (!($data instanceof Varien_Object)) {
|
16 |
+
$data = new Varien_Object($data);
|
17 |
+
}
|
18 |
+
|
19 |
+
$this->getInfoInstance()->setPoNumber($data->getPoNumber());
|
20 |
+
|
21 |
+
|
22 |
+
return $this;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Observer.php
CHANGED
@@ -1,337 +1,337 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Observer {
|
4 |
-
|
5 |
-
const XML_PATH_MODULE_DISABLED = 'customer/customeractivation/disable_ext';
|
6 |
-
const XML_PATH_ALWAYS_NOTIFY_ADMIN = 'customer/customeractivation/always_send_admin_email';
|
7 |
-
const XML_PATH_ACTIVATION_STATUS = 'customer/customeractivation/activation_status_default';
|
8 |
-
const XML_PATH_ACTIVATION_START_DATE = 'customer/customeractivation/date_start';
|
9 |
-
const XML_PATH_ACTIVATION_END_DATE = 'customer/customeractivation/date_end';
|
10 |
-
|
11 |
-
public function page_block_html_topmenu_gethtml_before(Varien_Event_Observer $observer) {
|
12 |
-
|
13 |
-
$session = Mage::getSingleton('customer/session');
|
14 |
-
$customerGroupId = $session->getCustomerGroupId();
|
15 |
-
if ($customerGroupId == 2) {
|
16 |
-
$event = $observer->getEvent();
|
17 |
-
$menu = $event->getMenu();
|
18 |
-
$menuCollection = $menu->getChildren();
|
19 |
-
|
20 |
-
if ($block = Mage::app()->getLayout()->getBlock('catalog.topnav')) {
|
21 |
-
if ($links = $block->getAdditionalLinks()) {
|
22 |
-
foreach ($links as $link) {
|
23 |
-
$data = array(
|
24 |
-
'id' => 'category-additionalnode-' . crc32($link['url']),
|
25 |
-
'name' => $link['label'],
|
26 |
-
'url' => $link['url'],
|
27 |
-
'is_active' => $link['is_active'],
|
28 |
-
);
|
29 |
-
|
30 |
-
$node = new Varien_Data_Tree_Node($data, 'id', $menu->getTree());
|
31 |
-
$menuCollection->add($node);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
public function customerLogin($observer) {
|
39 |
-
|
40 |
-
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, Mage::app()->getStore()) == 0) {
|
41 |
-
return;
|
42 |
-
}
|
43 |
-
|
44 |
-
if ($this->_isApiRequest()) {
|
45 |
-
return;
|
46 |
-
}
|
47 |
-
|
48 |
-
$customer = $observer->getEvent()->getCustomer();
|
49 |
-
if ($customer->getGroupId() == '1') {
|
50 |
-
return;
|
51 |
-
}
|
52 |
-
$session = Mage::getSingleton('customer/session');
|
53 |
-
|
54 |
-
if ($customer->getCustomerActivated() == 'New' || $customer->getCustomerActivated() == 2 || $customer->getCustomerActivated() == 0 || $customer->getCustomerActivated() == 4 || $customer->getCustomerActivated() == 5) {
|
55 |
-
/*
|
56 |
-
* Fake the old logout() method without deleting the session and all messages
|
57 |
-
*///echo 'status'.$customer->getCustomerActivated();
|
58 |
-
|
59 |
-
$session->setCustomer(Mage::getModel('customer/customer'))
|
60 |
-
->setId(null)
|
61 |
-
->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
|
62 |
-
if ($this->_checkRequestRoute('customer', 'account', 'createpost') || $session->getNewRegistration() == 1) {
|
63 |
-
/*
|
64 |
-
* If this is a regular registration, simply display message
|
65 |
-
*/
|
66 |
-
$message = Mage::helper('customeractivation')->__('Thank you! Admin representative will contact you shortly regarding your application.');
|
67 |
-
|
68 |
-
$session->addSuccess($message);
|
69 |
-
$session->setNewRegistration(0);
|
70 |
-
} else {
|
71 |
-
/*
|
72 |
-
* All other types of login
|
73 |
-
*/
|
74 |
-
Mage::throwException(Mage::helper('customeractivation')->__('This account is not approved.'));
|
75 |
-
}
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
public function customerSaveBefore($observer) {
|
80 |
-
$customer = $observer->getEvent()->getCustomer();
|
81 |
-
|
82 |
-
|
83 |
-
$storeId = Mage::helper('customeractivation')->getCustomerStoreId($customer);
|
84 |
-
|
85 |
-
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $storeId) == 0) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
if (!$customer->getId()) {
|
90 |
-
$customer->setCustomerActivationNewAccount(true);
|
91 |
-
if (!(Mage::app()->getStore()->isAdmin() && $this->_checkControllerAction('customer', 'save'))) {
|
92 |
-
// Do not set the default status on the admin customer edit save action
|
93 |
-
$groupId = $customer->getGroupId();
|
94 |
-
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
95 |
-
$startdate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_START_DATE, Mage::app()->getStore());
|
96 |
-
$enddate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_END_DATE, Mage::app()->getStore());
|
97 |
-
|
98 |
-
$paymentDate = date('Y-m-d');
|
99 |
-
$paymentDate = date('Y-m-d', strtotime($paymentDate));
|
100 |
-
|
101 |
-
$contractDateBegin = date('Y-m-d', strtotime($startdate));
|
102 |
-
$contractDateEnd = date('Y-m-d', strtotime($enddate));
|
103 |
-
|
104 |
-
if ($paymentDate > $contractDateBegin && $paymentDate < $contractDateEnd) {
|
105 |
-
|
106 |
-
$date_range = 'between';
|
107 |
-
} else if ($paymentDate > $contractDateBegin && $enddate == '') {
|
108 |
-
$date_range = 'notmentioned';
|
109 |
-
|
110 |
-
} else {
|
111 |
-
$date_range = 'notin';
|
112 |
-
}
|
113 |
-
|
114 |
-
$groupId = $customer->getGroupId();
|
115 |
-
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
116 |
-
if ($customer->getGroupId() == 1) {
|
117 |
-
$customer->setCustomerActivated('1');
|
118 |
-
} else if (Mage::getStoreConfig(self::XML_PATH_ACTIVATION_STATUS, Mage::app()->getStore()) == 1) {
|
119 |
-
if(($date_range == 'between') || ($date_range == 'notmentioned')) {
|
120 |
-
$customer->setCustomerActivated('1');
|
121 |
-
}
|
122 |
-
} else {
|
123 |
-
$customer->setCustomerActivated('New');
|
124 |
-
}
|
125 |
-
|
126 |
-
|
127 |
-
if (!$defaultStatus) {
|
128 |
-
// Suppress the "enter your billing address for VAT validation" message.
|
129 |
-
// This setting will not be saved, its just for this request.
|
130 |
-
$helper = Mage::helper('customer/address');
|
131 |
-
if (method_exists($helper, 'isVatValidationEnabled')) {
|
132 |
-
if (is_callable(array($helper, 'isVatValidationEnabled'))) {
|
133 |
-
if (Mage::helper('customer/address')->isVatValidationEnabled($storeId)) {
|
134 |
-
Mage::app()->getStore($storeId)->setConfig(
|
135 |
-
Mage_Customer_Helper_Address::XML_PATH_VAT_VALIDATION_ENABLED, false
|
136 |
-
);
|
137 |
-
}
|
138 |
-
}
|
139 |
-
}
|
140 |
-
}
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
public function customerSaveAfter($observer) {
|
146 |
-
/** @var Mage_Customer_Model_Customer $customer */
|
147 |
-
$customer = $observer->getEvent()->getCustomer();
|
148 |
-
|
149 |
-
$storeId = Mage::helper('customeractivation')->getCustomerStoreId($customer);
|
150 |
-
|
151 |
-
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $storeId) == 0) {
|
152 |
-
return;
|
153 |
-
}
|
154 |
-
|
155 |
-
$startdate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_START_DATE, Mage::app()->getStore());
|
156 |
-
$enddate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_END_DATE, Mage::app()->getStore());
|
157 |
-
|
158 |
-
$paymentDate = date('Y-m-d');
|
159 |
-
$paymentDate = date('Y-m-d', strtotime($paymentDate));
|
160 |
-
|
161 |
-
$contractDateBegin = date('Y-m-d', strtotime($startdate));
|
162 |
-
$contractDateEnd = date('Y-m-d', strtotime($enddate));
|
163 |
-
|
164 |
-
|
165 |
-
if ($paymentDate > $contractDateBegin && $paymentDate < $contractDateEnd) {
|
166 |
-
$date_range = 'between';
|
167 |
-
} else if ($paymentDate > $contractDateBegin && $enddate == '') {
|
168 |
-
$date_range = 'notmentioned';
|
169 |
-
} else {
|
170 |
-
$date_range = 'notin';
|
171 |
-
}
|
172 |
-
|
173 |
-
$groupId = $customer->getGroupId();
|
174 |
-
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
175 |
-
|
176 |
-
|
177 |
-
if ($customer->getGroupId() == 1) {
|
178 |
-
$customer->setCustomerActivated('1');
|
179 |
-
} else if (Mage::getStoreConfig(self::XML_PATH_ACTIVATION_STATUS, Mage::app()->getStore()) == 1) {
|
180 |
-
if(($date_range == 'between') || ($date_range == 'notmentioned')) {
|
181 |
-
$customer->setCustomerActivated('1');
|
182 |
-
}
|
183 |
-
} else {
|
184 |
-
$customer->setCustomerActivated('New');
|
185 |
-
}
|
186 |
-
|
187 |
-
try {
|
188 |
-
if (Mage::app()->getStore()->isAdmin()) {
|
189 |
-
if (!$customer->getOrigData('customer_activated') && $customer->getCustomerActivated()) {
|
190 |
-
// Send customer email only if it isn't a new account and it isn't activated by default
|
191 |
-
if (!($customer->getCustomerActivationNewAccount() && $defaultStatus)) {
|
192 |
-
Mage::helper('customeractivation')->sendCustomerNotificationEmail($customer);
|
193 |
-
}
|
194 |
-
}
|
195 |
-
} else {
|
196 |
-
if ($customer->getCustomerActivationNewAccount()) {
|
197 |
-
// Only notify the admin if the default is deactivated or the "always notify" flag is configured
|
198 |
-
$alwaysNotify = Mage::getStoreConfig(self::XML_PATH_ALWAYS_NOTIFY_ADMIN, $storeId);
|
199 |
-
if (!$defaultStatus || $alwaysNotify) {
|
200 |
-
Mage::helper('customeractivation')->sendAdminNotificationEmail($customer);
|
201 |
-
}
|
202 |
-
}
|
203 |
-
$customer->setCustomerActivationNewAccount(false);
|
204 |
-
}
|
205 |
-
} catch (Exception $e) {
|
206 |
-
Mage::throwException($e->getMessage());
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
public function salesCovertQuoteAddressToOrder(Varien_Event_Observer $observer) {
|
211 |
-
/** @var $address Mage_Sales_Model_Quote_Address */
|
212 |
-
$address = $observer->getEvent()->getAddress();
|
213 |
-
$this->_abortCheckoutRegistration($address->getQuote());
|
214 |
-
}
|
215 |
-
|
216 |
-
protected function _abortCheckoutRegistration(Mage_Sales_Model_Quote $quote) {
|
217 |
-
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $quote->getStoreId()) == 0) {
|
218 |
-
return;
|
219 |
-
}
|
220 |
-
|
221 |
-
if ($this->_isApiRequest()) {
|
222 |
-
return;
|
223 |
-
}
|
224 |
-
|
225 |
-
if (!Mage::getSingleton('customer/session')->isLoggedIn() && !$quote->getCustomerIsGuest()) {
|
226 |
-
// Order is being created by non-activated customer
|
227 |
-
$customer = $quote->getCustomer()->save();
|
228 |
-
if ($customer->getGroupId() == 1) {
|
229 |
-
return;
|
230 |
-
}
|
231 |
-
if ($customer->getCustomerActivated() == 'New' || $customer->getCustomerActivated() == 2 || $customer->getCustomerActivated() == 0 || $customer->getCustomerActivated() == 4 || $customer->getCustomerActivated() == 5) {
|
232 |
-
|
233 |
-
$message = Mage::helper('customeractivation')->__(
|
234 |
-
'Please wait for your account to be activated, then log in and continue with the checkout'
|
235 |
-
);
|
236 |
-
Mage::getSingleton('core/session')->addSuccess($message);
|
237 |
-
|
238 |
-
// Handle redirect to login page
|
239 |
-
$targetUrl = Mage::getUrl('customer/account/login');
|
240 |
-
$response = Mage::app()->getResponse();
|
241 |
-
|
242 |
-
if (Mage::app()->getRequest()->isAjax()) {
|
243 |
-
// Assume one page checkout
|
244 |
-
$result = array('redirect' => $targetUrl);
|
245 |
-
$response->setBody(Mage::helper('core')->jsonEncode($result));
|
246 |
-
} else if ($response->canSendHeaders(true)) {
|
247 |
-
// Assume multishipping checkout
|
248 |
-
$response->clearHeader('location')
|
249 |
-
->setRedirect($targetUrl);
|
250 |
-
}
|
251 |
-
$response->sendResponse();
|
252 |
-
/* ugly, but we need to stop the further order processing */
|
253 |
-
exit();
|
254 |
-
}
|
255 |
-
}
|
256 |
-
}
|
257 |
-
|
258 |
-
protected function _isApiRequest() {
|
259 |
-
return Mage::app()->getRequest()->getModuleName() === 'api';
|
260 |
-
}
|
261 |
-
|
262 |
-
protected function _checkRequestRoute($module, $controller, $action) {
|
263 |
-
$req = Mage::app()->getRequest();
|
264 |
-
if (strtolower($req->getModuleName()) == $module && strtolower($req->getControllerName()) == $controller && strtolower($req->getActionName()) == $action
|
265 |
-
) {
|
266 |
-
return true;
|
267 |
-
}
|
268 |
-
return false;
|
269 |
-
}
|
270 |
-
|
271 |
-
protected function _checkControllerAction($controller, $action) {
|
272 |
-
$req = Mage::app()->getRequest();
|
273 |
-
return $this->_checkRequestRoute($req->getModuleName(), $controller, $action);
|
274 |
-
}
|
275 |
-
|
276 |
-
public function adminhtmlBlockHtmlBefore(Varien_Event_Observer $observer) {
|
277 |
-
// Check the grid is the customer grid
|
278 |
-
if ($observer->getBlock()->getId() != 'customerGrid') {
|
279 |
-
return;
|
280 |
-
}
|
281 |
-
|
282 |
-
// Check if there is a massaction block and if yes, add the massaction for customeractivation
|
283 |
-
$massBlock = $observer->getBlock()->getMassactionBlock();
|
284 |
-
if ($massBlock) {
|
285 |
-
/** @var $helper Exinent_CustomerActivation_Helper_Data */
|
286 |
-
$helper = Mage::helper('customeractivation');
|
287 |
-
|
288 |
-
$noEmail = Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITHOUT_EMAIL;
|
289 |
-
$withEmail = Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITH_EMAIL;
|
290 |
-
$deactivate = Exinent_CustomerActivation_Helper_Data::STATUS_DEACTIVATE;
|
291 |
-
|
292 |
-
$massBlock->addItem(
|
293 |
-
'customer_activated', array(
|
294 |
-
'label' => $helper->__('Activate Customer'),
|
295 |
-
'url' => Mage::getUrl('customeractivation/admin/massActivation'),
|
296 |
-
'additional' => array(
|
297 |
-
'status' => array(
|
298 |
-
'name' => 'customer_activated',
|
299 |
-
'type' => 'select',
|
300 |
-
'class' => 'required-entry',
|
301 |
-
'label' => $helper->__('Customer Activated'),
|
302 |
-
'values' => array(
|
303 |
-
2 => $helper->__('Pending'),
|
304 |
-
1 => $helper->__('Approved'),
|
305 |
-
0 => $helper->__('Rejected'),
|
306 |
-
4 => $helper->__('In Active'),
|
307 |
-
5 => $helper->__('On Hold')
|
308 |
-
)
|
309 |
-
)
|
310 |
-
)
|
311 |
-
)
|
312 |
-
);
|
313 |
-
}
|
314 |
-
}
|
315 |
-
|
316 |
-
public function eavCollectionAbstractLoadBefore(Varien_Event_Observer $observer) {
|
317 |
-
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, Mage::app()->getStore()) == 0) {
|
318 |
-
return;
|
319 |
-
}
|
320 |
-
|
321 |
-
// Cheap check to reduce overhead on product and category collections
|
322 |
-
if (Mage::app()->getRequest()->getControllerName() !== 'customer') {
|
323 |
-
return;
|
324 |
-
}
|
325 |
-
|
326 |
-
/** @var $collection Mage_Customer_Model_Resource_Customer_Collection */
|
327 |
-
$collection = $observer->getEvent()->getCollection();
|
328 |
-
|
329 |
-
// Only add attribute to customer collections
|
330 |
-
$customerTypeId = Mage::getSingleton('eav/config')->getEntityType('customer')->getId();
|
331 |
-
$collectionTypeId = $collection->getEntity()->getTypeId();
|
332 |
-
if ($customerTypeId == $collectionTypeId) {
|
333 |
-
$collection->addAttributeToSelect('customer_activated');
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Observer {
|
4 |
+
|
5 |
+
const XML_PATH_MODULE_DISABLED = 'customer/customeractivation/disable_ext';
|
6 |
+
const XML_PATH_ALWAYS_NOTIFY_ADMIN = 'customer/customeractivation/always_send_admin_email';
|
7 |
+
const XML_PATH_ACTIVATION_STATUS = 'customer/customeractivation/activation_status_default';
|
8 |
+
const XML_PATH_ACTIVATION_START_DATE = 'customer/customeractivation/date_start';
|
9 |
+
const XML_PATH_ACTIVATION_END_DATE = 'customer/customeractivation/date_end';
|
10 |
+
|
11 |
+
public function page_block_html_topmenu_gethtml_before(Varien_Event_Observer $observer) {
|
12 |
+
|
13 |
+
$session = Mage::getSingleton('customer/session');
|
14 |
+
$customerGroupId = $session->getCustomerGroupId();
|
15 |
+
if ($customerGroupId == 2) {
|
16 |
+
$event = $observer->getEvent();
|
17 |
+
$menu = $event->getMenu();
|
18 |
+
$menuCollection = $menu->getChildren();
|
19 |
+
|
20 |
+
if ($block = Mage::app()->getLayout()->getBlock('catalog.topnav')) {
|
21 |
+
if ($links = $block->getAdditionalLinks()) {
|
22 |
+
foreach ($links as $link) {
|
23 |
+
$data = array(
|
24 |
+
'id' => 'category-additionalnode-' . crc32($link['url']),
|
25 |
+
'name' => $link['label'],
|
26 |
+
'url' => $link['url'],
|
27 |
+
'is_active' => $link['is_active'],
|
28 |
+
);
|
29 |
+
|
30 |
+
$node = new Varien_Data_Tree_Node($data, 'id', $menu->getTree());
|
31 |
+
$menuCollection->add($node);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
public function customerLogin($observer) {
|
39 |
+
|
40 |
+
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, Mage::app()->getStore()) == 0) {
|
41 |
+
return;
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($this->_isApiRequest()) {
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
$customer = $observer->getEvent()->getCustomer();
|
49 |
+
if ($customer->getGroupId() == '1') {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
$session = Mage::getSingleton('customer/session');
|
53 |
+
|
54 |
+
if ($customer->getCustomerActivated() == 'New' || $customer->getCustomerActivated() == 2 || $customer->getCustomerActivated() == 0 || $customer->getCustomerActivated() == 4 || $customer->getCustomerActivated() == 5) {
|
55 |
+
/*
|
56 |
+
* Fake the old logout() method without deleting the session and all messages
|
57 |
+
*///echo 'status'.$customer->getCustomerActivated();
|
58 |
+
|
59 |
+
$session->setCustomer(Mage::getModel('customer/customer'))
|
60 |
+
->setId(null)
|
61 |
+
->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
|
62 |
+
if ($this->_checkRequestRoute('customer', 'account', 'createpost') || $session->getNewRegistration() == 1) {
|
63 |
+
/*
|
64 |
+
* If this is a regular registration, simply display message
|
65 |
+
*/
|
66 |
+
$message = Mage::helper('customeractivation')->__('Thank you! Admin representative will contact you shortly regarding your application.');
|
67 |
+
|
68 |
+
$session->addSuccess($message);
|
69 |
+
$session->setNewRegistration(0);
|
70 |
+
} else {
|
71 |
+
/*
|
72 |
+
* All other types of login
|
73 |
+
*/
|
74 |
+
Mage::throwException(Mage::helper('customeractivation')->__('This account is not approved.'));
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
public function customerSaveBefore($observer) {
|
80 |
+
$customer = $observer->getEvent()->getCustomer();
|
81 |
+
|
82 |
+
|
83 |
+
$storeId = Mage::helper('customeractivation')->getCustomerStoreId($customer);
|
84 |
+
|
85 |
+
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $storeId) == 0) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
if (!$customer->getId()) {
|
90 |
+
$customer->setCustomerActivationNewAccount(true);
|
91 |
+
if (!(Mage::app()->getStore()->isAdmin() && $this->_checkControllerAction('customer', 'save'))) {
|
92 |
+
// Do not set the default status on the admin customer edit save action
|
93 |
+
$groupId = $customer->getGroupId();
|
94 |
+
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
95 |
+
$startdate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_START_DATE, Mage::app()->getStore());
|
96 |
+
$enddate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_END_DATE, Mage::app()->getStore());
|
97 |
+
|
98 |
+
$paymentDate = date('Y-m-d');
|
99 |
+
$paymentDate = date('Y-m-d', strtotime($paymentDate));
|
100 |
+
|
101 |
+
$contractDateBegin = date('Y-m-d', strtotime($startdate));
|
102 |
+
$contractDateEnd = date('Y-m-d', strtotime($enddate));
|
103 |
+
|
104 |
+
if ($paymentDate > $contractDateBegin && $paymentDate < $contractDateEnd) {
|
105 |
+
|
106 |
+
$date_range = 'between';
|
107 |
+
} else if ($paymentDate > $contractDateBegin && $enddate == '') {
|
108 |
+
$date_range = 'notmentioned';
|
109 |
+
|
110 |
+
} else {
|
111 |
+
$date_range = 'notin';
|
112 |
+
}
|
113 |
+
|
114 |
+
$groupId = $customer->getGroupId();
|
115 |
+
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
116 |
+
if ($customer->getGroupId() == 1) {
|
117 |
+
$customer->setCustomerActivated('1');
|
118 |
+
} else if (Mage::getStoreConfig(self::XML_PATH_ACTIVATION_STATUS, Mage::app()->getStore()) == 1) {
|
119 |
+
if(($date_range == 'between') || ($date_range == 'notmentioned')) {
|
120 |
+
$customer->setCustomerActivated('1');
|
121 |
+
}
|
122 |
+
} else {
|
123 |
+
$customer->setCustomerActivated('New');
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
if (!$defaultStatus) {
|
128 |
+
// Suppress the "enter your billing address for VAT validation" message.
|
129 |
+
// This setting will not be saved, its just for this request.
|
130 |
+
$helper = Mage::helper('customer/address');
|
131 |
+
if (method_exists($helper, 'isVatValidationEnabled')) {
|
132 |
+
if (is_callable(array($helper, 'isVatValidationEnabled'))) {
|
133 |
+
if (Mage::helper('customer/address')->isVatValidationEnabled($storeId)) {
|
134 |
+
Mage::app()->getStore($storeId)->setConfig(
|
135 |
+
Mage_Customer_Helper_Address::XML_PATH_VAT_VALIDATION_ENABLED, false
|
136 |
+
);
|
137 |
+
}
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
public function customerSaveAfter($observer) {
|
146 |
+
/** @var Mage_Customer_Model_Customer $customer */
|
147 |
+
$customer = $observer->getEvent()->getCustomer();
|
148 |
+
|
149 |
+
$storeId = Mage::helper('customeractivation')->getCustomerStoreId($customer);
|
150 |
+
|
151 |
+
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $storeId) == 0) {
|
152 |
+
return;
|
153 |
+
}
|
154 |
+
|
155 |
+
$startdate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_START_DATE, Mage::app()->getStore());
|
156 |
+
$enddate = Mage::getStoreConfig(self::XML_PATH_ACTIVATION_END_DATE, Mage::app()->getStore());
|
157 |
+
|
158 |
+
$paymentDate = date('Y-m-d');
|
159 |
+
$paymentDate = date('Y-m-d', strtotime($paymentDate));
|
160 |
+
|
161 |
+
$contractDateBegin = date('Y-m-d', strtotime($startdate));
|
162 |
+
$contractDateEnd = date('Y-m-d', strtotime($enddate));
|
163 |
+
|
164 |
+
|
165 |
+
if ($paymentDate > $contractDateBegin && $paymentDate < $contractDateEnd) {
|
166 |
+
$date_range = 'between';
|
167 |
+
} else if ($paymentDate > $contractDateBegin && $enddate == '') {
|
168 |
+
$date_range = 'notmentioned';
|
169 |
+
} else {
|
170 |
+
$date_range = 'notin';
|
171 |
+
}
|
172 |
+
|
173 |
+
$groupId = $customer->getGroupId();
|
174 |
+
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($groupId, $storeId);
|
175 |
+
|
176 |
+
|
177 |
+
if ($customer->getGroupId() == 1) {
|
178 |
+
$customer->setCustomerActivated('1');
|
179 |
+
} else if (Mage::getStoreConfig(self::XML_PATH_ACTIVATION_STATUS, Mage::app()->getStore()) == 1) {
|
180 |
+
if(($date_range == 'between') || ($date_range == 'notmentioned')) {
|
181 |
+
$customer->setCustomerActivated('1');
|
182 |
+
}
|
183 |
+
} else {
|
184 |
+
$customer->setCustomerActivated('New');
|
185 |
+
}
|
186 |
+
|
187 |
+
try {
|
188 |
+
if (Mage::app()->getStore()->isAdmin()) {
|
189 |
+
if (!$customer->getOrigData('customer_activated') && $customer->getCustomerActivated()) {
|
190 |
+
// Send customer email only if it isn't a new account and it isn't activated by default
|
191 |
+
if (!($customer->getCustomerActivationNewAccount() && $defaultStatus)) {
|
192 |
+
Mage::helper('customeractivation')->sendCustomerNotificationEmail($customer);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
} else {
|
196 |
+
if ($customer->getCustomerActivationNewAccount()) {
|
197 |
+
// Only notify the admin if the default is deactivated or the "always notify" flag is configured
|
198 |
+
$alwaysNotify = Mage::getStoreConfig(self::XML_PATH_ALWAYS_NOTIFY_ADMIN, $storeId);
|
199 |
+
if (!$defaultStatus || $alwaysNotify) {
|
200 |
+
Mage::helper('customeractivation')->sendAdminNotificationEmail($customer);
|
201 |
+
}
|
202 |
+
}
|
203 |
+
$customer->setCustomerActivationNewAccount(false);
|
204 |
+
}
|
205 |
+
} catch (Exception $e) {
|
206 |
+
Mage::throwException($e->getMessage());
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
public function salesCovertQuoteAddressToOrder(Varien_Event_Observer $observer) {
|
211 |
+
/** @var $address Mage_Sales_Model_Quote_Address */
|
212 |
+
$address = $observer->getEvent()->getAddress();
|
213 |
+
$this->_abortCheckoutRegistration($address->getQuote());
|
214 |
+
}
|
215 |
+
|
216 |
+
protected function _abortCheckoutRegistration(Mage_Sales_Model_Quote $quote) {
|
217 |
+
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, $quote->getStoreId()) == 0) {
|
218 |
+
return;
|
219 |
+
}
|
220 |
+
|
221 |
+
if ($this->_isApiRequest()) {
|
222 |
+
return;
|
223 |
+
}
|
224 |
+
|
225 |
+
if (!Mage::getSingleton('customer/session')->isLoggedIn() && !$quote->getCustomerIsGuest()) {
|
226 |
+
// Order is being created by non-activated customer
|
227 |
+
$customer = $quote->getCustomer()->save();
|
228 |
+
if ($customer->getGroupId() == 1) {
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
if ($customer->getCustomerActivated() == 'New' || $customer->getCustomerActivated() == 2 || $customer->getCustomerActivated() == 0 || $customer->getCustomerActivated() == 4 || $customer->getCustomerActivated() == 5) {
|
232 |
+
|
233 |
+
$message = Mage::helper('customeractivation')->__(
|
234 |
+
'Please wait for your account to be activated, then log in and continue with the checkout'
|
235 |
+
);
|
236 |
+
Mage::getSingleton('core/session')->addSuccess($message);
|
237 |
+
|
238 |
+
// Handle redirect to login page
|
239 |
+
$targetUrl = Mage::getUrl('customer/account/login');
|
240 |
+
$response = Mage::app()->getResponse();
|
241 |
+
|
242 |
+
if (Mage::app()->getRequest()->isAjax()) {
|
243 |
+
// Assume one page checkout
|
244 |
+
$result = array('redirect' => $targetUrl);
|
245 |
+
$response->setBody(Mage::helper('core')->jsonEncode($result));
|
246 |
+
} else if ($response->canSendHeaders(true)) {
|
247 |
+
// Assume multishipping checkout
|
248 |
+
$response->clearHeader('location')
|
249 |
+
->setRedirect($targetUrl);
|
250 |
+
}
|
251 |
+
$response->sendResponse();
|
252 |
+
/* ugly, but we need to stop the further order processing */
|
253 |
+
exit();
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
protected function _isApiRequest() {
|
259 |
+
return Mage::app()->getRequest()->getModuleName() === 'api';
|
260 |
+
}
|
261 |
+
|
262 |
+
protected function _checkRequestRoute($module, $controller, $action) {
|
263 |
+
$req = Mage::app()->getRequest();
|
264 |
+
if (strtolower($req->getModuleName()) == $module && strtolower($req->getControllerName()) == $controller && strtolower($req->getActionName()) == $action
|
265 |
+
) {
|
266 |
+
return true;
|
267 |
+
}
|
268 |
+
return false;
|
269 |
+
}
|
270 |
+
|
271 |
+
protected function _checkControllerAction($controller, $action) {
|
272 |
+
$req = Mage::app()->getRequest();
|
273 |
+
return $this->_checkRequestRoute($req->getModuleName(), $controller, $action);
|
274 |
+
}
|
275 |
+
|
276 |
+
public function adminhtmlBlockHtmlBefore(Varien_Event_Observer $observer) {
|
277 |
+
// Check the grid is the customer grid
|
278 |
+
if ($observer->getBlock()->getId() != 'customerGrid') {
|
279 |
+
return;
|
280 |
+
}
|
281 |
+
|
282 |
+
// Check if there is a massaction block and if yes, add the massaction for customeractivation
|
283 |
+
$massBlock = $observer->getBlock()->getMassactionBlock();
|
284 |
+
if ($massBlock) {
|
285 |
+
/** @var $helper Exinent_CustomerActivation_Helper_Data */
|
286 |
+
$helper = Mage::helper('customeractivation');
|
287 |
+
|
288 |
+
$noEmail = Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITHOUT_EMAIL;
|
289 |
+
$withEmail = Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITH_EMAIL;
|
290 |
+
$deactivate = Exinent_CustomerActivation_Helper_Data::STATUS_DEACTIVATE;
|
291 |
+
|
292 |
+
$massBlock->addItem(
|
293 |
+
'customer_activated', array(
|
294 |
+
'label' => $helper->__('Activate Customer'),
|
295 |
+
'url' => Mage::getUrl('customeractivation/admin/massActivation'),
|
296 |
+
'additional' => array(
|
297 |
+
'status' => array(
|
298 |
+
'name' => 'customer_activated',
|
299 |
+
'type' => 'select',
|
300 |
+
'class' => 'required-entry',
|
301 |
+
'label' => $helper->__('Customer Activated'),
|
302 |
+
'values' => array(
|
303 |
+
2 => $helper->__('Pending'),
|
304 |
+
1 => $helper->__('Approved'),
|
305 |
+
0 => $helper->__('Rejected'),
|
306 |
+
4 => $helper->__('In Active'),
|
307 |
+
5 => $helper->__('On Hold')
|
308 |
+
)
|
309 |
+
)
|
310 |
+
)
|
311 |
+
)
|
312 |
+
);
|
313 |
+
}
|
314 |
+
}
|
315 |
+
|
316 |
+
public function eavCollectionAbstractLoadBefore(Varien_Event_Observer $observer) {
|
317 |
+
if (Mage::getStoreConfig(self::XML_PATH_MODULE_DISABLED, Mage::app()->getStore()) == 0) {
|
318 |
+
return;
|
319 |
+
}
|
320 |
+
|
321 |
+
// Cheap check to reduce overhead on product and category collections
|
322 |
+
if (Mage::app()->getRequest()->getControllerName() !== 'customer') {
|
323 |
+
return;
|
324 |
+
}
|
325 |
+
|
326 |
+
/** @var $collection Mage_Customer_Model_Resource_Customer_Collection */
|
327 |
+
$collection = $observer->getEvent()->getCollection();
|
328 |
+
|
329 |
+
// Only add attribute to customer collections
|
330 |
+
$customerTypeId = Mage::getSingleton('eav/config')->getEntityType('customer')->getId();
|
331 |
+
$collectionTypeId = $collection->getEntity()->getTypeId();
|
332 |
+
if ($customerTypeId == $collectionTypeId) {
|
333 |
+
$collection->addAttributeToSelect('customer_activated');
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Order.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Order extends Mage_Sales_Model_Order {
|
4 |
-
|
5 |
-
public function sendNewOrderEmail() {
|
6 |
-
$storeId = $this->getStore()->getId();
|
7 |
-
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
8 |
-
return $this;
|
9 |
-
}
|
10 |
-
$emailSentAttributeValue = $this->hasEmailSent() ? $this->getEmailSent() : Mage::getModel('sales/order')->load($this->getId())->getData('email_sent');
|
11 |
-
$this->setEmailSent((bool) $emailSentAttributeValue);
|
12 |
-
if ($this->getEmailSent()) {
|
13 |
-
return $this;
|
14 |
-
}
|
15 |
-
// Get the destination email addresses to send copies to
|
16 |
-
$copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
|
17 |
-
$copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
|
18 |
-
|
19 |
-
// Start store emulation process
|
20 |
-
$appEmulation = Mage::getSingleton('core/app_emulation');
|
21 |
-
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
|
22 |
-
|
23 |
-
try {
|
24 |
-
// Retrieve specified view block from appropriate design package (depends on emulated store)
|
25 |
-
$paymentBlock = Mage::helper('payment')->getInfoBlock($this->getPayment())
|
26 |
-
->setIsSecureMode(true);
|
27 |
-
$paymentBlock->getMethod()->setStore($storeId);
|
28 |
-
$paymentBlockHtml = $paymentBlock->toHtml();
|
29 |
-
} catch (Exception $exception) {
|
30 |
-
// Stop store emulation process
|
31 |
-
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
32 |
-
throw $exception;
|
33 |
-
}
|
34 |
-
|
35 |
-
// Stop store emulation process
|
36 |
-
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
37 |
-
|
38 |
-
// Retrieve corresponding email template id and customer name
|
39 |
-
if ($this->getCustomerIsGuest()) {
|
40 |
-
$templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
|
41 |
-
$customerName = $this->getBillingAddress()->getName();
|
42 |
-
} else {
|
43 |
-
$templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
|
44 |
-
$customerName = $this->getCustomerName();
|
45 |
-
}
|
46 |
-
|
47 |
-
$mailer = Mage::getModel('core/email_template_mailer');
|
48 |
-
$emailInfo = Mage::getModel('core/email_info');
|
49 |
-
$emailInfo->addTo($this->getCustomerEmail(), $customerName);
|
50 |
-
if ($copyTo && $copyMethod == 'bcc') {
|
51 |
-
// Add bcc to customer email
|
52 |
-
foreach ($copyTo as $email) {
|
53 |
-
$emailInfo->addBcc($email);
|
54 |
-
}
|
55 |
-
}
|
56 |
-
$customerId = $this->getCustomerId();
|
57 |
-
$customerObject = Mage::getModel('customer/customer')->load($customerId);
|
58 |
-
if ($customerObject->getGroupId() == 2) {
|
59 |
-
$emailInfo->addBcc($customerObject->getRepresentativeEmail());
|
60 |
-
}
|
61 |
-
$mailer->addEmailInfo($emailInfo);
|
62 |
-
|
63 |
-
// Email copies are sent as separated emails if their copy method is 'copy'
|
64 |
-
if ($copyTo && $copyMethod == 'copy') {
|
65 |
-
foreach ($copyTo as $email) {
|
66 |
-
$emailInfo = Mage::getModel('core/email_info');
|
67 |
-
$emailInfo->addTo($email);
|
68 |
-
$mailer->addEmailInfo($emailInfo);
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
// Set all required params and send emails
|
73 |
-
$mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $storeId));
|
74 |
-
$mailer->setStoreId($storeId);
|
75 |
-
$mailer->setTemplateId($templateId);
|
76 |
-
$mailer->setTemplateParams(array(
|
77 |
-
'order' => $this,
|
78 |
-
'billing' => $this->getBillingAddress(),
|
79 |
-
'payment_html' => $paymentBlockHtml
|
80 |
-
)
|
81 |
-
);
|
82 |
-
$mailer->send();
|
83 |
-
$this->setEmailSent(true);
|
84 |
-
$this->_getResource()->saveAttribute($this, 'email_sent');
|
85 |
-
return $this;
|
86 |
-
}
|
87 |
-
|
88 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Order extends Mage_Sales_Model_Order {
|
4 |
+
|
5 |
+
public function sendNewOrderEmail() {
|
6 |
+
$storeId = $this->getStore()->getId();
|
7 |
+
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
8 |
+
return $this;
|
9 |
+
}
|
10 |
+
$emailSentAttributeValue = $this->hasEmailSent() ? $this->getEmailSent() : Mage::getModel('sales/order')->load($this->getId())->getData('email_sent');
|
11 |
+
$this->setEmailSent((bool) $emailSentAttributeValue);
|
12 |
+
if ($this->getEmailSent()) {
|
13 |
+
return $this;
|
14 |
+
}
|
15 |
+
// Get the destination email addresses to send copies to
|
16 |
+
$copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
|
17 |
+
$copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
|
18 |
+
|
19 |
+
// Start store emulation process
|
20 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
21 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
|
22 |
+
|
23 |
+
try {
|
24 |
+
// Retrieve specified view block from appropriate design package (depends on emulated store)
|
25 |
+
$paymentBlock = Mage::helper('payment')->getInfoBlock($this->getPayment())
|
26 |
+
->setIsSecureMode(true);
|
27 |
+
$paymentBlock->getMethod()->setStore($storeId);
|
28 |
+
$paymentBlockHtml = $paymentBlock->toHtml();
|
29 |
+
} catch (Exception $exception) {
|
30 |
+
// Stop store emulation process
|
31 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
32 |
+
throw $exception;
|
33 |
+
}
|
34 |
+
|
35 |
+
// Stop store emulation process
|
36 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
37 |
+
|
38 |
+
// Retrieve corresponding email template id and customer name
|
39 |
+
if ($this->getCustomerIsGuest()) {
|
40 |
+
$templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
|
41 |
+
$customerName = $this->getBillingAddress()->getName();
|
42 |
+
} else {
|
43 |
+
$templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
|
44 |
+
$customerName = $this->getCustomerName();
|
45 |
+
}
|
46 |
+
|
47 |
+
$mailer = Mage::getModel('core/email_template_mailer');
|
48 |
+
$emailInfo = Mage::getModel('core/email_info');
|
49 |
+
$emailInfo->addTo($this->getCustomerEmail(), $customerName);
|
50 |
+
if ($copyTo && $copyMethod == 'bcc') {
|
51 |
+
// Add bcc to customer email
|
52 |
+
foreach ($copyTo as $email) {
|
53 |
+
$emailInfo->addBcc($email);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
$customerId = $this->getCustomerId();
|
57 |
+
$customerObject = Mage::getModel('customer/customer')->load($customerId);
|
58 |
+
if ($customerObject->getGroupId() == 2) {
|
59 |
+
$emailInfo->addBcc($customerObject->getRepresentativeEmail());
|
60 |
+
}
|
61 |
+
$mailer->addEmailInfo($emailInfo);
|
62 |
+
|
63 |
+
// Email copies are sent as separated emails if their copy method is 'copy'
|
64 |
+
if ($copyTo && $copyMethod == 'copy') {
|
65 |
+
foreach ($copyTo as $email) {
|
66 |
+
$emailInfo = Mage::getModel('core/email_info');
|
67 |
+
$emailInfo->addTo($email);
|
68 |
+
$mailer->addEmailInfo($emailInfo);
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
// Set all required params and send emails
|
73 |
+
$mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $storeId));
|
74 |
+
$mailer->setStoreId($storeId);
|
75 |
+
$mailer->setTemplateId($templateId);
|
76 |
+
$mailer->setTemplateParams(array(
|
77 |
+
'order' => $this,
|
78 |
+
'billing' => $this->getBillingAddress(),
|
79 |
+
'payment_html' => $paymentBlockHtml
|
80 |
+
)
|
81 |
+
);
|
82 |
+
$mailer->send();
|
83 |
+
$this->setEmailSent(true);
|
84 |
+
$this->_getResource()->saveAttribute($this, 'email_sent');
|
85 |
+
return $this;
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customeractivation.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customeractivation extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
-
|
5 |
-
public function getAllOptions() {
|
6 |
-
if ($this->_options === null) {
|
7 |
-
$this->_options = array(
|
8 |
-
array(
|
9 |
-
'value' => 'New',
|
10 |
-
'label' => 'New',
|
11 |
-
),
|
12 |
-
|
13 |
-
array(
|
14 |
-
'value' => '1',
|
15 |
-
'label' => 'Approved',
|
16 |
-
),
|
17 |
-
|
18 |
-
);
|
19 |
-
}
|
20 |
-
return $this->_options;
|
21 |
-
}
|
22 |
-
|
23 |
-
public function getOptionArray() {
|
24 |
-
$_options = array();
|
25 |
-
foreach ($this->getAllOptions() as $option) {
|
26 |
-
$_options[$option['value']] = $option['label'];
|
27 |
-
}
|
28 |
-
return $_options;
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getOptionText($value) {
|
32 |
-
$options = $this->getAllOptions();
|
33 |
-
foreach ($options as $option) {
|
34 |
-
if ($option['value'] == $value) {
|
35 |
-
return $option['label'];
|
36 |
-
}
|
37 |
-
}
|
38 |
-
return false;
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customeractivation extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
+
|
5 |
+
public function getAllOptions() {
|
6 |
+
if ($this->_options === null) {
|
7 |
+
$this->_options = array(
|
8 |
+
array(
|
9 |
+
'value' => 'New',
|
10 |
+
'label' => 'New',
|
11 |
+
),
|
12 |
+
|
13 |
+
array(
|
14 |
+
'value' => '1',
|
15 |
+
'label' => 'Approved',
|
16 |
+
),
|
17 |
+
|
18 |
+
);
|
19 |
+
}
|
20 |
+
return $this->_options;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getOptionArray() {
|
24 |
+
$_options = array();
|
25 |
+
foreach ($this->getAllOptions() as $option) {
|
26 |
+
$_options[$option['value']] = $option['label'];
|
27 |
+
}
|
28 |
+
return $_options;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getOptionText($value) {
|
32 |
+
$options = $this->getAllOptions();
|
33 |
+
foreach ($options as $option) {
|
34 |
+
if ($option['value'] == $value) {
|
35 |
+
return $option['label'];
|
36 |
+
}
|
37 |
+
}
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customerpayment.php
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customerpayment extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
-
|
5 |
-
public function getAllOptions() {
|
6 |
-
|
7 |
-
if (is_null($this->_options)) {
|
8 |
-
$this->_options = array(
|
9 |
-
array(
|
10 |
-
'label' => 'Net30',
|
11 |
-
'value' => 'net30'
|
12 |
-
),
|
13 |
-
array(
|
14 |
-
'label' => 'Net15',
|
15 |
-
'value' => 'net15'
|
16 |
-
),
|
17 |
-
|
18 |
-
);
|
19 |
-
}
|
20 |
-
return $this->_options;
|
21 |
-
}
|
22 |
-
|
23 |
-
public function getOptionArray() {
|
24 |
-
$_options = array();
|
25 |
-
foreach ($this->getAllOptions() as $option) {
|
26 |
-
$_options[$option['value']] = $option['label'];
|
27 |
-
}
|
28 |
-
return $_options;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get a text for option value
|
33 |
-
*
|
34 |
-
* @param string|integer $value
|
35 |
-
* @return string
|
36 |
-
*/
|
37 |
-
public function getOptionText($value) {
|
38 |
-
$options = $this->getAllOptions();
|
39 |
-
foreach ($options as $option) {
|
40 |
-
if ($option["value"] == $value) {
|
41 |
-
return $option["label"];
|
42 |
-
}
|
43 |
-
}
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Retrieve Column(s) for Flat
|
49 |
-
*
|
50 |
-
* @return array
|
51 |
-
*/
|
52 |
-
public function getFlatColums() {
|
53 |
-
$columns = array(
|
54 |
-
$this->getAttribute()->getAttributeCode() => array(
|
55 |
-
'type' => 'int',
|
56 |
-
'unsigned' => false,
|
57 |
-
'is_null' => true,
|
58 |
-
'default' => null,
|
59 |
-
'extra' => null
|
60 |
-
)
|
61 |
-
);
|
62 |
-
return $columns;
|
63 |
-
}
|
64 |
-
|
65 |
-
public function getFlatUpdateSelect($store) {
|
66 |
-
return Mage::getResourceModel('eav/entity_attribute')
|
67 |
-
->getFlatUpdateSelect($this->getAttribute(), $store);
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customerpayment extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
+
|
5 |
+
public function getAllOptions() {
|
6 |
+
|
7 |
+
if (is_null($this->_options)) {
|
8 |
+
$this->_options = array(
|
9 |
+
array(
|
10 |
+
'label' => 'Net30',
|
11 |
+
'value' => 'net30'
|
12 |
+
),
|
13 |
+
array(
|
14 |
+
'label' => 'Net15',
|
15 |
+
'value' => 'net15'
|
16 |
+
),
|
17 |
+
|
18 |
+
);
|
19 |
+
}
|
20 |
+
return $this->_options;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getOptionArray() {
|
24 |
+
$_options = array();
|
25 |
+
foreach ($this->getAllOptions() as $option) {
|
26 |
+
$_options[$option['value']] = $option['label'];
|
27 |
+
}
|
28 |
+
return $_options;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get a text for option value
|
33 |
+
*
|
34 |
+
* @param string|integer $value
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function getOptionText($value) {
|
38 |
+
$options = $this->getAllOptions();
|
39 |
+
foreach ($options as $option) {
|
40 |
+
if ($option["value"] == $value) {
|
41 |
+
return $option["label"];
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Retrieve Column(s) for Flat
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function getFlatColums() {
|
53 |
+
$columns = array(
|
54 |
+
$this->getAttribute()->getAttributeCode() => array(
|
55 |
+
'type' => 'int',
|
56 |
+
'unsigned' => false,
|
57 |
+
'is_null' => true,
|
58 |
+
'default' => null,
|
59 |
+
'extra' => null
|
60 |
+
)
|
61 |
+
);
|
62 |
+
return $columns;
|
63 |
+
}
|
64 |
+
|
65 |
+
public function getFlatUpdateSelect($store) {
|
66 |
+
return Mage::getResourceModel('eav/entity_attribute')
|
67 |
+
->getFlatUpdateSelect($this->getAttribute(), $store);
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Customershippingmethods.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customershippingmethods extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
-
|
5 |
-
public function getAllOptions() {
|
6 |
-
if (is_null($this->_options)) {
|
7 |
-
$activeCarriers = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
8 |
-
foreach ($activeCarriers as $carrierCode => $carrierModel) {
|
9 |
-
$allCarriers[$carrierCode] = array('value' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title', Mage::app()->getStore()), 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title', Mage::app()->getStore()));
|
10 |
-
}
|
11 |
-
return $allCarriers;
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
public function getOptionArray() {
|
16 |
-
$_options = array();
|
17 |
-
foreach ($this->getAllOptions() as $option) {
|
18 |
-
$_options[$option["value"]] = $option["label"];
|
19 |
-
}
|
20 |
-
return $_options;
|
21 |
-
}
|
22 |
-
|
23 |
-
public function getOptionText($value) {
|
24 |
-
$options = $this->getAllOptions();
|
25 |
-
foreach ($options as $option) {
|
26 |
-
if ($option["value"] == $value) {
|
27 |
-
return $option["label"];
|
28 |
-
}
|
29 |
-
}
|
30 |
-
return false;
|
31 |
-
}
|
32 |
-
|
33 |
-
public function getFlatColums() {
|
34 |
-
$columns = array();
|
35 |
-
$columns[$this->getAttribute()->getAttributeCode()] = array(
|
36 |
-
"type" => "tinyint(1)",
|
37 |
-
"unsigned" => false,
|
38 |
-
"is_null" => true,
|
39 |
-
"default" => null,
|
40 |
-
"extra" => null
|
41 |
-
);
|
42 |
-
|
43 |
-
return $columns;
|
44 |
-
}
|
45 |
-
|
46 |
-
public function getFlatIndexes() {
|
47 |
-
$indexes = array();
|
48 |
-
|
49 |
-
$index = "IDX_" . strtoupper($this->getAttribute()->getAttributeCode());
|
50 |
-
$indexes[$index] = array(
|
51 |
-
"type" => "index",
|
52 |
-
"fields" => array($this->getAttribute()->getAttributeCode())
|
53 |
-
);
|
54 |
-
|
55 |
-
return $indexes;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function getFlatUpdateSelect($store) {
|
59 |
-
return Mage::getResourceModel("eav/entity_attribute")
|
60 |
-
->getFlatUpdateSelect($this->getAttribute(), $store);
|
61 |
-
}
|
62 |
-
|
63 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Customershippingmethods extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
+
|
5 |
+
public function getAllOptions() {
|
6 |
+
if (is_null($this->_options)) {
|
7 |
+
$activeCarriers = Mage::getSingleton('shipping/config')->getActiveCarriers();
|
8 |
+
foreach ($activeCarriers as $carrierCode => $carrierModel) {
|
9 |
+
$allCarriers[$carrierCode] = array('value' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title', Mage::app()->getStore()), 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title', Mage::app()->getStore()));
|
10 |
+
}
|
11 |
+
return $allCarriers;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getOptionArray() {
|
16 |
+
$_options = array();
|
17 |
+
foreach ($this->getAllOptions() as $option) {
|
18 |
+
$_options[$option["value"]] = $option["label"];
|
19 |
+
}
|
20 |
+
return $_options;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function getOptionText($value) {
|
24 |
+
$options = $this->getAllOptions();
|
25 |
+
foreach ($options as $option) {
|
26 |
+
if ($option["value"] == $value) {
|
27 |
+
return $option["label"];
|
28 |
+
}
|
29 |
+
}
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getFlatColums() {
|
34 |
+
$columns = array();
|
35 |
+
$columns[$this->getAttribute()->getAttributeCode()] = array(
|
36 |
+
"type" => "tinyint(1)",
|
37 |
+
"unsigned" => false,
|
38 |
+
"is_null" => true,
|
39 |
+
"default" => null,
|
40 |
+
"extra" => null
|
41 |
+
);
|
42 |
+
|
43 |
+
return $columns;
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getFlatIndexes() {
|
47 |
+
$indexes = array();
|
48 |
+
|
49 |
+
$index = "IDX_" . strtoupper($this->getAttribute()->getAttributeCode());
|
50 |
+
$indexes[$index] = array(
|
51 |
+
"type" => "index",
|
52 |
+
"fields" => array($this->getAttribute()->getAttributeCode())
|
53 |
+
);
|
54 |
+
|
55 |
+
return $indexes;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getFlatUpdateSelect($store) {
|
59 |
+
return Mage::getResourceModel("eav/entity_attribute")
|
60 |
+
->getFlatUpdateSelect($this->getAttribute(), $store);
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/Iswebsitelive.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Iswebsitelive extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Retrieve all options array
|
7 |
-
*
|
8 |
-
* @return array
|
9 |
-
*/
|
10 |
-
public function getAllOptions() {
|
11 |
-
|
12 |
-
if (is_null($this->_options)) {
|
13 |
-
$this->_options = array(
|
14 |
-
array(
|
15 |
-
'label' => 'Yes',
|
16 |
-
'value' => 1
|
17 |
-
),
|
18 |
-
array(
|
19 |
-
'label' => 'No',
|
20 |
-
'value' => 0
|
21 |
-
),
|
22 |
-
);
|
23 |
-
}
|
24 |
-
return $this->_options;
|
25 |
-
}
|
26 |
-
|
27 |
-
public function getOptionArray() {
|
28 |
-
$_options = array();
|
29 |
-
foreach ($this->getAllOptions() as $option) {
|
30 |
-
$_options[$option['value']] = $option['label'];
|
31 |
-
}
|
32 |
-
return $_options;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function getOptionText($value) {
|
36 |
-
$options = $this->getAllOptions();
|
37 |
-
foreach ($options as $option) {
|
38 |
-
if ($option["value"] == $value) {
|
39 |
-
return $option["label"];
|
40 |
-
}
|
41 |
-
}
|
42 |
-
return false;
|
43 |
-
}
|
44 |
-
|
45 |
-
public function getFlatColums() {
|
46 |
-
$columns = array(
|
47 |
-
$this->getAttribute()->getAttributeCode() => array(
|
48 |
-
'type' => 'int',
|
49 |
-
'unsigned' => false,
|
50 |
-
'is_null' => true,
|
51 |
-
'default' => null,
|
52 |
-
'extra' => null
|
53 |
-
)
|
54 |
-
);
|
55 |
-
return $columns;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function getFlatUpdateSelect($store) {
|
59 |
-
return Mage::getResourceModel('eav/entity_attribute')
|
60 |
-
->getFlatUpdateSelect($this->getAttribute(), $store);
|
61 |
-
}
|
62 |
-
|
63 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_Iswebsitelive extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Retrieve all options array
|
7 |
+
*
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
public function getAllOptions() {
|
11 |
+
|
12 |
+
if (is_null($this->_options)) {
|
13 |
+
$this->_options = array(
|
14 |
+
array(
|
15 |
+
'label' => 'Yes',
|
16 |
+
'value' => 1
|
17 |
+
),
|
18 |
+
array(
|
19 |
+
'label' => 'No',
|
20 |
+
'value' => 0
|
21 |
+
),
|
22 |
+
);
|
23 |
+
}
|
24 |
+
return $this->_options;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getOptionArray() {
|
28 |
+
$_options = array();
|
29 |
+
foreach ($this->getAllOptions() as $option) {
|
30 |
+
$_options[$option['value']] = $option['label'];
|
31 |
+
}
|
32 |
+
return $_options;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getOptionText($value) {
|
36 |
+
$options = $this->getAllOptions();
|
37 |
+
foreach ($options as $option) {
|
38 |
+
if ($option["value"] == $value) {
|
39 |
+
return $option["label"];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getFlatColums() {
|
46 |
+
$columns = array(
|
47 |
+
$this->getAttribute()->getAttributeCode() => array(
|
48 |
+
'type' => 'int',
|
49 |
+
'unsigned' => false,
|
50 |
+
'is_null' => true,
|
51 |
+
'default' => null,
|
52 |
+
'extra' => null
|
53 |
+
)
|
54 |
+
);
|
55 |
+
return $columns;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getFlatUpdateSelect($store) {
|
59 |
+
return Mage::getResourceModel('eav/entity_attribute')
|
60 |
+
->getFlatUpdateSelect($this->getAttribute(), $store);
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Attribute/Source/StoreType.php
CHANGED
@@ -1,91 +1,91 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_StoreType extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Retrieve all options array
|
7 |
-
*
|
8 |
-
* @return array
|
9 |
-
*/
|
10 |
-
public function getAllOptions() {
|
11 |
-
|
12 |
-
if (is_null($this->_options)) {
|
13 |
-
$this->_options = array(
|
14 |
-
array(
|
15 |
-
'label' => 'Outdoor',
|
16 |
-
'value' => 'outdoor'
|
17 |
-
),
|
18 |
-
array(
|
19 |
-
'label' => 'Surf',
|
20 |
-
'value' => 'surf'
|
21 |
-
),
|
22 |
-
array(
|
23 |
-
'label' => 'Fashion',
|
24 |
-
'value' => 'fashion'
|
25 |
-
),
|
26 |
-
array(
|
27 |
-
'label' => 'Natural_Food',
|
28 |
-
'value' => 'naturalfood'
|
29 |
-
),
|
30 |
-
array(
|
31 |
-
'label' => 'Wellness - Yoga/Pilates/Medical/Spa/Beauty',
|
32 |
-
'value' => 'wellness'
|
33 |
-
),
|
34 |
-
array(
|
35 |
-
'label' => 'Hospitality - Hotels',
|
36 |
-
'value' => 'hospitalityh'
|
37 |
-
),
|
38 |
-
array(
|
39 |
-
'label' => 'Sporting_Goods',
|
40 |
-
'value' => 'sportinggoods'
|
41 |
-
),
|
42 |
-
array(
|
43 |
-
'label' => 'Gift_Shop',
|
44 |
-
'value' => 'giftshop'
|
45 |
-
),
|
46 |
-
array(
|
47 |
-
'label' => 'Footwear_Only',
|
48 |
-
'value' => 'footwear'
|
49 |
-
),
|
50 |
-
);
|
51 |
-
}
|
52 |
-
return $this->_options;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function getOptionArray() {
|
56 |
-
$_options = array();
|
57 |
-
foreach ($this->getAllOptions() as $option) {
|
58 |
-
$_options[$option['value']] = $option['label'];
|
59 |
-
}
|
60 |
-
return $_options;
|
61 |
-
}
|
62 |
-
|
63 |
-
public function getOptionText($value) {
|
64 |
-
$options = $this->getAllOptions();
|
65 |
-
foreach ($options as $option) {
|
66 |
-
if ($option["value"] == $value) {
|
67 |
-
return $option["label"];
|
68 |
-
}
|
69 |
-
}
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
|
73 |
-
public function getFlatColums() {
|
74 |
-
$columns = array(
|
75 |
-
$this->getAttribute()->getAttributeCode() => array(
|
76 |
-
'type' => 'int',
|
77 |
-
'unsigned' => false,
|
78 |
-
'is_null' => true,
|
79 |
-
'default' => null,
|
80 |
-
'extra' => null
|
81 |
-
)
|
82 |
-
);
|
83 |
-
return $columns;
|
84 |
-
}
|
85 |
-
|
86 |
-
public function getFlatUpdateSelect($store) {
|
87 |
-
return Mage::getResourceModel('eav/entity_attribute')
|
88 |
-
->getFlatUpdateSelect($this->getAttribute(), $store);
|
89 |
-
}
|
90 |
-
|
91 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Attribute_Source_StoreType extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Retrieve all options array
|
7 |
+
*
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
public function getAllOptions() {
|
11 |
+
|
12 |
+
if (is_null($this->_options)) {
|
13 |
+
$this->_options = array(
|
14 |
+
array(
|
15 |
+
'label' => 'Outdoor',
|
16 |
+
'value' => 'outdoor'
|
17 |
+
),
|
18 |
+
array(
|
19 |
+
'label' => 'Surf',
|
20 |
+
'value' => 'surf'
|
21 |
+
),
|
22 |
+
array(
|
23 |
+
'label' => 'Fashion',
|
24 |
+
'value' => 'fashion'
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'label' => 'Natural_Food',
|
28 |
+
'value' => 'naturalfood'
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'label' => 'Wellness - Yoga/Pilates/Medical/Spa/Beauty',
|
32 |
+
'value' => 'wellness'
|
33 |
+
),
|
34 |
+
array(
|
35 |
+
'label' => 'Hospitality - Hotels',
|
36 |
+
'value' => 'hospitalityh'
|
37 |
+
),
|
38 |
+
array(
|
39 |
+
'label' => 'Sporting_Goods',
|
40 |
+
'value' => 'sportinggoods'
|
41 |
+
),
|
42 |
+
array(
|
43 |
+
'label' => 'Gift_Shop',
|
44 |
+
'value' => 'giftshop'
|
45 |
+
),
|
46 |
+
array(
|
47 |
+
'label' => 'Footwear_Only',
|
48 |
+
'value' => 'footwear'
|
49 |
+
),
|
50 |
+
);
|
51 |
+
}
|
52 |
+
return $this->_options;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getOptionArray() {
|
56 |
+
$_options = array();
|
57 |
+
foreach ($this->getAllOptions() as $option) {
|
58 |
+
$_options[$option['value']] = $option['label'];
|
59 |
+
}
|
60 |
+
return $_options;
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getOptionText($value) {
|
64 |
+
$options = $this->getAllOptions();
|
65 |
+
foreach ($options as $option) {
|
66 |
+
if ($option["value"] == $value) {
|
67 |
+
return $option["label"];
|
68 |
+
}
|
69 |
+
}
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
|
73 |
+
public function getFlatColums() {
|
74 |
+
$columns = array(
|
75 |
+
$this->getAttribute()->getAttributeCode() => array(
|
76 |
+
'type' => 'int',
|
77 |
+
'unsigned' => false,
|
78 |
+
'is_null' => true,
|
79 |
+
'default' => null,
|
80 |
+
'extra' => null
|
81 |
+
)
|
82 |
+
);
|
83 |
+
return $columns;
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getFlatUpdateSelect($store) {
|
87 |
+
return Mage::getResourceModel('eav/entity_attribute')
|
88 |
+
->getFlatUpdateSelect($this->getAttribute(), $store);
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Resource/Customer.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Resource_Customer extends Mage_Eav_Model_Entity_Abstract {
|
4 |
-
|
5 |
-
protected function _construct() {
|
6 |
-
$this->setType('customer');
|
7 |
-
$this->setConnection('customer_read', 'customer_write');
|
8 |
-
return parent::_construct();
|
9 |
-
}
|
10 |
-
|
11 |
-
public function massSetActivationStatus(array $customerIds, $value) {
|
12 |
-
$customerIds = $this->_getValidCustomerIds($customerIds);
|
13 |
-
|
14 |
-
if ($customerIds) {
|
15 |
-
$attribute = $this->getAttribute('customer_activated');
|
16 |
-
$table = $attribute->getBackend()->getTable();
|
17 |
-
$select = $this->getReadConnection()->select()
|
18 |
-
->from($table, 'entity_id')
|
19 |
-
->where('entity_id IN (?)', $customerIds)
|
20 |
-
->where('attribute_id = ?', $attribute->getId())
|
21 |
-
->where('value = ?', $value);
|
22 |
-
$noChangeIds = $this->_getReadAdapter()->fetchCol($select);
|
23 |
-
|
24 |
-
$changeIds = array_diff($customerIds, $noChangeIds);
|
25 |
-
$select = $this->_getReadAdapter()->select()
|
26 |
-
->from($table, 'entity_id')
|
27 |
-
->where('entity_id IN (?)', $changeIds)
|
28 |
-
->where('attribute_id = ?', $attribute->getId());
|
29 |
-
|
30 |
-
$updateIds = $this->_getReadAdapter()->fetchCol($select);
|
31 |
-
$insertIds = array_diff($changeIds, $updateIds);
|
32 |
-
|
33 |
-
if ($updateIds) {
|
34 |
-
$cond = $this->_getWriteAdapter()->quoteInto('entity_type_id = ?', $this->getEntityType()->getId());
|
35 |
-
$cond .= $this->_getWriteAdapter()->quoteInto(' AND attribute_id = ?', $attribute->getId());
|
36 |
-
$cond .= $this->_getWriteAdapter()->quoteInto(' AND entity_id IN (?)', $updateIds);
|
37 |
-
$this->_getWriteAdapter()->update($table, array('value' => $value), $cond);
|
38 |
-
}
|
39 |
-
if ($insertIds) {
|
40 |
-
$rows = array();
|
41 |
-
foreach ($insertIds as $customerId) {
|
42 |
-
$rows[] = array(
|
43 |
-
'entity_type_id' => $this->getEntityType()->getId(),
|
44 |
-
'attribute_id' => $attribute->getId(),
|
45 |
-
'entity_id' => $customerId,
|
46 |
-
'value' => $value
|
47 |
-
);
|
48 |
-
}
|
49 |
-
$this->_getWriteAdapter()->insertMultiple($table, $rows);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
return $changeIds;
|
53 |
-
}
|
54 |
-
|
55 |
-
protected function _getValidCustomerIds(array $customerIds) {
|
56 |
-
$column = $this->getEntityIdField();
|
57 |
-
$select = $this->_getReadAdapter()->select()
|
58 |
-
->from($this->getEntityTable(), $column)
|
59 |
-
->where($column . ' IN (?)', $customerIds);
|
60 |
-
return $this->_getReadAdapter()->fetchCol($select);
|
61 |
-
}
|
62 |
-
|
63 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Resource_Customer extends Mage_Eav_Model_Entity_Abstract {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
$this->setType('customer');
|
7 |
+
$this->setConnection('customer_read', 'customer_write');
|
8 |
+
return parent::_construct();
|
9 |
+
}
|
10 |
+
|
11 |
+
public function massSetActivationStatus(array $customerIds, $value) {
|
12 |
+
$customerIds = $this->_getValidCustomerIds($customerIds);
|
13 |
+
|
14 |
+
if ($customerIds) {
|
15 |
+
$attribute = $this->getAttribute('customer_activated');
|
16 |
+
$table = $attribute->getBackend()->getTable();
|
17 |
+
$select = $this->getReadConnection()->select()
|
18 |
+
->from($table, 'entity_id')
|
19 |
+
->where('entity_id IN (?)', $customerIds)
|
20 |
+
->where('attribute_id = ?', $attribute->getId())
|
21 |
+
->where('value = ?', $value);
|
22 |
+
$noChangeIds = $this->_getReadAdapter()->fetchCol($select);
|
23 |
+
|
24 |
+
$changeIds = array_diff($customerIds, $noChangeIds);
|
25 |
+
$select = $this->_getReadAdapter()->select()
|
26 |
+
->from($table, 'entity_id')
|
27 |
+
->where('entity_id IN (?)', $changeIds)
|
28 |
+
->where('attribute_id = ?', $attribute->getId());
|
29 |
+
|
30 |
+
$updateIds = $this->_getReadAdapter()->fetchCol($select);
|
31 |
+
$insertIds = array_diff($changeIds, $updateIds);
|
32 |
+
|
33 |
+
if ($updateIds) {
|
34 |
+
$cond = $this->_getWriteAdapter()->quoteInto('entity_type_id = ?', $this->getEntityType()->getId());
|
35 |
+
$cond .= $this->_getWriteAdapter()->quoteInto(' AND attribute_id = ?', $attribute->getId());
|
36 |
+
$cond .= $this->_getWriteAdapter()->quoteInto(' AND entity_id IN (?)', $updateIds);
|
37 |
+
$this->_getWriteAdapter()->update($table, array('value' => $value), $cond);
|
38 |
+
}
|
39 |
+
if ($insertIds) {
|
40 |
+
$rows = array();
|
41 |
+
foreach ($insertIds as $customerId) {
|
42 |
+
$rows[] = array(
|
43 |
+
'entity_type_id' => $this->getEntityType()->getId(),
|
44 |
+
'attribute_id' => $attribute->getId(),
|
45 |
+
'entity_id' => $customerId,
|
46 |
+
'value' => $value
|
47 |
+
);
|
48 |
+
}
|
49 |
+
$this->_getWriteAdapter()->insertMultiple($table, $rows);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
return $changeIds;
|
53 |
+
}
|
54 |
+
|
55 |
+
protected function _getValidCustomerIds(array $customerIds) {
|
56 |
+
$column = $this->getEntityIdField();
|
57 |
+
$select = $this->_getReadAdapter()->select()
|
58 |
+
->from($this->getEntityTable(), $column)
|
59 |
+
->where($column . ' IN (?)', $customerIds);
|
60 |
+
return $this->_getReadAdapter()->fetchCol($select);
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Subscriber.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Subscriber extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Init model
|
7 |
-
*/
|
8 |
-
protected function _construct()
|
9 |
-
{
|
10 |
-
$this->_init('outofstocksubscription/info');
|
11 |
-
}
|
12 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Subscriber extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Init model
|
7 |
+
*/
|
8 |
+
protected function _construct()
|
9 |
+
{
|
10 |
+
$this->_init('outofstocksubscription/info');
|
11 |
+
}
|
12 |
}
|
app/code/community/Exinent/CustomerActivation/Model/Thirdparty.php
CHANGED
@@ -1,61 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Thirdparty extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
-
|
5 |
-
protected $_code = 'thirdparty';
|
6 |
-
|
7 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
-
$result = Mage::getModel('shipping/rate_result');
|
9 |
-
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
-
$result->append($this->_getStandardShippingRate());
|
11 |
-
return $result;
|
12 |
-
}
|
13 |
-
|
14 |
-
protected function _getStandardShippingRate() {
|
15 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
16 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
17 |
-
|
18 |
-
$rate->setCarrier($this->_code);
|
19 |
-
/**
|
20 |
-
* getConfigData(config_key) returns the configuration value for the
|
21 |
-
* carriers/[carrier_code]/[config_key]
|
22 |
-
*/
|
23 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
24 |
-
$rate->setMethod('standand');
|
25 |
-
$rate->setMethodTitle('Standard');
|
26 |
-
$rate->setPrice(0);
|
27 |
-
$rate->setCost(0);
|
28 |
-
return $rate;
|
29 |
-
}
|
30 |
-
|
31 |
-
protected function _getExpressShippingRate() {
|
32 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
33 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
34 |
-
$rate->setCarrier($this->_code);
|
35 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
36 |
-
$rate->setMethod('express');
|
37 |
-
$rate->setMethodTitle('Express (Next day)');
|
38 |
-
$rate->setPrice(12.99);
|
39 |
-
$rate->setCost(0);
|
40 |
-
return $rate;
|
41 |
-
}
|
42 |
-
|
43 |
-
protected function _getFreeShippingRate() {
|
44 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
45 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
46 |
-
$rate->setCarrier($this->_code);
|
47 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
48 |
-
$rate->setMethod('free_shipping');
|
49 |
-
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
50 |
-
$rate->setPrice(0);
|
51 |
-
$rate->setCost(0);
|
52 |
-
return $rate;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function getAllowedMethods() {
|
56 |
-
return array(
|
57 |
-
'standard' => 'Standard',
|
58 |
-
);
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Thirdparty extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
+
|
5 |
+
protected $_code = 'thirdparty';
|
6 |
+
|
7 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
+
$result = Mage::getModel('shipping/rate_result');
|
9 |
+
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
+
$result->append($this->_getStandardShippingRate());
|
11 |
+
return $result;
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _getStandardShippingRate() {
|
15 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
16 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
17 |
+
|
18 |
+
$rate->setCarrier($this->_code);
|
19 |
+
/**
|
20 |
+
* getConfigData(config_key) returns the configuration value for the
|
21 |
+
* carriers/[carrier_code]/[config_key]
|
22 |
+
*/
|
23 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
24 |
+
$rate->setMethod('standand');
|
25 |
+
$rate->setMethodTitle('Standard');
|
26 |
+
$rate->setPrice(0);
|
27 |
+
$rate->setCost(0);
|
28 |
+
return $rate;
|
29 |
+
}
|
30 |
+
|
31 |
+
protected function _getExpressShippingRate() {
|
32 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
33 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
34 |
+
$rate->setCarrier($this->_code);
|
35 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
36 |
+
$rate->setMethod('express');
|
37 |
+
$rate->setMethodTitle('Express (Next day)');
|
38 |
+
$rate->setPrice(12.99);
|
39 |
+
$rate->setCost(0);
|
40 |
+
return $rate;
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function _getFreeShippingRate() {
|
44 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
45 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
46 |
+
$rate->setCarrier($this->_code);
|
47 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
48 |
+
$rate->setMethod('free_shipping');
|
49 |
+
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
50 |
+
$rate->setPrice(0);
|
51 |
+
$rate->setCost(0);
|
52 |
+
return $rate;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getAllowedMethods() {
|
56 |
+
return array(
|
57 |
+
'standard' => 'Standard',
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Thirdpartyfed.php
CHANGED
@@ -1,62 +1,62 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Thirdpartyfed extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
-
|
5 |
-
protected $_code = 'thirdpartyfed';
|
6 |
-
|
7 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
-
$result = Mage::getModel('shipping/rate_result');
|
9 |
-
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
-
|
11 |
-
$result->append($this->_getStandardShippingRate());
|
12 |
-
return $result;
|
13 |
-
}
|
14 |
-
|
15 |
-
protected function _getStandardShippingRate() {
|
16 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
17 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
18 |
-
|
19 |
-
$rate->setCarrier($this->_code);
|
20 |
-
/**
|
21 |
-
* getConfigData(config_key) returns the configuration value for the
|
22 |
-
* carriers/[carrier_code]/[config_key]
|
23 |
-
*/
|
24 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
25 |
-
$rate->setMethod('standand');
|
26 |
-
$rate->setMethodTitle('Standard');
|
27 |
-
$rate->setPrice(0);
|
28 |
-
$rate->setCost(0);
|
29 |
-
return $rate;
|
30 |
-
}
|
31 |
-
|
32 |
-
protected function _getExpressShippingRate() {
|
33 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
34 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
35 |
-
$rate->setCarrier($this->_code);
|
36 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
37 |
-
$rate->setMethod('express');
|
38 |
-
$rate->setMethodTitle('Express (Next day)');
|
39 |
-
$rate->setPrice(12.99);
|
40 |
-
$rate->setCost(0);
|
41 |
-
return $rate;
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function _getFreeShippingRate() {
|
45 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
46 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
47 |
-
$rate->setCarrier($this->_code);
|
48 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
49 |
-
$rate->setMethod('free_shipping');
|
50 |
-
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
51 |
-
$rate->setPrice(0);
|
52 |
-
$rate->setCost(0);
|
53 |
-
return $rate;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getAllowedMethods() {
|
57 |
-
return array(
|
58 |
-
'standard' => 'Standard',
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Thirdpartyfed extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
+
|
5 |
+
protected $_code = 'thirdpartyfed';
|
6 |
+
|
7 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
+
$result = Mage::getModel('shipping/rate_result');
|
9 |
+
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
+
|
11 |
+
$result->append($this->_getStandardShippingRate());
|
12 |
+
return $result;
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _getStandardShippingRate() {
|
16 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
17 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
18 |
+
|
19 |
+
$rate->setCarrier($this->_code);
|
20 |
+
/**
|
21 |
+
* getConfigData(config_key) returns the configuration value for the
|
22 |
+
* carriers/[carrier_code]/[config_key]
|
23 |
+
*/
|
24 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
25 |
+
$rate->setMethod('standand');
|
26 |
+
$rate->setMethodTitle('Standard');
|
27 |
+
$rate->setPrice(0);
|
28 |
+
$rate->setCost(0);
|
29 |
+
return $rate;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function _getExpressShippingRate() {
|
33 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
34 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
35 |
+
$rate->setCarrier($this->_code);
|
36 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
37 |
+
$rate->setMethod('express');
|
38 |
+
$rate->setMethodTitle('Express (Next day)');
|
39 |
+
$rate->setPrice(12.99);
|
40 |
+
$rate->setCost(0);
|
41 |
+
return $rate;
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _getFreeShippingRate() {
|
45 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
46 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
47 |
+
$rate->setCarrier($this->_code);
|
48 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
49 |
+
$rate->setMethod('free_shipping');
|
50 |
+
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
51 |
+
$rate->setPrice(0);
|
52 |
+
$rate->setCost(0);
|
53 |
+
return $rate;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getAllowedMethods() {
|
57 |
+
return array(
|
58 |
+
'standard' => 'Standard',
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Thirdpartyfedex.php
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Thirdpartyfedex extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
-
|
5 |
-
protected $_code = 'thirdpartyfedex';
|
6 |
-
|
7 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
-
$result = Mage::getModel('shipping/rate_result');
|
9 |
-
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
-
|
11 |
-
$result->append($this->_getStandardShippingRate());
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
return $result;
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function _getStandardShippingRate() {
|
19 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
20 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
21 |
-
|
22 |
-
$rate->setCarrier($this->_code);
|
23 |
-
/**
|
24 |
-
* getConfigData(config_key) returns the configuration value for the
|
25 |
-
* carriers/[carrier_code]/[config_key]
|
26 |
-
*/
|
27 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
28 |
-
|
29 |
-
$rate->setMethod('standand');
|
30 |
-
$rate->setMethodTitle('Standard');
|
31 |
-
|
32 |
-
$rate->setPrice(0);
|
33 |
-
$rate->setCost(0);
|
34 |
-
|
35 |
-
return $rate;
|
36 |
-
}
|
37 |
-
|
38 |
-
protected function _getExpressShippingRate() {
|
39 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
40 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
41 |
-
$rate->setCarrier($this->_code);
|
42 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
43 |
-
$rate->setMethod('express');
|
44 |
-
$rate->setMethodTitle('Express (Next day)');
|
45 |
-
$rate->setPrice(12.99);
|
46 |
-
$rate->setCost(0);
|
47 |
-
return $rate;
|
48 |
-
}
|
49 |
-
|
50 |
-
protected function _getFreeShippingRate() {
|
51 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
52 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
53 |
-
$rate->setCarrier($this->_code);
|
54 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
55 |
-
$rate->setMethod('free_shipping');
|
56 |
-
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
57 |
-
$rate->setPrice(0);
|
58 |
-
$rate->setCost(0);
|
59 |
-
return $rate;
|
60 |
-
}
|
61 |
-
|
62 |
-
public function getAllowedMethods() {
|
63 |
-
return array(
|
64 |
-
'standard' => 'Standard',
|
65 |
-
);
|
66 |
-
}
|
67 |
-
|
68 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Thirdpartyfedex extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
+
|
5 |
+
protected $_code = 'thirdpartyfedex';
|
6 |
+
|
7 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
+
$result = Mage::getModel('shipping/rate_result');
|
9 |
+
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
+
|
11 |
+
$result->append($this->_getStandardShippingRate());
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
return $result;
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _getStandardShippingRate() {
|
19 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
20 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
21 |
+
|
22 |
+
$rate->setCarrier($this->_code);
|
23 |
+
/**
|
24 |
+
* getConfigData(config_key) returns the configuration value for the
|
25 |
+
* carriers/[carrier_code]/[config_key]
|
26 |
+
*/
|
27 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
28 |
+
|
29 |
+
$rate->setMethod('standand');
|
30 |
+
$rate->setMethodTitle('Standard');
|
31 |
+
|
32 |
+
$rate->setPrice(0);
|
33 |
+
$rate->setCost(0);
|
34 |
+
|
35 |
+
return $rate;
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _getExpressShippingRate() {
|
39 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
40 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
41 |
+
$rate->setCarrier($this->_code);
|
42 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
43 |
+
$rate->setMethod('express');
|
44 |
+
$rate->setMethodTitle('Express (Next day)');
|
45 |
+
$rate->setPrice(12.99);
|
46 |
+
$rate->setCost(0);
|
47 |
+
return $rate;
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function _getFreeShippingRate() {
|
51 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
52 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
53 |
+
$rate->setCarrier($this->_code);
|
54 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
55 |
+
$rate->setMethod('free_shipping');
|
56 |
+
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
57 |
+
$rate->setPrice(0);
|
58 |
+
$rate->setCost(0);
|
59 |
+
return $rate;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getAllowedMethods() {
|
63 |
+
return array(
|
64 |
+
'standard' => 'Standard',
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
app/code/community/Exinent/CustomerActivation/Model/Thirdpartyups.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_Model_Thirdpartyups extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
-
|
5 |
-
protected $_code = 'thirdpartyups';
|
6 |
-
|
7 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
-
$result = Mage::getModel('shipping/rate_result');
|
9 |
-
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
-
|
11 |
-
$result->append($this->_getStandardShippingRate());
|
12 |
-
|
13 |
-
|
14 |
-
return $result;
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function _getStandardShippingRate() {
|
18 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
19 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
20 |
-
|
21 |
-
$rate->setCarrier($this->_code);
|
22 |
-
/**
|
23 |
-
* getConfigData(config_key) returns the configuration value for the
|
24 |
-
* carriers/[carrier_code]/[config_key]
|
25 |
-
*/
|
26 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
27 |
-
|
28 |
-
$rate->setMethod('standand');
|
29 |
-
$rate->setMethodTitle('Standard');
|
30 |
-
|
31 |
-
$rate->setPrice(0);
|
32 |
-
$rate->setCost(0);
|
33 |
-
|
34 |
-
return $rate;
|
35 |
-
}
|
36 |
-
|
37 |
-
protected function _getExpressShippingRate() {
|
38 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
39 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
40 |
-
$rate->setCarrier($this->_code);
|
41 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
42 |
-
$rate->setMethod('express');
|
43 |
-
$rate->setMethodTitle('Express (Next day)');
|
44 |
-
$rate->setPrice(12.99);
|
45 |
-
$rate->setCost(0);
|
46 |
-
return $rate;
|
47 |
-
}
|
48 |
-
|
49 |
-
protected function _getFreeShippingRate() {
|
50 |
-
$rate = Mage::getModel('shipping/rate_result_method');
|
51 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
52 |
-
$rate->setCarrier($this->_code);
|
53 |
-
$rate->setCarrierTitle($this->getConfigData('title'));
|
54 |
-
$rate->setMethod('free_shipping');
|
55 |
-
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
56 |
-
$rate->setPrice(0);
|
57 |
-
$rate->setCost(0);
|
58 |
-
return $rate;
|
59 |
-
}
|
60 |
-
|
61 |
-
public function getAllowedMethods() {
|
62 |
-
return array(
|
63 |
-
'standard' => 'Standard',
|
64 |
-
);
|
65 |
-
}
|
66 |
-
|
67 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_Model_Thirdpartyups extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
4 |
+
|
5 |
+
protected $_code = 'thirdpartyups';
|
6 |
+
|
7 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
+
$result = Mage::getModel('shipping/rate_result');
|
9 |
+
/* @var $result Mage_Shipping_Model_Rate_Result */
|
10 |
+
|
11 |
+
$result->append($this->_getStandardShippingRate());
|
12 |
+
|
13 |
+
|
14 |
+
return $result;
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _getStandardShippingRate() {
|
18 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
19 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
20 |
+
|
21 |
+
$rate->setCarrier($this->_code);
|
22 |
+
/**
|
23 |
+
* getConfigData(config_key) returns the configuration value for the
|
24 |
+
* carriers/[carrier_code]/[config_key]
|
25 |
+
*/
|
26 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
27 |
+
|
28 |
+
$rate->setMethod('standand');
|
29 |
+
$rate->setMethodTitle('Standard');
|
30 |
+
|
31 |
+
$rate->setPrice(0);
|
32 |
+
$rate->setCost(0);
|
33 |
+
|
34 |
+
return $rate;
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _getExpressShippingRate() {
|
38 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
39 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
40 |
+
$rate->setCarrier($this->_code);
|
41 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
42 |
+
$rate->setMethod('express');
|
43 |
+
$rate->setMethodTitle('Express (Next day)');
|
44 |
+
$rate->setPrice(12.99);
|
45 |
+
$rate->setCost(0);
|
46 |
+
return $rate;
|
47 |
+
}
|
48 |
+
|
49 |
+
protected function _getFreeShippingRate() {
|
50 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
51 |
+
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
52 |
+
$rate->setCarrier($this->_code);
|
53 |
+
$rate->setCarrierTitle($this->getConfigData('title'));
|
54 |
+
$rate->setMethod('free_shipping');
|
55 |
+
$rate->setMethodTitle('Free Shipping (3 - 5 days)');
|
56 |
+
$rate->setPrice(0);
|
57 |
+
$rate->setCost(0);
|
58 |
+
return $rate;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getAllowedMethods() {
|
62 |
+
return array(
|
63 |
+
'standard' => 'Standard',
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/AccountController.php
CHANGED
@@ -1,427 +1,430 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Fontis Recaptcha Extension
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
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/osl-3.0.php
|
12 |
-
* If you did not receive a copy of the license and are unable to
|
13 |
-
* obtain it through the world-wide-web, please send an email
|
14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
-
*
|
16 |
-
* @category Fontis
|
17 |
-
* @package Fontis_Recaptcha
|
18 |
-
* @author Denis Margetic
|
19 |
-
* @author Chris Norton
|
20 |
-
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
-
*/
|
23 |
-
include_once "Mage/Customer/controllers/AccountController.php";
|
24 |
-
|
25 |
-
class Exinent_CustomerActivation_AccountController extends Mage_Customer_AccountController {
|
26 |
-
const XML_PATH_ACTIVATION_STATUS = 'customer/customeractivation/activation_status_default';
|
27 |
-
public function createPostAction() {
|
28 |
-
/** @var $session Mage_Customer_Model_Session */
|
29 |
-
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/customer", Mage::app()->getStore()) && !($this->getRequest()->getPost('group_id'))) { // check that recaptcha is actually enabled
|
30 |
-
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key", Mage::app()->getStore());
|
31 |
-
|
32 |
-
// check response
|
33 |
-
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]
|
34 |
-
);
|
35 |
-
|
36 |
-
|
37 |
-
if ($resp == true) { // if recaptcha response is correct, use core functionality
|
38 |
-
$this->getgeneralCustomer();
|
39 |
-
parent::createPostAction();
|
40 |
-
} else {
|
41 |
-
|
42 |
-
$this->_getSession()->addError($this->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
43 |
-
$this->_getSession()->setCustomerFormData($this->getRequest()->getPost());
|
44 |
-
$this->_redirectReferer();
|
45 |
-
return;
|
46 |
-
}
|
47 |
-
} else { // if recaptcha is not enabled, use core function
|
48 |
-
$session = $this->_getSession();
|
49 |
-
if ($session->isLoggedIn()) {
|
50 |
-
$this->_redirect('*/*/');
|
51 |
-
return;
|
52 |
-
}
|
53 |
-
$session->setEscapeMessages(true); // prevent XSS injection in user input
|
54 |
-
if (!$this->getRequest()->isPost()) {
|
55 |
-
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
56 |
-
$this->_redirectError($errUrl);
|
57 |
-
return;
|
58 |
-
}
|
59 |
-
|
60 |
-
$customer = $this->_getCustomer();
|
61 |
-
|
62 |
-
|
63 |
-
$
|
64 |
-
|
65 |
-
|
66 |
-
//
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
$
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
$customer->
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
//
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
'
|
103 |
-
'
|
104 |
-
'
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
->
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$customer
|
124 |
-
|
125 |
-
$
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
$customer->
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
'
|
154 |
-
'
|
155 |
-
'
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
'
|
182 |
-
'
|
183 |
-
'
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
}
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
$customer->
|
222 |
-
$customer->
|
223 |
-
$customer->
|
224 |
-
$customer->
|
225 |
-
$customer->
|
226 |
-
$customer->
|
227 |
-
$customer->
|
228 |
-
$
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
$
|
240 |
-
$uploader
|
241 |
-
$uploader->
|
242 |
-
$
|
243 |
-
$uploader->
|
244 |
-
$
|
245 |
-
$
|
246 |
-
$
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
}
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
$
|
259 |
-
$
|
260 |
-
$
|
261 |
-
$
|
262 |
-
$
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
}
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
$
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
$message = $
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
}
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
$message = $
|
363 |
-
break;
|
364 |
-
|
365 |
-
$message = $e->getMessage();
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
Mage::getModel('core/session')->
|
387 |
-
|
388 |
-
}
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
} else {
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
if (
|
420 |
-
$session->
|
421 |
-
}
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
}
|
426 |
-
|
427 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Fontis Recaptcha Extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
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/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Fontis
|
17 |
+
* @package Fontis_Recaptcha
|
18 |
+
* @author Denis Margetic
|
19 |
+
* @author Chris Norton
|
20 |
+
* @copyright Copyright (c) 2011 Fontis Pty. Ltd. (http://www.fontis.com.au)
|
21 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
+
*/
|
23 |
+
include_once "Mage/Customer/controllers/AccountController.php";
|
24 |
+
|
25 |
+
class Exinent_CustomerActivation_AccountController extends Mage_Customer_AccountController {
|
26 |
+
const XML_PATH_ACTIVATION_STATUS = 'customer/customeractivation/activation_status_default';
|
27 |
+
public function createPostAction() {
|
28 |
+
/** @var $session Mage_Customer_Model_Session */
|
29 |
+
if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/customer", Mage::app()->getStore()) && !($this->getRequest()->getPost('group_id'))) { // check that recaptcha is actually enabled
|
30 |
+
$privatekey = Mage::getStoreConfig("fontis_recaptcha/setup/private_key", Mage::app()->getStore());
|
31 |
+
|
32 |
+
// check response
|
33 |
+
$resp = Mage::helper("fontis_recaptcha")->recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]
|
34 |
+
);
|
35 |
+
|
36 |
+
|
37 |
+
if ($resp == true) { // if recaptcha response is correct, use core functionality
|
38 |
+
$this->getgeneralCustomer();
|
39 |
+
parent::createPostAction();
|
40 |
+
} else {
|
41 |
+
|
42 |
+
$this->_getSession()->addError($this->__('Your reCAPTCHA entry is incorrect. Please try again.'));
|
43 |
+
$this->_getSession()->setCustomerFormData($this->getRequest()->getPost());
|
44 |
+
$this->_redirectReferer();
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
} else { // if recaptcha is not enabled, use core function
|
48 |
+
$session = $this->_getSession();
|
49 |
+
if ($session->isLoggedIn()) {
|
50 |
+
$this->_redirect('*/*/');
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
$session->setEscapeMessages(true); // prevent XSS injection in user input
|
54 |
+
if (!$this->getRequest()->isPost()) {
|
55 |
+
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
56 |
+
$this->_redirectError($errUrl);
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
$customer = $this->_getCustomer();
|
61 |
+
//$default_address = $this->getRequest()->getPost('default_shipping');
|
62 |
+
|
63 |
+
$default_address = $this->getRequest()->getPost('both_not_same'); // Akash added new hidden field for checking
|
64 |
+
|
65 |
+
$shipping_address = $this->getRequest()->getPost('shipping');
|
66 |
+
//echo "<pre>";print_r($this->getRequest()->getPost());
|
67 |
+
//echo "<pre>";print_r($this->getRequest()->getPost('shipping'));die();
|
68 |
+
|
69 |
+
//Billing & shipping address both are same
|
70 |
+
if ($default_address == 1) {
|
71 |
+
$customer = Mage::getModel('customer/customer');
|
72 |
+
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
73 |
+
$customer->loadByEmail($this->getRequest()->getPost('email'));
|
74 |
+
$street = $this->getRequest()->getPost('street');
|
75 |
+
|
76 |
+
if (!$customer->getId()) {
|
77 |
+
$customer->setEmail($this->getRequest()->getPost('email'));
|
78 |
+
$customer->setFirstname($this->getRequest()->getPost('firstname'));
|
79 |
+
$customer->setLastname($this->getRequest()->getPost('lastname'));
|
80 |
+
$customer->setPassword($this->getRequest()->getPost('password'));
|
81 |
+
}
|
82 |
+
|
83 |
+
try {
|
84 |
+
$customer->save(); //// Akash saved customer
|
85 |
+
$customer->setConfirmation(null);
|
86 |
+
// $customer->save();
|
87 |
+
|
88 |
+
//Make a "login" of new customer
|
89 |
+
Mage::getSingleton('customer/session')->loginById($customer->getId());
|
90 |
+
} catch (Exception $ex) {
|
91 |
+
//Zend_Debug::dump($ex->getMessage());
|
92 |
+
}
|
93 |
+
|
94 |
+
//create customer address array & set billing and shipping as same
|
95 |
+
$_custom_address = array(
|
96 |
+
'firstname' => $this->getRequest()->getPost('firstname'),
|
97 |
+
'lastname' => $this->getRequest()->getPost('lastname'),
|
98 |
+
'street' => array(
|
99 |
+
'0' => $street[0],
|
100 |
+
'1' => $street[1],
|
101 |
+
),
|
102 |
+
'city' => $this->getRequest()->getPost('city'),
|
103 |
+
'region_id' => $this->getRequest()->getPost('region_id'),
|
104 |
+
'region' => $this->getRequest()->getPost('region'),
|
105 |
+
'postcode' => $this->getRequest()->getPost('postcode'),
|
106 |
+
'country_id' => $this->getRequest()->getPost('country_id'),
|
107 |
+
'telephone' => $this->getRequest()->getPost('telephone'),
|
108 |
+
);
|
109 |
+
|
110 |
+
$customAddress = Mage::getModel('customer/address');
|
111 |
+
$customAddress->setData($_custom_address)
|
112 |
+
->setCustomerId($customer->getId())
|
113 |
+
->setIsDefaultBilling('1')
|
114 |
+
->setIsDefaultShipping('1')
|
115 |
+
->setSaveInAddressBook('1');
|
116 |
+
|
117 |
+
try {
|
118 |
+
$customAddress->save();
|
119 |
+
} catch (Exception $ex) {
|
120 |
+
//Zend_Debug::dump($ex->getMessage());
|
121 |
+
}
|
122 |
+
} else { //Billing & shipping address both are not same
|
123 |
+
$customer = Mage::getModel('customer/customer');
|
124 |
+
|
125 |
+
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
126 |
+
$customer->loadByEmail($this->getRequest()->getPost('email'));
|
127 |
+
|
128 |
+
$street = $this->getRequest()->getPost('street');
|
129 |
+
if (!$customer->getId()) {
|
130 |
+
$customer->setEmail($this->getRequest()->getPost('email'));
|
131 |
+
$customer->setFirstname($this->getRequest()->getPost('firstname'));
|
132 |
+
$customer->setLastname($this->getRequest()->getPost('lastname'));
|
133 |
+
$customer->setPassword($this->getRequest()->getPost('password'));
|
134 |
+
}
|
135 |
+
|
136 |
+
try {
|
137 |
+
$customer->setConfirmation(null);
|
138 |
+
$customer->save();
|
139 |
+
//Make a "login" of new customer
|
140 |
+
Mage::getSingleton('customer/session')->loginById($customer->getId());
|
141 |
+
} catch (Exception $ex) {
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
//Billing address array and save customer address
|
146 |
+
$_custom_billing_address = array(
|
147 |
+
'firstname' => $this->getRequest()->getPost('firstname'),
|
148 |
+
'lastname' => $this->getRequest()->getPost('lastname'),
|
149 |
+
'street' => array(
|
150 |
+
'0' => $street[0],
|
151 |
+
'1' => $street[1],
|
152 |
+
),
|
153 |
+
'city' => $this->getRequest()->getPost('city'),
|
154 |
+
'region_id' => $this->getRequest()->getPost('region_id'),
|
155 |
+
'region' => $this->getRequest()->getPost('region'),
|
156 |
+
'postcode' => $this->getRequest()->getPost('postcode'),
|
157 |
+
'country_id' => $this->getRequest()->getPost('country_id'),
|
158 |
+
'telephone' => $this->getRequest()->getPost('telephone'),
|
159 |
+
);
|
160 |
+
|
161 |
+
$customAddress_billing = Mage::getModel('customer/address');
|
162 |
+
$customAddress_billing->setData($_custom_billing_address)
|
163 |
+
->setCustomerId($customer->getId())
|
164 |
+
->setIsDefaultBilling('1')
|
165 |
+
->setSaveInAddressBook('1');
|
166 |
+
|
167 |
+
try {
|
168 |
+
$customAddress_billing->save();
|
169 |
+
} catch (Exception $ex) {
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
//Shipping address array and save customer address
|
174 |
+
$_custom_shipping_address = array(
|
175 |
+
'firstname' => $this->getRequest()->getPost('firstname'),
|
176 |
+
'lastname' => $this->getRequest()->getPost('lastname'),
|
177 |
+
'street' => array(
|
178 |
+
'0' => $shipping_address['street'][0],
|
179 |
+
'1' => $shipping_address['street'][1],
|
180 |
+
),
|
181 |
+
'city' => $shipping_address['city'],
|
182 |
+
'region_id' => $shipping_address['region'],
|
183 |
+
'region' => $shipping_address['region'],
|
184 |
+
'postcode' => $shipping_address['postcode'],
|
185 |
+
'country_id' => $shipping_address['country_id'],
|
186 |
+
'telephone' => $shipping_address['telephone'],
|
187 |
+
);
|
188 |
+
|
189 |
+
$customAddress_shipping = Mage::getModel('customer/address');
|
190 |
+
$customAddress_shipping->setData($_custom_shipping_address)
|
191 |
+
->setCustomerId($customer->getId())
|
192 |
+
->setIsDefaultShipping('1')
|
193 |
+
->setSaveInAddressBook('1');
|
194 |
+
|
195 |
+
try {
|
196 |
+
$customAddress_shipping->save();
|
197 |
+
} catch (Exception $ex) {
|
198 |
+
$message = $ex->getMessage();
|
199 |
+
print_r($message);
|
200 |
+
}
|
201 |
+
//die();
|
202 |
+
}
|
203 |
+
|
204 |
+
//set extra parameters and save customer
|
205 |
+
|
206 |
+
//// Akash
|
207 |
+
if ($this->getRequest()->getPost('group_id')) {
|
208 |
+
$customer->setGroupId($this->getRequest()->getPost('group_id'));
|
209 |
+
} else {
|
210 |
+
$customer->getGroupId();
|
211 |
+
}
|
212 |
+
$storeId = Mage::helper('customeractivation')->getCustomerStoreId($customer);
|
213 |
+
$defaultStatus = Mage::helper('customeractivation')->getDefaultActivationStatus($this->getRequest()->getPost('group_id'), $storeId);
|
214 |
+
if (Mage::getStoreConfig(self::XML_PATH_ACTIVATION_STATUS, Mage::app()->getStore()) == 1) {
|
215 |
+
$customer->setCustomerActivated('1');
|
216 |
+
}else{
|
217 |
+
$customer->setCustomerActivated('New');
|
218 |
+
}
|
219 |
+
//// Akash
|
220 |
+
|
221 |
+
$customer->setUniqueloginId(Mage::helper('core')->getRandomString(9, '0123456789'));
|
222 |
+
$customer->setUpsNumber($this->getRequest()->getPost('upsnumber'));
|
223 |
+
$customer->setFedexNumber($this->getRequest()->getPost('fedexnumber'));
|
224 |
+
$customer->setAccountspayableEmail($this->getRequest()->getPost('accountpayble_email'));
|
225 |
+
$customer->setStoreType($this->getRequest()->getPost('storetype'));
|
226 |
+
$customer->setWebsiteUrl($this->getRequest()->getPost('website_url'));
|
227 |
+
$customer->setIswebsiteLive($this->getRequest()->getPost('iswebsitelive'));
|
228 |
+
$customer->setDateFounded($this->getRequest()->getPost('datefounded'));
|
229 |
+
$customer->setPaymentmethods($this->getRequest()->getPost('paymentterms'));
|
230 |
+
$customer->setRepresentativeEmail($this->getRequest()->getPost('representative_email'));
|
231 |
+
$brandsCarry = $this->getRequest()->getPost('brandsyoucarry');
|
232 |
+
|
233 |
+
if ($customer->getGroupId() == 2) {
|
234 |
+
$brands = implode(',', $brandsCarry);
|
235 |
+
$customer->setBrandsCarry($brands);
|
236 |
+
}
|
237 |
+
|
238 |
+
try {
|
239 |
+
$logoImage='';
|
240 |
+
$uploader = new Varien_File_Uploader('attachment');
|
241 |
+
$uploader->setFilesDispersion(true);
|
242 |
+
$uploader->setFilenamesCaseSensitivity(false);
|
243 |
+
$uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png', 'pdf'));
|
244 |
+
$uploader->setAllowRenameFiles(true);
|
245 |
+
$path = Mage::getBaseDir('media') . DS . 'customerlogs' . DS;
|
246 |
+
$uploader->save($path, $_FILES['attachment']['name']);
|
247 |
+
$fileName = $uploader->getUploadedFileName();
|
248 |
+
$logoImage = 'customerlogs/' . $fileName;
|
249 |
+
$customer->setLogoImage($logoImage);
|
250 |
+
|
251 |
+
} catch (Exception $e) {
|
252 |
+
echo $e->getMessage();
|
253 |
+
Mage::log($e->getMessage());
|
254 |
+
}
|
255 |
+
|
256 |
+
|
257 |
+
/*try {
|
258 |
+
$paymentreferenceImage = null;
|
259 |
+
$paymentreference = new Varien_File_Uploader('net30reference');
|
260 |
+
$uploader->setAllowedExtensions(array('doc', 'pdf', 'txt', 'docx', 'jpg', 'jpeg', 'gif', 'png'));
|
261 |
+
$paymentreference->setAllowRenameFiles(true);
|
262 |
+
$paymentreferencepath = Mage::getBaseDir('media') . DS . 'net30Reference' . DS;
|
263 |
+
$imgpath = $paymentreference->save($paymentreferencepath, $_FILES['net30reference']['name']);
|
264 |
+
$paymentreferenceImage = 'net30Reference/' . $_FILES['net30reference']['name'];
|
265 |
+
$customer->setNet30Reference($paymentreferenceImage);
|
266 |
+
} catch (Exception $e) {
|
267 |
+
echo $e->getMessage();
|
268 |
+
Mage::log($e->getMessage());
|
269 |
+
}*/
|
270 |
+
|
271 |
+
$customer->save();
|
272 |
+
|
273 |
+
$this->_dispatchRegisterSuccess($customer);
|
274 |
+
$this->_successProcessRegistration($customer);
|
275 |
+
//send email to customer
|
276 |
+
if ($customer->getGroupId() == 2) {
|
277 |
+
Mage::helper('customeractivation')->sendCustomer1NotificationEmail($customer);
|
278 |
+
}
|
279 |
+
|
280 |
+
$errUrl = $this->_getUrl('*/*/login', array('_secure' => true));
|
281 |
+
$this->_redirectError($errUrl);
|
282 |
+
}
|
283 |
+
}
|
284 |
+
|
285 |
+
public function getgeneralCustomer() {
|
286 |
+
/** @var $session Mage_Customer_Model_Session */
|
287 |
+
$session = $this->_getSession();
|
288 |
+
if ($session->isLoggedIn()) {
|
289 |
+
$this->_redirect('*/*/');
|
290 |
+
return;
|
291 |
+
}
|
292 |
+
$session->setEscapeMessages(true); // prevent XSS injection in user input
|
293 |
+
if (!$this->getRequest()->isPost()) {
|
294 |
+
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
295 |
+
$this->_redirectError($errUrl);
|
296 |
+
return;
|
297 |
+
}
|
298 |
+
|
299 |
+
$customer = $this->_getCustomer();
|
300 |
+
|
301 |
+
try {
|
302 |
+
$errors = $this->_getCustomerErrors($customer);
|
303 |
+
|
304 |
+
if (empty($errors)) {
|
305 |
+
//$customer->save();
|
306 |
+
//$this->_dispatchRegisterSuccess($customer);
|
307 |
+
//$this->_successProcessRegistration($customer);
|
308 |
+
|
309 |
+
Mage::helper('customeractivation')->sendCustomerNotificationEmail($customer);
|
310 |
+
|
311 |
+
|
312 |
+
return;
|
313 |
+
} else {
|
314 |
+
$this->_addSessionError($errors);
|
315 |
+
}
|
316 |
+
} catch (Mage_Core_Exception $e) {
|
317 |
+
$session->setCustomerFormData($this->getRequest()->getPost());
|
318 |
+
if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
|
319 |
+
$url = $this->_getUrl('customer/account/forgotpassword');
|
320 |
+
$message = $this->__('There is already an account with this email address. If you are sure that it is your email address, <a href="%s">click here</a> to get your password and access your account.', $url);
|
321 |
+
$session->setEscapeMessages(false);
|
322 |
+
} else {
|
323 |
+
$message = $e->getMessage();
|
324 |
+
}
|
325 |
+
$session->addError($message);
|
326 |
+
} catch (Exception $e) {
|
327 |
+
$session->setCustomerFormData($this->getRequest()->getPost())
|
328 |
+
->addException($e, $this->__('Cannot save the customer.'));
|
329 |
+
}
|
330 |
+
$errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
|
331 |
+
$this->_redirectError($errUrl);
|
332 |
+
}
|
333 |
+
|
334 |
+
public function loginPostAction() {
|
335 |
+
$groupid = $this->getRequest()->getParam('groupname');
|
336 |
+
Mage::getSingleton('customer/session')->unsetMygroupId();
|
337 |
+
Mage::getSingleton('customer/session')->setMygroupId($groupid);
|
338 |
+
Mage::register('groupId', $groupid);
|
339 |
+
if (!$this->_validateFormKey()) {
|
340 |
+
$this->_redirect('*/*/');
|
341 |
+
return;
|
342 |
+
}
|
343 |
+
|
344 |
+
if ($this->_getSession()->isLoggedIn()) {
|
345 |
+
$this->_redirect('*/*/');
|
346 |
+
return;
|
347 |
+
}
|
348 |
+
$session = $this->_getSession();
|
349 |
+
|
350 |
+
if ($this->getRequest()->isPost()) {
|
351 |
+
$login = $this->getRequest()->getPost('login');
|
352 |
+
if (!empty($login['username']) && !empty($login['password'])) {
|
353 |
+
try {
|
354 |
+
$session->login($login['username'], $login['password']);
|
355 |
+
if ($session->getCustomer()->getIsJustConfirmed()) {
|
356 |
+
$this->_welcomeCustomer($session->getCustomer(), true);
|
357 |
+
}
|
358 |
+
} catch (Mage_Core_Exception $e) {
|
359 |
+
switch ($e->getCode()) {
|
360 |
+
case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
|
361 |
+
$value = $this->_getHelper('customer')->getEmailConfirmationUrl($login['username']);
|
362 |
+
$message = $this->_getHelper('customer')->__('This account is not confirmed. <a href="%s">Click here</a> to resend confirmation email.', $value);
|
363 |
+
break;
|
364 |
+
case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
|
365 |
+
$message = $e->getMessage();
|
366 |
+
break;
|
367 |
+
default:
|
368 |
+
$message = $e->getMessage();
|
369 |
+
}
|
370 |
+
$session->addError($message);
|
371 |
+
$session->setUsername($login['username']);
|
372 |
+
} catch (Exception $e) {
|
373 |
+
// Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
|
374 |
+
}
|
375 |
+
} else {
|
376 |
+
$session->addError($this->__('Login and password are required.'));
|
377 |
+
}
|
378 |
+
}
|
379 |
+
$this->_loginPostRedirect();
|
380 |
+
}
|
381 |
+
|
382 |
+
protected function _loginPostRedirect() {
|
383 |
+
$mygroupId = Mage::getSingleton('customer/session')->getMygroupId();
|
384 |
+
$session = $this->_getSession();
|
385 |
+
if ($mygroupId != 2 || $session->getId() != null) {
|
386 |
+
Mage::getModel('core/session')->setMessages(Mage::getModel('core/message_collection'));
|
387 |
+
return parent::_loginPostRedirect();
|
388 |
+
} elseif ($mygroupId == 2 && $session->getId() == null) {
|
389 |
+
Mage::getModel('core/session')->addError('AccountId or Password is Invalid');
|
390 |
+
$this->_redirect('customerActivation/index/wholesalelogin/');
|
391 |
+
}
|
392 |
+
if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl()) {
|
393 |
+
// Set default URL to redirect customer to
|
394 |
+
$session->setBeforeAuthUrl($this->_getHelper('customer')->getAccountUrl());
|
395 |
+
// Redirect customer to the last page visited after logging in
|
396 |
+
if ($session->isLoggedIn()) {
|
397 |
+
if (!Mage::getStoreConfigFlag(
|
398 |
+
Mage_Customer_Helper_Data::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD
|
399 |
+
)) {
|
400 |
+
$referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);
|
401 |
+
if ($referer) {
|
402 |
+
// Rebuild referer URL to handle the case when SID was changed
|
403 |
+
$referer = $this->_getModel('core/url')
|
404 |
+
->getRebuiltUrl($this->_getHelper('core')->urlDecode($referer));
|
405 |
+
if ($this->_isUrlInternal($referer)) {
|
406 |
+
$session->setBeforeAuthUrl($referer);
|
407 |
+
}
|
408 |
+
}
|
409 |
+
} else if ($session->getAfterAuthUrl()) {
|
410 |
+
$session->setBeforeAuthUrl($session->getAfterAuthUrl(true));
|
411 |
+
}
|
412 |
+
} else {
|
413 |
+
$session->setBeforeAuthUrl($this->_getHelper('customer')->getLoginUrl());
|
414 |
+
}
|
415 |
+
} else if ($session->getBeforeAuthUrl() == $this->_getHelper('customer')->getLogoutUrl()) {
|
416 |
+
|
417 |
+
$session->setBeforeAuthUrl($this->_getHelper('customer')->getDashboardUrl());
|
418 |
+
} else {
|
419 |
+
if (!$session->getAfterAuthUrl()) {
|
420 |
+
$session->setAfterAuthUrl($session->getBeforeAuthUrl());
|
421 |
+
}
|
422 |
+
if ($session->isLoggedIn()) {
|
423 |
+
$session->setBeforeAuthUrl($session->getAfterAuthUrl(true));
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
}
|
429 |
+
|
430 |
+
?>
|
app/code/community/Exinent/CustomerActivation/controllers/AdminController.php
CHANGED
@@ -1,93 +1,93 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_AdminController extends Mage_Adminhtml_Controller_Action {
|
4 |
-
|
5 |
-
public function massActivationAction() {
|
6 |
-
|
7 |
-
$customerIds = $this->getRequest()->getParam('customer');
|
8 |
-
|
9 |
-
|
10 |
-
if (!is_array($customerIds)) {
|
11 |
-
Mage::getSingleton('adminhtml/session')->addError(
|
12 |
-
Mage::helper('customeractivation')->__('Please select item(s)')
|
13 |
-
);
|
14 |
-
} else {
|
15 |
-
$paramValue = $this->getRequest()->getParam('customer_activated');
|
16 |
-
|
17 |
-
|
18 |
-
try {
|
19 |
-
$updatedCustomerIds = Mage::getResourceModel('customeractivation/customer')->massSetActivationStatus(
|
20 |
-
$customerIds, $this->_shouldSetToActivated($paramValue)
|
21 |
-
);
|
22 |
-
|
23 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
24 |
-
Mage::helper('customeractivation')->__(
|
25 |
-
'Total of %d record(s) were successfully saved', count($updatedCustomerIds)
|
26 |
-
)
|
27 |
-
);
|
28 |
-
|
29 |
-
if ($this->_shouldSendActivationNotification($paramValue)) {
|
30 |
-
$this->_sendActivationNotificationEmails($updatedCustomerIds);
|
31 |
-
}
|
32 |
-
} catch (Exception $e) {
|
33 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
$this->_redirect('adminhtml/customer');
|
38 |
-
}
|
39 |
-
|
40 |
-
protected function _shouldSetToActivated($paramValue) {
|
41 |
-
switch ($paramValue) {
|
42 |
-
case 0:
|
43 |
-
$activationStatus = 0;
|
44 |
-
break;
|
45 |
-
case 1:
|
46 |
-
$activationStatus = 1;
|
47 |
-
break;
|
48 |
-
case 2:
|
49 |
-
$activationStatus = 2;
|
50 |
-
break;
|
51 |
-
case 4:
|
52 |
-
$activationStatus = 4;
|
53 |
-
break;
|
54 |
-
case 5:
|
55 |
-
$activationStatus = 5;
|
56 |
-
break;
|
57 |
-
default:
|
58 |
-
$activationStatus = 'New';
|
59 |
-
break;
|
60 |
-
}
|
61 |
-
return $activationStatus;
|
62 |
-
}
|
63 |
-
|
64 |
-
protected function _shouldSendActivationNotification($paramValue) {
|
65 |
-
switch ($paramValue) {
|
66 |
-
case Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITH_EMAIL:
|
67 |
-
$sendEmail = true;
|
68 |
-
break;
|
69 |
-
case Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITHOUT_EMAIL:
|
70 |
-
case Exinent_CustomerActivation_Helper_Data::STATUS_DEACTIVATE:
|
71 |
-
default:
|
72 |
-
$sendEmail = false;
|
73 |
-
break;
|
74 |
-
}
|
75 |
-
return $sendEmail;
|
76 |
-
}
|
77 |
-
|
78 |
-
protected function _sendActivationNotificationEmails(array $customerIds) {
|
79 |
-
$helper = Mage::helper('customeractivation');
|
80 |
-
$customers = Mage::getResourceModel('customer/customer_collection')
|
81 |
-
->addAttributeToFilter('entity_id', array('in' => $customerIds))
|
82 |
-
->addAttributeToSelect('*')
|
83 |
-
->addNameToSelect();
|
84 |
-
foreach ($customers as $customer) {
|
85 |
-
$helper->sendCustomerNotificationEmail($customer);
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
protected function _isAllowed() {
|
90 |
-
return Mage::getSingleton('admin/session')->isAllowed('customer/manage');
|
91 |
-
}
|
92 |
-
|
93 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_AdminController extends Mage_Adminhtml_Controller_Action {
|
4 |
+
|
5 |
+
public function massActivationAction() {
|
6 |
+
|
7 |
+
$customerIds = $this->getRequest()->getParam('customer');
|
8 |
+
|
9 |
+
|
10 |
+
if (!is_array($customerIds)) {
|
11 |
+
Mage::getSingleton('adminhtml/session')->addError(
|
12 |
+
Mage::helper('customeractivation')->__('Please select item(s)')
|
13 |
+
);
|
14 |
+
} else {
|
15 |
+
$paramValue = $this->getRequest()->getParam('customer_activated');
|
16 |
+
|
17 |
+
|
18 |
+
try {
|
19 |
+
$updatedCustomerIds = Mage::getResourceModel('customeractivation/customer')->massSetActivationStatus(
|
20 |
+
$customerIds, $this->_shouldSetToActivated($paramValue)
|
21 |
+
);
|
22 |
+
|
23 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
24 |
+
Mage::helper('customeractivation')->__(
|
25 |
+
'Total of %d record(s) were successfully saved', count($updatedCustomerIds)
|
26 |
+
)
|
27 |
+
);
|
28 |
+
|
29 |
+
if ($this->_shouldSendActivationNotification($paramValue)) {
|
30 |
+
$this->_sendActivationNotificationEmails($updatedCustomerIds);
|
31 |
+
}
|
32 |
+
} catch (Exception $e) {
|
33 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
$this->_redirect('adminhtml/customer');
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _shouldSetToActivated($paramValue) {
|
41 |
+
switch ($paramValue) {
|
42 |
+
case 0:
|
43 |
+
$activationStatus = 0;
|
44 |
+
break;
|
45 |
+
case 1:
|
46 |
+
$activationStatus = 1;
|
47 |
+
break;
|
48 |
+
case 2:
|
49 |
+
$activationStatus = 2;
|
50 |
+
break;
|
51 |
+
case 4:
|
52 |
+
$activationStatus = 4;
|
53 |
+
break;
|
54 |
+
case 5:
|
55 |
+
$activationStatus = 5;
|
56 |
+
break;
|
57 |
+
default:
|
58 |
+
$activationStatus = 'New';
|
59 |
+
break;
|
60 |
+
}
|
61 |
+
return $activationStatus;
|
62 |
+
}
|
63 |
+
|
64 |
+
protected function _shouldSendActivationNotification($paramValue) {
|
65 |
+
switch ($paramValue) {
|
66 |
+
case Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITH_EMAIL:
|
67 |
+
$sendEmail = true;
|
68 |
+
break;
|
69 |
+
case Exinent_CustomerActivation_Helper_Data::STATUS_ACTIVATE_WITHOUT_EMAIL:
|
70 |
+
case Exinent_CustomerActivation_Helper_Data::STATUS_DEACTIVATE:
|
71 |
+
default:
|
72 |
+
$sendEmail = false;
|
73 |
+
break;
|
74 |
+
}
|
75 |
+
return $sendEmail;
|
76 |
+
}
|
77 |
+
|
78 |
+
protected function _sendActivationNotificationEmails(array $customerIds) {
|
79 |
+
$helper = Mage::helper('customeractivation');
|
80 |
+
$customers = Mage::getResourceModel('customer/customer_collection')
|
81 |
+
->addAttributeToFilter('entity_id', array('in' => $customerIds))
|
82 |
+
->addAttributeToSelect('*')
|
83 |
+
->addNameToSelect();
|
84 |
+
foreach ($customers as $customer) {
|
85 |
+
$helper->sendCustomerNotificationEmail($customer);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
protected function _isAllowed() {
|
90 |
+
return Mage::getSingleton('admin/session')->isAllowed('customer/manage');
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/CategoryController.php
CHANGED
@@ -1,77 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
include(Mage::getBaseDir() . "/app/code/core/Mage/Catalog/controllers/CategoryController.php");
|
4 |
-
|
5 |
-
class Exinent_CustomerActivation_CategoryController extends Mage_Catalog_CategoryController {
|
6 |
-
|
7 |
-
protected function _initCatagory() {
|
8 |
-
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
-
if ($ModuleStatus == 1) {
|
10 |
-
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_categories', Mage::app()->getStore());
|
11 |
-
$pages = explode(',', $cmsPagesList);
|
12 |
-
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
13 |
-
$baseUrl = Mage::getBaseUrl();
|
14 |
-
$cmspage = explode($baseUrl, $currentUrl);
|
15 |
-
$cmspage = explode('.html', $cmspage[1]);
|
16 |
-
|
17 |
-
$position = strrpos($cmspage[0], "/");
|
18 |
-
if ($position) {
|
19 |
-
$cmspage = substr($cmspage[0], $position + 1);
|
20 |
-
} else {
|
21 |
-
$cmspage = substr($cmspage[0], $position + 0);
|
22 |
-
}
|
23 |
-
if (in_array($cmspage, $pages)) {
|
24 |
-
|
25 |
-
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
26 |
-
|
27 |
-
Mage::app()->getFrontController()->getResponse()
|
28 |
-
->setRedirect(Mage::getUrl('customer/account/login'))
|
29 |
-
->sendResponse();
|
30 |
-
} else {
|
31 |
-
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
32 |
-
$customers = explode(',', $customerGroups);
|
33 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
34 |
-
$customerId = $customer->getGroupId();
|
35 |
-
if (in_array($customerId, $customers)) {
|
36 |
-
|
37 |
-
} else {
|
38 |
-
Mage::app()->getFrontController()->getResponse()
|
39 |
-
->setRedirect(Mage::getBaseUrl())
|
40 |
-
->sendResponse();
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
45 |
-
Mage::dispatchEvent('catalog_controller_category_init_before', array('controller_action' => $this));
|
46 |
-
$categoryId = (int) $this->getRequest()->getParam('id', false);
|
47 |
-
if (!$categoryId) {
|
48 |
-
return false;
|
49 |
-
}
|
50 |
-
|
51 |
-
$category = Mage::getModel('catalog/category')
|
52 |
-
->setStoreId(Mage::app()->getStore()->getId())
|
53 |
-
->load($categoryId);
|
54 |
-
|
55 |
-
if (!Mage::helper('catalog/category')->canShow($category)) {
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
Mage::getSingleton('catalog/session')->setLastVisitedCategoryId($category->getId());
|
59 |
-
Mage::register('current_category', $category);
|
60 |
-
Mage::register('current_entity_key', $category->getPath());
|
61 |
-
|
62 |
-
try {
|
63 |
-
Mage::dispatchEvent(
|
64 |
-
'catalog_controller_category_init_after', array(
|
65 |
-
'category' => $category,
|
66 |
-
'controller_action' => $this
|
67 |
-
)
|
68 |
-
);
|
69 |
-
} catch (Mage_Core_Exception $e) {
|
70 |
-
Mage::logException($e);
|
71 |
-
return false;
|
72 |
-
}
|
73 |
-
|
74 |
-
return $category;
|
75 |
-
}
|
76 |
-
|
77 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
include(Mage::getBaseDir() . "/app/code/core/Mage/Catalog/controllers/CategoryController.php");
|
4 |
+
|
5 |
+
class Exinent_CustomerActivation_CategoryController extends Mage_Catalog_CategoryController {
|
6 |
+
|
7 |
+
protected function _initCatagory() {
|
8 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
+
if ($ModuleStatus == 1) {
|
10 |
+
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_categories', Mage::app()->getStore());
|
11 |
+
$pages = explode(',', $cmsPagesList);
|
12 |
+
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
13 |
+
$baseUrl = Mage::getBaseUrl();
|
14 |
+
$cmspage = explode($baseUrl, $currentUrl);
|
15 |
+
$cmspage = explode('.html', $cmspage[1]);
|
16 |
+
|
17 |
+
$position = strrpos($cmspage[0], "/");
|
18 |
+
if ($position) {
|
19 |
+
$cmspage = substr($cmspage[0], $position + 1);
|
20 |
+
} else {
|
21 |
+
$cmspage = substr($cmspage[0], $position + 0);
|
22 |
+
}
|
23 |
+
if (in_array($cmspage, $pages)) {
|
24 |
+
|
25 |
+
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
26 |
+
|
27 |
+
Mage::app()->getFrontController()->getResponse()
|
28 |
+
->setRedirect(Mage::getUrl('customer/account/login'))
|
29 |
+
->sendResponse();
|
30 |
+
} else {
|
31 |
+
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
32 |
+
$customers = explode(',', $customerGroups);
|
33 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
34 |
+
$customerId = $customer->getGroupId();
|
35 |
+
if (in_array($customerId, $customers)) {
|
36 |
+
|
37 |
+
} else {
|
38 |
+
Mage::app()->getFrontController()->getResponse()
|
39 |
+
->setRedirect(Mage::getBaseUrl())
|
40 |
+
->sendResponse();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
Mage::dispatchEvent('catalog_controller_category_init_before', array('controller_action' => $this));
|
46 |
+
$categoryId = (int) $this->getRequest()->getParam('id', false);
|
47 |
+
if (!$categoryId) {
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
$category = Mage::getModel('catalog/category')
|
52 |
+
->setStoreId(Mage::app()->getStore()->getId())
|
53 |
+
->load($categoryId);
|
54 |
+
|
55 |
+
if (!Mage::helper('catalog/category')->canShow($category)) {
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
Mage::getSingleton('catalog/session')->setLastVisitedCategoryId($category->getId());
|
59 |
+
Mage::register('current_category', $category);
|
60 |
+
Mage::register('current_entity_key', $category->getPath());
|
61 |
+
|
62 |
+
try {
|
63 |
+
Mage::dispatchEvent(
|
64 |
+
'catalog_controller_category_init_after', array(
|
65 |
+
'category' => $category,
|
66 |
+
'controller_action' => $this
|
67 |
+
)
|
68 |
+
);
|
69 |
+
} catch (Mage_Core_Exception $e) {
|
70 |
+
Mage::logException($e);
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
return $category;
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/IndexController.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Cms/controllers/IndexController.php';
|
4 |
-
class Exinent_CustomerActivation_IndexController extends Mage_Cms_IndexController
|
5 |
-
{
|
6 |
-
|
7 |
-
public function indexAction($coreRoute = null) {
|
8 |
-
|
9 |
-
$pageId = Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE, Mage::app()->getStore());
|
10 |
-
if (!Mage::helper('cms/page')->renderPage($this, $pageId)) {
|
11 |
-
$this->_forward('defaultIndex');
|
12 |
-
}
|
13 |
-
$this->loadLayout();
|
14 |
-
// $this->renderLayout();
|
15 |
-
|
16 |
-
}
|
17 |
-
|
18 |
-
public function wholesaleAction() {
|
19 |
-
|
20 |
-
$this->loadLayout();
|
21 |
-
$this->renderLayout();
|
22 |
-
}
|
23 |
-
|
24 |
-
public function wholesaleloginAction() {
|
25 |
-
$this->loadLayout();
|
26 |
-
$this->renderLayout();
|
27 |
-
}
|
28 |
-
|
29 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Mage/Cms/controllers/IndexController.php';
|
4 |
+
class Exinent_CustomerActivation_IndexController extends Mage_Cms_IndexController
|
5 |
+
{
|
6 |
+
|
7 |
+
public function indexAction($coreRoute = null) {
|
8 |
+
|
9 |
+
$pageId = Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE, Mage::app()->getStore());
|
10 |
+
if (!Mage::helper('cms/page')->renderPage($this, $pageId)) {
|
11 |
+
$this->_forward('defaultIndex');
|
12 |
+
}
|
13 |
+
$this->loadLayout();
|
14 |
+
// $this->renderLayout();
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
public function wholesaleAction() {
|
19 |
+
|
20 |
+
$this->loadLayout();
|
21 |
+
$this->renderLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
public function wholesaleloginAction() {
|
25 |
+
$this->loadLayout();
|
26 |
+
$this->renderLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/PageController.php
CHANGED
@@ -1,53 +1,53 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Cms/controllers/PageController.php';
|
4 |
-
class Exinent_CustomerActivation_PageController extends Mage_Cms_PageController
|
5 |
-
{
|
6 |
-
|
7 |
-
public function viewAction()
|
8 |
-
{
|
9 |
-
// echo 'hii';exit;
|
10 |
-
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
11 |
-
if($ModuleStatus==1){
|
12 |
-
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_cms', Mage::app()->getStore());
|
13 |
-
$pages = explode(',', $cmsPagesList);
|
14 |
-
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
15 |
-
$baseUrl = Mage::getBaseUrl();
|
16 |
-
$cmspage = explode($baseUrl, $currentUrl);
|
17 |
-
$strlen = strlen($cmspage[1]);
|
18 |
-
$slashchar = substr($cmspage[1], $strlen-1, $strlen);
|
19 |
-
if($slashchar=='/'){
|
20 |
-
$cmspage = substr($cmspage[1], 0, -1);
|
21 |
-
}else{
|
22 |
-
$cmspage = $cmspage[1];
|
23 |
-
}
|
24 |
-
if(in_array($cmspage, $pages)){
|
25 |
-
|
26 |
-
if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
27 |
-
|
28 |
-
Mage::app()->getFrontController()->getResponse()
|
29 |
-
->setRedirect(Mage::getUrl('customer/account/login'))
|
30 |
-
->sendResponse();
|
31 |
-
}else{
|
32 |
-
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
33 |
-
$customers = explode(',', $customerGroups);
|
34 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
35 |
-
$customerId = $customer->getGroupId();
|
36 |
-
if(in_array($customerId, $customers)){
|
37 |
-
|
38 |
-
|
39 |
-
}else{
|
40 |
-
Mage::app()->getFrontController()->getResponse()
|
41 |
-
->setRedirect(Mage::getBaseUrl())
|
42 |
-
->sendResponse();
|
43 |
-
}
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
$pageId = $this->getRequest()
|
48 |
-
->getParam('page_id', $this->getRequest()->getParam('id', false));
|
49 |
-
if (!Mage::helper('cms/page')->renderPage($this, $pageId)) {
|
50 |
-
$this->_forward('noRoute');
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Mage/Cms/controllers/PageController.php';
|
4 |
+
class Exinent_CustomerActivation_PageController extends Mage_Cms_PageController
|
5 |
+
{
|
6 |
+
|
7 |
+
public function viewAction()
|
8 |
+
{
|
9 |
+
// echo 'hii';exit;
|
10 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
11 |
+
if($ModuleStatus==1){
|
12 |
+
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_cms', Mage::app()->getStore());
|
13 |
+
$pages = explode(',', $cmsPagesList);
|
14 |
+
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
15 |
+
$baseUrl = Mage::getBaseUrl();
|
16 |
+
$cmspage = explode($baseUrl, $currentUrl);
|
17 |
+
$strlen = strlen($cmspage[1]);
|
18 |
+
$slashchar = substr($cmspage[1], $strlen-1, $strlen);
|
19 |
+
if($slashchar=='/'){
|
20 |
+
$cmspage = substr($cmspage[1], 0, -1);
|
21 |
+
}else{
|
22 |
+
$cmspage = $cmspage[1];
|
23 |
+
}
|
24 |
+
if(in_array($cmspage, $pages)){
|
25 |
+
|
26 |
+
if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
27 |
+
|
28 |
+
Mage::app()->getFrontController()->getResponse()
|
29 |
+
->setRedirect(Mage::getUrl('customer/account/login'))
|
30 |
+
->sendResponse();
|
31 |
+
}else{
|
32 |
+
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
33 |
+
$customers = explode(',', $customerGroups);
|
34 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
35 |
+
$customerId = $customer->getGroupId();
|
36 |
+
if(in_array($customerId, $customers)){
|
37 |
+
|
38 |
+
|
39 |
+
}else{
|
40 |
+
Mage::app()->getFrontController()->getResponse()
|
41 |
+
->setRedirect(Mage::getBaseUrl())
|
42 |
+
->sendResponse();
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
$pageId = $this->getRequest()
|
48 |
+
->getParam('page_id', $this->getRequest()->getParam('id', false));
|
49 |
+
if (!Mage::helper('cms/page')->renderPage($this, $pageId)) {
|
50 |
+
$this->_forward('noRoute');
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/ProductController.php
CHANGED
@@ -1,73 +1,73 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
include(Mage::getBaseDir() . "/app/code/core/Mage/Catalog/controllers/ProductController.php");
|
4 |
-
|
5 |
-
class Exinent_CustomerActivation_ProductController extends Mage_Catalog_ProductController {
|
6 |
-
|
7 |
-
public function viewAction() {
|
8 |
-
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
-
if($ModuleStatus==1){
|
10 |
-
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_products', Mage::app()->getStore());
|
11 |
-
$pages = explode(',', $cmsPagesList);
|
12 |
-
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
13 |
-
$baseUrl = Mage::getBaseUrl();
|
14 |
-
$cmspage = explode($baseUrl, $currentUrl);
|
15 |
-
$cmspage = explode('.html', $cmspage[1]);
|
16 |
-
$position = strrpos($cmspage[0], "/");
|
17 |
-
if ($position) {
|
18 |
-
$cmspage = substr($cmspage[0], $position + 1);
|
19 |
-
} else {
|
20 |
-
$cmspage = substr($cmspage[0], $position + 0);
|
21 |
-
}
|
22 |
-
|
23 |
-
if (in_array($cmspage, $pages)) {
|
24 |
-
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
25 |
-
Mage::app()->getFrontController()->getResponse()
|
26 |
-
->setRedirect(Mage::getUrl('customer/account/login'))
|
27 |
-
->sendResponse();
|
28 |
-
}else{
|
29 |
-
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
30 |
-
$customers = explode(',', $customerGroups);
|
31 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
32 |
-
$customerId = $customer->getGroupId();
|
33 |
-
if(in_array($customerId, $customers)){
|
34 |
-
|
35 |
-
|
36 |
-
}else{
|
37 |
-
Mage::app()->getFrontController()->getResponse()
|
38 |
-
->setRedirect(Mage::getBaseUrl())
|
39 |
-
->sendResponse();
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
44 |
-
// Get initial data from request
|
45 |
-
$categoryId = (int) $this->getRequest()->getParam('category', false);
|
46 |
-
$productId = (int) $this->getRequest()->getParam('id');
|
47 |
-
$specifyOptions = $this->getRequest()->getParam('options');
|
48 |
-
|
49 |
-
// Prepare helper and params
|
50 |
-
$viewHelper = Mage::helper('catalog/product_view');
|
51 |
-
|
52 |
-
$params = new Varien_Object();
|
53 |
-
$params->setCategoryId($categoryId);
|
54 |
-
$params->setSpecifyOptions($specifyOptions);
|
55 |
-
|
56 |
-
// Render page
|
57 |
-
try {
|
58 |
-
$viewHelper->prepareAndRender($productId, $this, $params);
|
59 |
-
} catch (Exception $e) {
|
60 |
-
if ($e->getCode() == $viewHelper->ERR_NO_PRODUCT_LOADED) {
|
61 |
-
if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
|
62 |
-
$this->_redirect('');
|
63 |
-
} elseif (!$this->getResponse()->isRedirect()) {
|
64 |
-
$this->_forward('noRoute');
|
65 |
-
}
|
66 |
-
} else {
|
67 |
-
Mage::logException($e);
|
68 |
-
$this->_forward('noRoute');
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
include(Mage::getBaseDir() . "/app/code/core/Mage/Catalog/controllers/ProductController.php");
|
4 |
+
|
5 |
+
class Exinent_CustomerActivation_ProductController extends Mage_Catalog_ProductController {
|
6 |
+
|
7 |
+
public function viewAction() {
|
8 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
9 |
+
if($ModuleStatus==1){
|
10 |
+
$cmsPagesList = Mage::getStoreConfig('customer/customeractivation/require_aunthenticate_products', Mage::app()->getStore());
|
11 |
+
$pages = explode(',', $cmsPagesList);
|
12 |
+
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
13 |
+
$baseUrl = Mage::getBaseUrl();
|
14 |
+
$cmspage = explode($baseUrl, $currentUrl);
|
15 |
+
$cmspage = explode('.html', $cmspage[1]);
|
16 |
+
$position = strrpos($cmspage[0], "/");
|
17 |
+
if ($position) {
|
18 |
+
$cmspage = substr($cmspage[0], $position + 1);
|
19 |
+
} else {
|
20 |
+
$cmspage = substr($cmspage[0], $position + 0);
|
21 |
+
}
|
22 |
+
|
23 |
+
if (in_array($cmspage, $pages)) {
|
24 |
+
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
25 |
+
Mage::app()->getFrontController()->getResponse()
|
26 |
+
->setRedirect(Mage::getUrl('customer/account/login'))
|
27 |
+
->sendResponse();
|
28 |
+
}else{
|
29 |
+
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
30 |
+
$customers = explode(',', $customerGroups);
|
31 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
32 |
+
$customerId = $customer->getGroupId();
|
33 |
+
if(in_array($customerId, $customers)){
|
34 |
+
|
35 |
+
|
36 |
+
}else{
|
37 |
+
Mage::app()->getFrontController()->getResponse()
|
38 |
+
->setRedirect(Mage::getBaseUrl())
|
39 |
+
->sendResponse();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
// Get initial data from request
|
45 |
+
$categoryId = (int) $this->getRequest()->getParam('category', false);
|
46 |
+
$productId = (int) $this->getRequest()->getParam('id');
|
47 |
+
$specifyOptions = $this->getRequest()->getParam('options');
|
48 |
+
|
49 |
+
// Prepare helper and params
|
50 |
+
$viewHelper = Mage::helper('catalog/product_view');
|
51 |
+
|
52 |
+
$params = new Varien_Object();
|
53 |
+
$params->setCategoryId($categoryId);
|
54 |
+
$params->setSpecifyOptions($specifyOptions);
|
55 |
+
|
56 |
+
// Render page
|
57 |
+
try {
|
58 |
+
$viewHelper->prepareAndRender($productId, $this, $params);
|
59 |
+
} catch (Exception $e) {
|
60 |
+
if ($e->getCode() == $viewHelper->ERR_NO_PRODUCT_LOADED) {
|
61 |
+
if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
|
62 |
+
$this->_redirect('');
|
63 |
+
} elseif (!$this->getResponse()->isRedirect()) {
|
64 |
+
$this->_forward('noRoute');
|
65 |
+
}
|
66 |
+
} else {
|
67 |
+
Mage::logException($e);
|
68 |
+
$this->_forward('noRoute');
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/QuickorderController.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category MagePsycho
|
4 |
+
* @package MagePsycho_Easypathhints
|
5 |
+
* @author magepsycho@gmail.com
|
6 |
+
* @website http://www.magepsycho.com
|
7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
*/
|
9 |
+
class Exinent_CustomerActivation_QuickorderController extends Mage_Core_Controller_Front_Action
|
10 |
+
{
|
11 |
+
public function preDispatch() {
|
12 |
+
parent::preDispatch();
|
13 |
+
$action = $this->getRequest()->getActionName();
|
14 |
+
$loginUrl = Mage::helper('customer')->getLoginUrl();
|
15 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
16 |
+
|
17 |
+
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
18 |
+
$customers = explode(',', $customerGroups);
|
19 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
20 |
+
$customerId = $customer->getGroupId();
|
21 |
+
|
22 |
+
if (in_array($customerId, $customers)) {
|
23 |
+
|
24 |
+
} else {
|
25 |
+
Mage::app()->getFrontController()->getResponse()
|
26 |
+
->setRedirect(Mage::getBaseUrl())
|
27 |
+
->sendResponse();
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
|
31 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
32 |
+
} else if ($ModuleStatus == 0) {
|
33 |
+
Mage::app()->getFrontController()->getResponse()
|
34 |
+
->setRedirect(Mage::getBaseUrl())
|
35 |
+
->sendResponse();
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
public function quickorderproductAction() {
|
40 |
+
|
41 |
+
$this->loadLayout();
|
42 |
+
$this->renderLayout();
|
43 |
+
}
|
44 |
+
|
45 |
+
public function submitorderbySimpleproductAction() {
|
46 |
+
//Mage::log('tsfdsf',null,'yams.log');
|
47 |
+
$minQty = Mage::getStoreConfig('customer/customeractivation/min_qty', Mage::app()->getStore());
|
48 |
+
|
49 |
+
$params = $this->getRequest()->getParams();
|
50 |
+
|
51 |
+
$cart = Mage::getModel('checkout/cart');
|
52 |
+
foreach ($params as $sku => $qty) {
|
53 |
+
|
54 |
+
$ids = explode('_', $sku);
|
55 |
+
$productId = $ids[0];
|
56 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
57 |
+
|
58 |
+
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
59 |
+
|
60 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
61 |
+
$productQty = $stock->getQty();
|
62 |
+
|
63 |
+
if ($qty < $minQty )
|
64 |
+
$qty = $minQty;
|
65 |
+
if($qty > $productQty){
|
66 |
+
$message = Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available.', $product->getName());
|
67 |
+
Mage::getSingleton('core/session')->addError($message);
|
68 |
+
$options = array("product" => $productId, "qty" => $productQty);
|
69 |
+
$cart->addProduct($product, $options);
|
70 |
+
}else{
|
71 |
+
$options = array("product" => $productId, "qty" => $qty);
|
72 |
+
$cart->addProduct($product, $options);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
$cart->save();
|
77 |
+
$this->_redirect('checkout/cart');
|
78 |
+
}
|
79 |
+
|
80 |
+
public function submitorderbyproductAction() {
|
81 |
+
$params = $this->getRequest()->getParams();
|
82 |
+
$cart = Mage::getModel('checkout/cart');
|
83 |
+
foreach ($params as $sku => $qty) {
|
84 |
+
$ids = explode('_', $sku);
|
85 |
+
$confId = $ids[0];
|
86 |
+
$productId = $ids[1];
|
87 |
+
$_product = Mage::getModel('catalog/product')->load($productId);
|
88 |
+
$optionvalue = $_product->getSize();
|
89 |
+
$product = Mage::getModel('catalog/product')->load($confId);
|
90 |
+
$options = array("product" => $productId, "super_attribute" => array(134 => $optionvalue), "qty" => $qty);
|
91 |
+
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
92 |
+
$cart->addProduct($product, $options);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
$cart->save();
|
96 |
+
$this->_redirect('checkout/cart');
|
97 |
+
}
|
98 |
+
}
|
app/code/community/Exinent/CustomerActivation/controllers/productOrderController.php
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Exinent_CustomerActivation_productOrderController extends Mage_Core_Controller_Front_Action {
|
4 |
-
|
5 |
-
public function preDispatch() {
|
6 |
-
parent::preDispatch();
|
7 |
-
$action = $this->getRequest()->getActionName();
|
8 |
-
$loginUrl = Mage::helper('customer')->getLoginUrl();
|
9 |
-
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
10 |
-
|
11 |
-
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
12 |
-
$customers = explode(',', $customerGroups);
|
13 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
14 |
-
$customerId = $customer->getGroupId();
|
15 |
-
if (in_array($customerId, $customers)) {
|
16 |
-
|
17 |
-
} else {
|
18 |
-
Mage::app()->getFrontController()->getResponse()
|
19 |
-
->setRedirect(Mage::getBaseUrl())
|
20 |
-
->sendResponse();
|
21 |
-
}
|
22 |
-
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
|
23 |
-
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
24 |
-
} else if ($ModuleStatus == 0) {
|
25 |
-
Mage::app()->getFrontController()->getResponse()
|
26 |
-
->setRedirect(Mage::getBaseUrl())
|
27 |
-
->sendResponse();
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
public function indexAction() {
|
32 |
-
$this->loadLayout();
|
33 |
-
$this->renderLayout();
|
34 |
-
}
|
35 |
-
|
36 |
-
public function quickorderproductAction() {
|
37 |
-
Mage::log('quickorderproductAction',null,'yams.log');
|
38 |
-
$this->loadLayout();
|
39 |
-
$this->renderLayout();
|
40 |
-
}
|
41 |
-
|
42 |
-
public function submitorderbySimpleproductAction() {
|
43 |
-
//Mage::log('tsfdsf',null,'yams.log');
|
44 |
-
$minQty = Mage::getStoreConfig('customer/customeractivation/min_qty', Mage::app()->getStore());
|
45 |
-
|
46 |
-
$params = $this->getRequest()->getParams();
|
47 |
-
|
48 |
-
$cart = Mage::getModel('checkout/cart');
|
49 |
-
foreach ($params as $sku => $qty) {
|
50 |
-
|
51 |
-
$ids = explode('_', $sku);
|
52 |
-
$productId = $ids[0];
|
53 |
-
$product = Mage::getModel('catalog/product')->load($productId);
|
54 |
-
|
55 |
-
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
56 |
-
|
57 |
-
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
58 |
-
$productQty = $stock->getQty();
|
59 |
-
|
60 |
-
if ($qty < $minQty )
|
61 |
-
$qty = $minQty;
|
62 |
-
if($qty > $productQty){
|
63 |
-
$message = Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available.', $product->getName());
|
64 |
-
Mage::getSingleton('core/session')->addError($message);
|
65 |
-
$options = array("product" => $productId, "qty" => $productQty);
|
66 |
-
$cart->addProduct($product, $options);
|
67 |
-
}else{
|
68 |
-
$options = array("product" => $productId, "qty" => $qty);
|
69 |
-
$cart->addProduct($product, $options);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
$cart->save();
|
74 |
-
$this->_redirect('checkout/cart');
|
75 |
-
}
|
76 |
-
|
77 |
-
public function submitorderbyproductAction() {
|
78 |
-
$params = $this->getRequest()->getParams();
|
79 |
-
$cart = Mage::getModel('checkout/cart');
|
80 |
-
foreach ($params as $sku => $qty) {
|
81 |
-
$ids = explode('_', $sku);
|
82 |
-
$confId = $ids[0];
|
83 |
-
$productId = $ids[1];
|
84 |
-
$_product = Mage::getModel('catalog/product')->load($productId);
|
85 |
-
$optionvalue = $_product->getSize();
|
86 |
-
$product = Mage::getModel('catalog/product')->load($confId);
|
87 |
-
$options = array("product" => $productId, "super_attribute" => array(134 => $optionvalue), "qty" => $qty);
|
88 |
-
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
89 |
-
$cart->addProduct($product, $options);
|
90 |
-
}
|
91 |
-
}
|
92 |
-
$cart->save();
|
93 |
-
$this->_redirect('checkout/cart');
|
94 |
-
}
|
95 |
-
|
96 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Exinent_CustomerActivation_productOrderController extends Mage_Core_Controller_Front_Action {
|
4 |
+
|
5 |
+
public function preDispatch() {
|
6 |
+
parent::preDispatch();
|
7 |
+
$action = $this->getRequest()->getActionName();
|
8 |
+
$loginUrl = Mage::helper('customer')->getLoginUrl();
|
9 |
+
$ModuleStatus = Mage::getStoreConfig('customer/customeractivation/disable_ext', Mage::app()->getStore());
|
10 |
+
|
11 |
+
$customerGroups = Mage::getStoreConfig('customer/customeractivation/require_activation_groups', Mage::app()->getStore());
|
12 |
+
$customers = explode(',', $customerGroups);
|
13 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
14 |
+
$customerId = $customer->getGroupId();
|
15 |
+
if (in_array($customerId, $customers)) {
|
16 |
+
|
17 |
+
} else {
|
18 |
+
Mage::app()->getFrontController()->getResponse()
|
19 |
+
->setRedirect(Mage::getBaseUrl())
|
20 |
+
->sendResponse();
|
21 |
+
}
|
22 |
+
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
|
23 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
24 |
+
} else if ($ModuleStatus == 0) {
|
25 |
+
Mage::app()->getFrontController()->getResponse()
|
26 |
+
->setRedirect(Mage::getBaseUrl())
|
27 |
+
->sendResponse();
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
public function indexAction() {
|
32 |
+
$this->loadLayout();
|
33 |
+
$this->renderLayout();
|
34 |
+
}
|
35 |
+
|
36 |
+
public function quickorderproductAction() {
|
37 |
+
Mage::log('quickorderproductAction',null,'yams.log');
|
38 |
+
$this->loadLayout();
|
39 |
+
$this->renderLayout();
|
40 |
+
}
|
41 |
+
|
42 |
+
public function submitorderbySimpleproductAction() {
|
43 |
+
//Mage::log('tsfdsf',null,'yams.log');
|
44 |
+
$minQty = Mage::getStoreConfig('customer/customeractivation/min_qty', Mage::app()->getStore());
|
45 |
+
|
46 |
+
$params = $this->getRequest()->getParams();
|
47 |
+
|
48 |
+
$cart = Mage::getModel('checkout/cart');
|
49 |
+
foreach ($params as $sku => $qty) {
|
50 |
+
|
51 |
+
$ids = explode('_', $sku);
|
52 |
+
$productId = $ids[0];
|
53 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
54 |
+
|
55 |
+
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
56 |
+
|
57 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
58 |
+
$productQty = $stock->getQty();
|
59 |
+
|
60 |
+
if ($qty < $minQty )
|
61 |
+
$qty = $minQty;
|
62 |
+
if($qty > $productQty){
|
63 |
+
$message = Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available.', $product->getName());
|
64 |
+
Mage::getSingleton('core/session')->addError($message);
|
65 |
+
$options = array("product" => $productId, "qty" => $productQty);
|
66 |
+
$cart->addProduct($product, $options);
|
67 |
+
}else{
|
68 |
+
$options = array("product" => $productId, "qty" => $qty);
|
69 |
+
$cart->addProduct($product, $options);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
$cart->save();
|
74 |
+
$this->_redirect('checkout/cart');
|
75 |
+
}
|
76 |
+
|
77 |
+
public function submitorderbyproductAction() {
|
78 |
+
$params = $this->getRequest()->getParams();
|
79 |
+
$cart = Mage::getModel('checkout/cart');
|
80 |
+
foreach ($params as $sku => $qty) {
|
81 |
+
$ids = explode('_', $sku);
|
82 |
+
$confId = $ids[0];
|
83 |
+
$productId = $ids[1];
|
84 |
+
$_product = Mage::getModel('catalog/product')->load($productId);
|
85 |
+
$optionvalue = $_product->getSize();
|
86 |
+
$product = Mage::getModel('catalog/product')->load($confId);
|
87 |
+
$options = array("product" => $productId, "super_attribute" => array(134 => $optionvalue), "qty" => $qty);
|
88 |
+
if (($qty != null || $qty != '') && is_numeric($qty)) {
|
89 |
+
$cart->addProduct($product, $options);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
$cart->save();
|
93 |
+
$this->_redirect('checkout/cart');
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
app/code/community/Exinent/CustomerActivation/etc/config.xml
CHANGED
@@ -1,301 +1,301 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Exinent_CustomerActivation>
|
5 |
-
<version>0.1.5</version>
|
6 |
-
</Exinent_CustomerActivation>
|
7 |
-
</modules>
|
8 |
-
<global>
|
9 |
-
<rewrite>
|
10 |
-
<customeractivation>
|
11 |
-
<from><![CDATA[#^/customer/account/createpost/#]]></from>
|
12 |
-
<to>/customerActivation/account/createpost/</to>
|
13 |
-
</customeractivation>
|
14 |
-
</rewrite>
|
15 |
-
<models>
|
16 |
-
<customeractivation>
|
17 |
-
<class>Exinent_CustomerActivation_Model</class>
|
18 |
-
<resourceModel>customeractivation_resource</resourceModel>
|
19 |
-
</customeractivation>
|
20 |
-
<customeractivation_resource>
|
21 |
-
<class>Exinent_CustomerActivation_Model_Resource</class>
|
22 |
-
</customeractivation_resource>
|
23 |
-
<customer>
|
24 |
-
<rewrite>
|
25 |
-
<customer>Exinent_CustomerActivation_Model_Customer</customer>
|
26 |
-
</rewrite>
|
27 |
-
</customer>
|
28 |
-
<sales>
|
29 |
-
<rewrite>
|
30 |
-
<order>Exinent_CustomerActivation_Model_Order</order>
|
31 |
-
</rewrite>
|
32 |
-
</sales>
|
33 |
-
</models>
|
34 |
-
<helpers>
|
35 |
-
<customeractivation>
|
36 |
-
<class>Exinent_CustomerActivation_Helper</class>
|
37 |
-
</customeractivation>
|
38 |
-
</helpers>
|
39 |
-
<blocks>
|
40 |
-
<customeractivation>
|
41 |
-
<class>Exinent_CustomerActivation_Block</class>
|
42 |
-
</customeractivation>
|
43 |
-
<page>
|
44 |
-
<rewrite>
|
45 |
-
<html_topmenu>Exinent_CustomerActivation_Block_Page_Html_Topmenu</html_topmenu>
|
46 |
-
</rewrite>
|
47 |
-
</page>
|
48 |
-
|
49 |
-
|
50 |
-
<adminhtml>
|
51 |
-
<rewrite>
|
52 |
-
<widget_form_renderer_fieldset>Exinent_CustomerActivation_Block_Adminhtml_Rewrite_Fieldset</widget_form_renderer_fieldset>
|
53 |
-
</rewrite>
|
54 |
-
</adminhtml>
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
</blocks>
|
59 |
-
<resources>
|
60 |
-
<customeractivation_setup>
|
61 |
-
<setup>
|
62 |
-
<module>Exinent_CustomerActivation</module>
|
63 |
-
<class>Mage_Customer_Model_Entity_Setup</class>
|
64 |
-
</setup>
|
65 |
-
</customeractivation_setup>
|
66 |
-
</resources>
|
67 |
-
<template>
|
68 |
-
<email>
|
69 |
-
<customer_customeractivation_registration_admin_template translate="label" module="customeractivation">
|
70 |
-
<label>Customer Registration Admin Notification</label>
|
71 |
-
<file>Exinent/customeractivation/customer_registration_admin.html</file>
|
72 |
-
<type>html</type>
|
73 |
-
</customer_customeractivation_registration_admin_template>
|
74 |
-
<customer_customeractivation_activation_template translate="label" module="customeractivation">
|
75 |
-
<label>Customer Activation Notification</label>
|
76 |
-
<file>Exinent/customeractivation/customer_activation.html</file>
|
77 |
-
<type>html</type>
|
78 |
-
</customer_customeractivation_activation_template>
|
79 |
-
</email>
|
80 |
-
</template>
|
81 |
-
<events>
|
82 |
-
|
83 |
-
|
84 |
-
<customer_save_before>
|
85 |
-
<observers>
|
86 |
-
<customeractivation>
|
87 |
-
<type>singleton</type>
|
88 |
-
<class>customeractivation/observer</class>
|
89 |
-
<method>customerSaveBefore</method>
|
90 |
-
</customeractivation>
|
91 |
-
</observers>
|
92 |
-
</customer_save_before>
|
93 |
-
<customer_save_after>
|
94 |
-
<observers>
|
95 |
-
<customeractivation>
|
96 |
-
<type>model</type>
|
97 |
-
<class>customeractivation/observer</class>
|
98 |
-
<method>customerSaveAfter</method>
|
99 |
-
</customeractivation>
|
100 |
-
</observers>
|
101 |
-
</customer_save_after>
|
102 |
-
|
103 |
-
</events>
|
104 |
-
</global>
|
105 |
-
<frontend>
|
106 |
-
|
107 |
-
<events>
|
108 |
-
<page_block_html_topmenu_gethtml_before>
|
109 |
-
<observers>
|
110 |
-
<customeractivation>
|
111 |
-
<type>singleton</type>
|
112 |
-
<class>customeractivation/observer</class>
|
113 |
-
<method>page_block_html_topmenu_gethtml_before</method>
|
114 |
-
</customeractivation>
|
115 |
-
</observers>
|
116 |
-
</page_block_html_topmenu_gethtml_before>
|
117 |
-
</events>
|
118 |
-
<routers>
|
119 |
-
<customeractivation>
|
120 |
-
<use>standard</use>
|
121 |
-
<args>
|
122 |
-
<module>Exinent_CustomerActivation</module>
|
123 |
-
<frontName>customerActivation</frontName>
|
124 |
-
</args>
|
125 |
-
</customeractivation>
|
126 |
-
|
127 |
-
<cms>
|
128 |
-
<use>standard</use>
|
129 |
-
<args>
|
130 |
-
<modules>
|
131 |
-
<Exinent_CustomerActivation before="Mage_Cms">Exinent_CustomerActivation</Exinent_CustomerActivation>
|
132 |
-
</modules>
|
133 |
-
</args>
|
134 |
-
</cms>
|
135 |
-
<catalog>
|
136 |
-
<args>
|
137 |
-
<modules>
|
138 |
-
<Exinent_CustomerActivation before="Mage_Catalog">Exinent_CustomerActivation</Exinent_CustomerActivation>
|
139 |
-
</modules>
|
140 |
-
</args>
|
141 |
-
</catalog>
|
142 |
-
</routers>
|
143 |
-
<layout>
|
144 |
-
<updates>
|
145 |
-
<customeractivation>
|
146 |
-
<file>customerActivation.xml</file>
|
147 |
-
</customeractivation>
|
148 |
-
</updates>
|
149 |
-
</layout>
|
150 |
-
</frontend>
|
151 |
-
<admin>
|
152 |
-
<routers>
|
153 |
-
<customeractivation>
|
154 |
-
<use>admin</use>
|
155 |
-
<args>
|
156 |
-
<module>Exinent_CustomerActivation</module>
|
157 |
-
<frontName>customeractivation</frontName>
|
158 |
-
</args>
|
159 |
-
</customeractivation>
|
160 |
-
</routers>
|
161 |
-
</admin>
|
162 |
-
<frontend>
|
163 |
-
<events>
|
164 |
-
<customer_login>
|
165 |
-
<observers>
|
166 |
-
<customeractivation>
|
167 |
-
<type>singleton</type>
|
168 |
-
<class>customeractivation/observer</class>
|
169 |
-
<method>customerLogin</method>
|
170 |
-
</customeractivation>
|
171 |
-
</observers>
|
172 |
-
</customer_login>
|
173 |
-
<sales_convert_quote_address_to_order>
|
174 |
-
<observers>
|
175 |
-
<customeractivation>
|
176 |
-
<type>singleton</type>
|
177 |
-
<class>customeractivation/observer</class>
|
178 |
-
<method>salesCovertQuoteAddressToOrder</method>
|
179 |
-
</customeractivation>
|
180 |
-
</observers>
|
181 |
-
</sales_convert_quote_address_to_order>
|
182 |
-
</events>
|
183 |
-
<translate>
|
184 |
-
<modules>
|
185 |
-
<Exinent_CustomerActivation>
|
186 |
-
<files>
|
187 |
-
<default>Exinent_CustomerActivation.csv</default>
|
188 |
-
</files>
|
189 |
-
</Exinent_CustomerActivation>
|
190 |
-
</modules>
|
191 |
-
</translate>
|
192 |
-
</frontend>
|
193 |
-
<default>
|
194 |
-
<customer>
|
195 |
-
<customeractivation>
|
196 |
-
<disable_ext>0</disable_ext>
|
197 |
-
<always_active_in_admin>1</always_active_in_admin>
|
198 |
-
<alert_admin>1</alert_admin>
|
199 |
-
<admin_email></admin_email>
|
200 |
-
<registration_admin_template>customer_customeractivation_registration_admin_template</registration_admin_template>
|
201 |
-
<alert_customer>0</alert_customer>
|
202 |
-
<activation_template>customer_customeractivation_activation_template</activation_template>
|
203 |
-
<activation_status_default>0</activation_status_default>
|
204 |
-
<always_send_admin_email>0</always_send_admin_email>
|
205 |
-
<require_activation_for_specific_groups>0</require_activation_for_specific_groups>
|
206 |
-
<require_activation_groups></require_activation_groups>
|
207 |
-
</customeractivation>
|
208 |
-
</customer>
|
209 |
-
<payment>
|
210 |
-
<net30>
|
211 |
-
<active>0</active>
|
212 |
-
<model>customeractivation/net30</model>
|
213 |
-
<order_status>pending</order_status>
|
214 |
-
<title>NET 30</title>
|
215 |
-
<group>offline</group>
|
216 |
-
<allowspecific>0</allowspecific>
|
217 |
-
</net30>
|
218 |
-
<net15>
|
219 |
-
<active>0</active>
|
220 |
-
<model>customeractivation/net15</model>
|
221 |
-
<order_status>pending</order_status>
|
222 |
-
<title>NET 15</title>
|
223 |
-
<group>offline</group>
|
224 |
-
<allowspecific>0</allowspecific>
|
225 |
-
</net15>
|
226 |
-
</payment>
|
227 |
-
|
228 |
-
<carriers>
|
229 |
-
<thirdpartyfedex>
|
230 |
-
<active>1</active>
|
231 |
-
|
232 |
-
<model>Exinent_CustomerActivation_Model_Thirdpartyfedex</model>
|
233 |
-
<title>3rd Party Fed Ex</title>
|
234 |
-
<sort_order>10</sort_order>
|
235 |
-
<sallowspecific>0</sallowspecific>
|
236 |
-
</thirdpartyfedex>
|
237 |
-
|
238 |
-
<thirdpartyups>
|
239 |
-
<active>1</active>
|
240 |
-
<model>Exinent_CustomerActivation_Model_Thirdpartyups</model>
|
241 |
-
<title>3rd Party UPS</title>
|
242 |
-
<sort_order>10</sort_order>
|
243 |
-
<sallowspecific>0</sallowspecific>
|
244 |
-
</thirdpartyups>
|
245 |
-
|
246 |
-
</carriers>
|
247 |
-
</default>
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
<adminhtml>
|
252 |
-
<layout>
|
253 |
-
<updates>
|
254 |
-
<customeractivation>
|
255 |
-
<file>customerActivation.xml</file>
|
256 |
-
</customeractivation>
|
257 |
-
</updates>
|
258 |
-
</layout>
|
259 |
-
<translate>
|
260 |
-
<modules>
|
261 |
-
<Exinent_CustomerActivation>
|
262 |
-
<files>
|
263 |
-
<default>Exinent_CustomerActivation.csv</default>
|
264 |
-
</files>
|
265 |
-
</Exinent_CustomerActivation>
|
266 |
-
</modules>
|
267 |
-
</translate>
|
268 |
-
<events>
|
269 |
-
<!-- The massaction block can't be added in the block abstract event, this needs to be used -->
|
270 |
-
<adminhtml_block_html_before>
|
271 |
-
<observers>
|
272 |
-
<customeractivation>
|
273 |
-
<type>model</type>
|
274 |
-
<class>customeractivation/observer</class>
|
275 |
-
<method>adminhtmlBlockHtmlBefore</method>
|
276 |
-
</customeractivation>
|
277 |
-
</observers>
|
278 |
-
</adminhtml_block_html_before>
|
279 |
-
|
280 |
-
<!-- Add attribute to grid collection -->
|
281 |
-
<eav_collection_abstract_load_before>
|
282 |
-
<observers>
|
283 |
-
<customeractivation>
|
284 |
-
<type>model</type>
|
285 |
-
<class>customeractivation/observer</class>
|
286 |
-
<method>eavCollectionAbstractLoadBefore</method>
|
287 |
-
</customeractivation>
|
288 |
-
</observers>
|
289 |
-
</eav_collection_abstract_load_before>
|
290 |
-
|
291 |
-
|
292 |
-
</events>
|
293 |
-
</adminhtml>
|
294 |
-
<phpunit>
|
295 |
-
<suite>
|
296 |
-
<modules>
|
297 |
-
<Exinent_CustomerActivation/>
|
298 |
-
</modules>
|
299 |
-
</suite>
|
300 |
-
</phpunit>
|
301 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Exinent_CustomerActivation>
|
5 |
+
<version>0.1.5</version>
|
6 |
+
</Exinent_CustomerActivation>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<rewrite>
|
10 |
+
<customeractivation>
|
11 |
+
<from><![CDATA[#^/customer/account/createpost/#]]></from>
|
12 |
+
<to>/customerActivation/account/createpost/</to>
|
13 |
+
</customeractivation>
|
14 |
+
</rewrite>
|
15 |
+
<models>
|
16 |
+
<customeractivation>
|
17 |
+
<class>Exinent_CustomerActivation_Model</class>
|
18 |
+
<resourceModel>customeractivation_resource</resourceModel>
|
19 |
+
</customeractivation>
|
20 |
+
<customeractivation_resource>
|
21 |
+
<class>Exinent_CustomerActivation_Model_Resource</class>
|
22 |
+
</customeractivation_resource>
|
23 |
+
<customer>
|
24 |
+
<rewrite>
|
25 |
+
<customer>Exinent_CustomerActivation_Model_Customer</customer>
|
26 |
+
</rewrite>
|
27 |
+
</customer>
|
28 |
+
<sales>
|
29 |
+
<rewrite>
|
30 |
+
<order>Exinent_CustomerActivation_Model_Order</order>
|
31 |
+
</rewrite>
|
32 |
+
</sales>
|
33 |
+
</models>
|
34 |
+
<helpers>
|
35 |
+
<customeractivation>
|
36 |
+
<class>Exinent_CustomerActivation_Helper</class>
|
37 |
+
</customeractivation>
|
38 |
+
</helpers>
|
39 |
+
<blocks>
|
40 |
+
<customeractivation>
|
41 |
+
<class>Exinent_CustomerActivation_Block</class>
|
42 |
+
</customeractivation>
|
43 |
+
<page>
|
44 |
+
<rewrite>
|
45 |
+
<html_topmenu>Exinent_CustomerActivation_Block_Page_Html_Topmenu</html_topmenu>
|
46 |
+
</rewrite>
|
47 |
+
</page>
|
48 |
+
|
49 |
+
|
50 |
+
<adminhtml>
|
51 |
+
<rewrite>
|
52 |
+
<widget_form_renderer_fieldset>Exinent_CustomerActivation_Block_Adminhtml_Rewrite_Fieldset</widget_form_renderer_fieldset>
|
53 |
+
</rewrite>
|
54 |
+
</adminhtml>
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
</blocks>
|
59 |
+
<resources>
|
60 |
+
<customeractivation_setup>
|
61 |
+
<setup>
|
62 |
+
<module>Exinent_CustomerActivation</module>
|
63 |
+
<class>Mage_Customer_Model_Entity_Setup</class>
|
64 |
+
</setup>
|
65 |
+
</customeractivation_setup>
|
66 |
+
</resources>
|
67 |
+
<template>
|
68 |
+
<email>
|
69 |
+
<customer_customeractivation_registration_admin_template translate="label" module="customeractivation">
|
70 |
+
<label>Customer Registration Admin Notification</label>
|
71 |
+
<file>Exinent/customeractivation/customer_registration_admin.html</file>
|
72 |
+
<type>html</type>
|
73 |
+
</customer_customeractivation_registration_admin_template>
|
74 |
+
<customer_customeractivation_activation_template translate="label" module="customeractivation">
|
75 |
+
<label>Customer Activation Notification</label>
|
76 |
+
<file>Exinent/customeractivation/customer_activation.html</file>
|
77 |
+
<type>html</type>
|
78 |
+
</customer_customeractivation_activation_template>
|
79 |
+
</email>
|
80 |
+
</template>
|
81 |
+
<events>
|
82 |
+
|
83 |
+
|
84 |
+
<customer_save_before>
|
85 |
+
<observers>
|
86 |
+
<customeractivation>
|
87 |
+
<type>singleton</type>
|
88 |
+
<class>customeractivation/observer</class>
|
89 |
+
<method>customerSaveBefore</method>
|
90 |
+
</customeractivation>
|
91 |
+
</observers>
|
92 |
+
</customer_save_before>
|
93 |
+
<customer_save_after>
|
94 |
+
<observers>
|
95 |
+
<customeractivation>
|
96 |
+
<type>model</type>
|
97 |
+
<class>customeractivation/observer</class>
|
98 |
+
<method>customerSaveAfter</method>
|
99 |
+
</customeractivation>
|
100 |
+
</observers>
|
101 |
+
</customer_save_after>
|
102 |
+
|
103 |
+
</events>
|
104 |
+
</global>
|
105 |
+
<frontend>
|
106 |
+
|
107 |
+
<events>
|
108 |
+
<page_block_html_topmenu_gethtml_before>
|
109 |
+
<observers>
|
110 |
+
<customeractivation>
|
111 |
+
<type>singleton</type>
|
112 |
+
<class>customeractivation/observer</class>
|
113 |
+
<method>page_block_html_topmenu_gethtml_before</method>
|
114 |
+
</customeractivation>
|
115 |
+
</observers>
|
116 |
+
</page_block_html_topmenu_gethtml_before>
|
117 |
+
</events>
|
118 |
+
<routers>
|
119 |
+
<customeractivation>
|
120 |
+
<use>standard</use>
|
121 |
+
<args>
|
122 |
+
<module>Exinent_CustomerActivation</module>
|
123 |
+
<frontName>customerActivation</frontName>
|
124 |
+
</args>
|
125 |
+
</customeractivation>
|
126 |
+
|
127 |
+
<cms>
|
128 |
+
<use>standard</use>
|
129 |
+
<args>
|
130 |
+
<modules>
|
131 |
+
<Exinent_CustomerActivation before="Mage_Cms">Exinent_CustomerActivation</Exinent_CustomerActivation>
|
132 |
+
</modules>
|
133 |
+
</args>
|
134 |
+
</cms>
|
135 |
+
<catalog>
|
136 |
+
<args>
|
137 |
+
<modules>
|
138 |
+
<Exinent_CustomerActivation before="Mage_Catalog">Exinent_CustomerActivation</Exinent_CustomerActivation>
|
139 |
+
</modules>
|
140 |
+
</args>
|
141 |
+
</catalog>
|
142 |
+
</routers>
|
143 |
+
<layout>
|
144 |
+
<updates>
|
145 |
+
<customeractivation>
|
146 |
+
<file>customerActivation.xml</file>
|
147 |
+
</customeractivation>
|
148 |
+
</updates>
|
149 |
+
</layout>
|
150 |
+
</frontend>
|
151 |
+
<admin>
|
152 |
+
<routers>
|
153 |
+
<customeractivation>
|
154 |
+
<use>admin</use>
|
155 |
+
<args>
|
156 |
+
<module>Exinent_CustomerActivation</module>
|
157 |
+
<frontName>customeractivation</frontName>
|
158 |
+
</args>
|
159 |
+
</customeractivation>
|
160 |
+
</routers>
|
161 |
+
</admin>
|
162 |
+
<frontend>
|
163 |
+
<events>
|
164 |
+
<customer_login>
|
165 |
+
<observers>
|
166 |
+
<customeractivation>
|
167 |
+
<type>singleton</type>
|
168 |
+
<class>customeractivation/observer</class>
|
169 |
+
<method>customerLogin</method>
|
170 |
+
</customeractivation>
|
171 |
+
</observers>
|
172 |
+
</customer_login>
|
173 |
+
<sales_convert_quote_address_to_order>
|
174 |
+
<observers>
|
175 |
+
<customeractivation>
|
176 |
+
<type>singleton</type>
|
177 |
+
<class>customeractivation/observer</class>
|
178 |
+
<method>salesCovertQuoteAddressToOrder</method>
|
179 |
+
</customeractivation>
|
180 |
+
</observers>
|
181 |
+
</sales_convert_quote_address_to_order>
|
182 |
+
</events>
|
183 |
+
<translate>
|
184 |
+
<modules>
|
185 |
+
<Exinent_CustomerActivation>
|
186 |
+
<files>
|
187 |
+
<default>Exinent_CustomerActivation.csv</default>
|
188 |
+
</files>
|
189 |
+
</Exinent_CustomerActivation>
|
190 |
+
</modules>
|
191 |
+
</translate>
|
192 |
+
</frontend>
|
193 |
+
<default>
|
194 |
+
<customer>
|
195 |
+
<customeractivation>
|
196 |
+
<disable_ext>0</disable_ext>
|
197 |
+
<always_active_in_admin>1</always_active_in_admin>
|
198 |
+
<alert_admin>1</alert_admin>
|
199 |
+
<admin_email></admin_email>
|
200 |
+
<registration_admin_template>customer_customeractivation_registration_admin_template</registration_admin_template>
|
201 |
+
<alert_customer>0</alert_customer>
|
202 |
+
<activation_template>customer_customeractivation_activation_template</activation_template>
|
203 |
+
<activation_status_default>0</activation_status_default>
|
204 |
+
<always_send_admin_email>0</always_send_admin_email>
|
205 |
+
<require_activation_for_specific_groups>0</require_activation_for_specific_groups>
|
206 |
+
<require_activation_groups></require_activation_groups>
|
207 |
+
</customeractivation>
|
208 |
+
</customer>
|
209 |
+
<payment>
|
210 |
+
<net30>
|
211 |
+
<active>0</active>
|
212 |
+
<model>customeractivation/net30</model>
|
213 |
+
<order_status>pending</order_status>
|
214 |
+
<title>NET 30</title>
|
215 |
+
<group>offline</group>
|
216 |
+
<allowspecific>0</allowspecific>
|
217 |
+
</net30>
|
218 |
+
<net15>
|
219 |
+
<active>0</active>
|
220 |
+
<model>customeractivation/net15</model>
|
221 |
+
<order_status>pending</order_status>
|
222 |
+
<title>NET 15</title>
|
223 |
+
<group>offline</group>
|
224 |
+
<allowspecific>0</allowspecific>
|
225 |
+
</net15>
|
226 |
+
</payment>
|
227 |
+
|
228 |
+
<carriers>
|
229 |
+
<thirdpartyfedex>
|
230 |
+
<active>1</active>
|
231 |
+
|
232 |
+
<model>Exinent_CustomerActivation_Model_Thirdpartyfedex</model>
|
233 |
+
<title>3rd Party Fed Ex</title>
|
234 |
+
<sort_order>10</sort_order>
|
235 |
+
<sallowspecific>0</sallowspecific>
|
236 |
+
</thirdpartyfedex>
|
237 |
+
|
238 |
+
<thirdpartyups>
|
239 |
+
<active>1</active>
|
240 |
+
<model>Exinent_CustomerActivation_Model_Thirdpartyups</model>
|
241 |
+
<title>3rd Party UPS</title>
|
242 |
+
<sort_order>10</sort_order>
|
243 |
+
<sallowspecific>0</sallowspecific>
|
244 |
+
</thirdpartyups>
|
245 |
+
|
246 |
+
</carriers>
|
247 |
+
</default>
|
248 |
+
|
249 |
+
|
250 |
+
|
251 |
+
<adminhtml>
|
252 |
+
<layout>
|
253 |
+
<updates>
|
254 |
+
<customeractivation>
|
255 |
+
<file>customerActivation.xml</file>
|
256 |
+
</customeractivation>
|
257 |
+
</updates>
|
258 |
+
</layout>
|
259 |
+
<translate>
|
260 |
+
<modules>
|
261 |
+
<Exinent_CustomerActivation>
|
262 |
+
<files>
|
263 |
+
<default>Exinent_CustomerActivation.csv</default>
|
264 |
+
</files>
|
265 |
+
</Exinent_CustomerActivation>
|
266 |
+
</modules>
|
267 |
+
</translate>
|
268 |
+
<events>
|
269 |
+
<!-- The massaction block can't be added in the block abstract event, this needs to be used -->
|
270 |
+
<adminhtml_block_html_before>
|
271 |
+
<observers>
|
272 |
+
<customeractivation>
|
273 |
+
<type>model</type>
|
274 |
+
<class>customeractivation/observer</class>
|
275 |
+
<method>adminhtmlBlockHtmlBefore</method>
|
276 |
+
</customeractivation>
|
277 |
+
</observers>
|
278 |
+
</adminhtml_block_html_before>
|
279 |
+
|
280 |
+
<!-- Add attribute to grid collection -->
|
281 |
+
<eav_collection_abstract_load_before>
|
282 |
+
<observers>
|
283 |
+
<customeractivation>
|
284 |
+
<type>model</type>
|
285 |
+
<class>customeractivation/observer</class>
|
286 |
+
<method>eavCollectionAbstractLoadBefore</method>
|
287 |
+
</customeractivation>
|
288 |
+
</observers>
|
289 |
+
</eav_collection_abstract_load_before>
|
290 |
+
|
291 |
+
|
292 |
+
</events>
|
293 |
+
</adminhtml>
|
294 |
+
<phpunit>
|
295 |
+
<suite>
|
296 |
+
<modules>
|
297 |
+
<Exinent_CustomerActivation/>
|
298 |
+
</modules>
|
299 |
+
</suite>
|
300 |
+
</phpunit>
|
301 |
+
</config>
|
app/code/community/Exinent/CustomerActivation/etc/system.xml
CHANGED
@@ -1,371 +1,371 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
<config>
|
4 |
-
<sections>
|
5 |
-
<customer translate="label" module="customer">
|
6 |
-
<groups>
|
7 |
-
<customeractivation translate="label" module="customeractivation">
|
8 |
-
<label>Customer Activation</label>
|
9 |
-
<sort_order>768</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
<disable_ext translate="label" module="customeractivation">
|
15 |
-
<label>CustomerActivation</label>
|
16 |
-
<frontend_type>select</frontend_type>
|
17 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
18 |
-
<sort_order>10</sort_order>
|
19 |
-
<show_in_default>1</show_in_default>
|
20 |
-
<show_in_website>1</show_in_website>
|
21 |
-
<show_in_store>1</show_in_store>
|
22 |
-
</disable_ext>
|
23 |
-
|
24 |
-
<always_active_in_admin translate="label" module="customeractivation">
|
25 |
-
<label>Always enable in admin interface</label>
|
26 |
-
<frontend_type>select</frontend_type>
|
27 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
28 |
-
<sort_order>11</sort_order>
|
29 |
-
<show_in_default>1</show_in_default>
|
30 |
-
<show_in_website>0</show_in_website>
|
31 |
-
<show_in_store>0</show_in_store>
|
32 |
-
<comment>If you want to activate accounts created via the admin interface</comment>
|
33 |
-
<depends>
|
34 |
-
<disable_ext>1</disable_ext>
|
35 |
-
</depends>
|
36 |
-
</always_active_in_admin>
|
37 |
-
|
38 |
-
<require_activation_groups>
|
39 |
-
<label>Require Activation for Groups</label>
|
40 |
-
<frontend_type>multiselect</frontend_type>
|
41 |
-
<source_model>customeractivation/
|
42 |
-
<sort_order>12</sort_order>
|
43 |
-
<show_in_default>1</show_in_default>
|
44 |
-
<show_in_website>1</show_in_website>
|
45 |
-
<show_in_store>1</show_in_store>
|
46 |
-
</require_activation_groups>
|
47 |
-
|
48 |
-
<address_field translate="label" module="customeractivation">
|
49 |
-
<label>Enable Address Fields on Register Form</label>
|
50 |
-
<frontend_type>select</frontend_type>
|
51 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
-
<sort_order>13</sort_order>
|
53 |
-
<show_in_default>1</show_in_default>
|
54 |
-
<show_in_website>1</show_in_website>
|
55 |
-
<show_in_store>1</show_in_store>
|
56 |
-
</address_field>
|
57 |
-
|
58 |
-
<min_qty translate="label" module="customeractivation">
|
59 |
-
<label>Minimum Quantity allowed in Quick order Form</label>
|
60 |
-
<fontend_type>text</fontend_type>
|
61 |
-
<sort_order>14</sort_order>
|
62 |
-
<show_in_default>1</show_in_default>
|
63 |
-
<show_in_website>1</show_in_website>
|
64 |
-
<show_in_store>0</show_in_store>
|
65 |
-
</min_qty>
|
66 |
-
|
67 |
-
<require_aunthenticate_cms>
|
68 |
-
<label>Authentication required for pages</label>
|
69 |
-
<frontend_type>multiselect</frontend_type>
|
70 |
-
<source_model>customeractivation/
|
71 |
-
<sort_order>15</sort_order>
|
72 |
-
<show_in_default>1</show_in_default>
|
73 |
-
<show_in_website>1</show_in_website>
|
74 |
-
<show_in_store>1</show_in_store>
|
75 |
-
</require_aunthenticate_cms>
|
76 |
-
|
77 |
-
<require_aunthenticate_categories>
|
78 |
-
<label>Authentication required for Categories</label>
|
79 |
-
<frontend_type>multiselect</frontend_type>
|
80 |
-
<source_model>customeractivation/
|
81 |
-
<sort_order>16</sort_order>
|
82 |
-
<show_in_default>1</show_in_default>
|
83 |
-
<show_in_website>1</show_in_website>
|
84 |
-
<show_in_store>1</show_in_store>
|
85 |
-
</require_aunthenticate_categories>
|
86 |
-
|
87 |
-
<require_aunthenticate_products>
|
88 |
-
<label>Authentication required for Products</label>
|
89 |
-
<frontend_type>multiselect</frontend_type>
|
90 |
-
<source_model>customeractivation/
|
91 |
-
<sort_order>17</sort_order>
|
92 |
-
<show_in_default>1</show_in_default>
|
93 |
-
<show_in_website>1</show_in_website>
|
94 |
-
<show_in_store>1</show_in_store>
|
95 |
-
</require_aunthenticate_products>
|
96 |
-
|
97 |
-
<activation_template1 translate="label" module="customeractivation">
|
98 |
-
<label>Customer Notification Email Template(WholeSale)</label>
|
99 |
-
|
100 |
-
<show_in_default>1</show_in_default>
|
101 |
-
<show_in_website>1</show_in_website>
|
102 |
-
<show_in_store>1</show_in_store>
|
103 |
-
<sort_order>17</sort_order>
|
104 |
-
<frontend_type>select</frontend_type>
|
105 |
-
<source_model>adminhtml/system_config_source_email_template</source_model>
|
106 |
-
</activation_template1>
|
107 |
-
|
108 |
-
<activation_status_default translate="label" module="customeractivation">
|
109 |
-
<label>Activate Wholesaler Accounts by Default</label>
|
110 |
-
<frontend_type>select</frontend_type>
|
111 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
112 |
-
<sort_order>20</sort_order>
|
113 |
-
<show_in_default>1</show_in_default>
|
114 |
-
<show_in_website>1</show_in_website>
|
115 |
-
<show_in_store>1</show_in_store>
|
116 |
-
</activation_status_default>
|
117 |
-
<date_start>
|
118 |
-
<label>Start Date</label>
|
119 |
-
<frontend_type>text</frontend_type>
|
120 |
-
<frontend_model>customeractivation/adminhtml_system_config_date</frontend_model>
|
121 |
-
<sort_order>21</sort_order>
|
122 |
-
<show_in_default>1</show_in_default>
|
123 |
-
<show_in_website>1</show_in_website>
|
124 |
-
<show_in_store>1</show_in_store>
|
125 |
-
<depends>
|
126 |
-
<activation_status_default>1</activation_status_default>
|
127 |
-
</depends>
|
128 |
-
</date_start>
|
129 |
-
|
130 |
-
<date_end>
|
131 |
-
<label>End Date</label>
|
132 |
-
<frontend_type>text</frontend_type>
|
133 |
-
<frontend_model>customeractivation/adminhtml_system_config_date</frontend_model>
|
134 |
-
<sort_order>22</sort_order>
|
135 |
-
<show_in_default>1</show_in_default>
|
136 |
-
<show_in_website>1</show_in_website>
|
137 |
-
<show_in_store>1</show_in_store>
|
138 |
-
<depends>
|
139 |
-
<activation_status_default>1</activation_status_default>
|
140 |
-
</depends>
|
141 |
-
</date_end>
|
142 |
-
|
143 |
-
|
144 |
-
</fields>
|
145 |
-
</customeractivation>
|
146 |
-
</groups>
|
147 |
-
</customer>
|
148 |
-
<carriers translate="label" module="shipping">
|
149 |
-
<groups>
|
150 |
-
<thirdpartyfedex translate="label">
|
151 |
-
<label>3rd Party Fed Ex</label>
|
152 |
-
<frontend_type>text</frontend_type>
|
153 |
-
<sort_order>2</sort_order>
|
154 |
-
<show_in_default>1</show_in_default>
|
155 |
-
<show_in_website>1</show_in_website>
|
156 |
-
<show_in_store>1</show_in_store>
|
157 |
-
<fields>
|
158 |
-
|
159 |
-
<active translate="label">
|
160 |
-
<label>Enabled</label>
|
161 |
-
<frontend_type>select</frontend_type>
|
162 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
163 |
-
<sort_order>1</sort_order>
|
164 |
-
<show_in_default>1</show_in_default>
|
165 |
-
<show_in_website>1</show_in_website>
|
166 |
-
<show_in_store>0</show_in_store>
|
167 |
-
</active>
|
168 |
-
|
169 |
-
<title translate="label">
|
170 |
-
<label>Title</label>
|
171 |
-
<frontend_type>text</frontend_type>
|
172 |
-
<sort_order>2</sort_order>
|
173 |
-
<show_in_default>1</show_in_default>
|
174 |
-
<show_in_website>1</show_in_website>
|
175 |
-
<show_in_store>1</show_in_store>
|
176 |
-
</title>
|
177 |
-
|
178 |
-
<sort_order translate="label">
|
179 |
-
<label>Sort Order</label>
|
180 |
-
<frontend_type>text</frontend_type>
|
181 |
-
<sort_order>100</sort_order>
|
182 |
-
<show_in_default>1</show_in_default>
|
183 |
-
<show_in_website>1</show_in_website>
|
184 |
-
<show_in_store>0</show_in_store>
|
185 |
-
</sort_order>
|
186 |
-
|
187 |
-
<sallowspecific translate="label">
|
188 |
-
<label>Ship to Applicable Countries</label>
|
189 |
-
<frontend_type>select</frontend_type>
|
190 |
-
<sort_order>90</sort_order>
|
191 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
192 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
193 |
-
<show_in_default>1</show_in_default>
|
194 |
-
<show_in_website>1</show_in_website>
|
195 |
-
<show_in_store>0</show_in_store>
|
196 |
-
</sallowspecific>
|
197 |
-
|
198 |
-
<specificcountry translate="label">
|
199 |
-
<label>Ship to Specific Countries</label>
|
200 |
-
<frontend_type>multiselect</frontend_type>
|
201 |
-
<sort_order>91</sort_order>
|
202 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
203 |
-
<show_in_default>1</show_in_default>
|
204 |
-
<show_in_website>1</show_in_website>
|
205 |
-
<show_in_store>0</show_in_store>
|
206 |
-
<can_be_empty>1</can_be_empty>
|
207 |
-
</specificcountry>
|
208 |
-
|
209 |
-
</fields>
|
210 |
-
</thirdpartyfedex>
|
211 |
-
|
212 |
-
<thirdpartyups translate="label">
|
213 |
-
<label>3rd Party UPS</label>
|
214 |
-
<frontend_type>text</frontend_type>
|
215 |
-
<sort_order>2</sort_order>
|
216 |
-
<show_in_default>1</show_in_default>
|
217 |
-
<show_in_website>1</show_in_website>
|
218 |
-
<show_in_store>1</show_in_store>
|
219 |
-
<fields>
|
220 |
-
|
221 |
-
<active translate="label">
|
222 |
-
<label>Enabled</label>
|
223 |
-
<frontend_type>select</frontend_type>
|
224 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
225 |
-
<sort_order>1</sort_order>
|
226 |
-
<show_in_default>1</show_in_default>
|
227 |
-
<show_in_website>1</show_in_website>
|
228 |
-
<show_in_store>0</show_in_store>
|
229 |
-
</active>
|
230 |
-
|
231 |
-
<title translate="label">
|
232 |
-
<label>Title</label>
|
233 |
-
<frontend_type>text</frontend_type>
|
234 |
-
<sort_order>2</sort_order>
|
235 |
-
<show_in_default>1</show_in_default>
|
236 |
-
<show_in_website>1</show_in_website>
|
237 |
-
<show_in_store>1</show_in_store>
|
238 |
-
</title>
|
239 |
-
|
240 |
-
<sort_order translate="label">
|
241 |
-
<label>Sort Order</label>
|
242 |
-
<frontend_type>text</frontend_type>
|
243 |
-
<sort_order>100</sort_order>
|
244 |
-
<show_in_default>1</show_in_default>
|
245 |
-
<show_in_website>1</show_in_website>
|
246 |
-
<show_in_store>0</show_in_store>
|
247 |
-
</sort_order>
|
248 |
-
|
249 |
-
<sallowspecific translate="label">
|
250 |
-
<label>Ship to Applicable Countries</label>
|
251 |
-
<frontend_type>select</frontend_type>
|
252 |
-
<sort_order>90</sort_order>
|
253 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
254 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
255 |
-
<show_in_default>1</show_in_default>
|
256 |
-
<show_in_website>1</show_in_website>
|
257 |
-
<show_in_store>0</show_in_store>
|
258 |
-
</sallowspecific>
|
259 |
-
|
260 |
-
<specificcountry translate="label">
|
261 |
-
<label>Ship to Specific Countries</label>
|
262 |
-
<frontend_type>multiselect</frontend_type>
|
263 |
-
<sort_order>91</sort_order>
|
264 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
265 |
-
<show_in_default>1</show_in_default>
|
266 |
-
<show_in_website>1</show_in_website>
|
267 |
-
<show_in_store>0</show_in_store>
|
268 |
-
<can_be_empty>1</can_be_empty>
|
269 |
-
</specificcountry>
|
270 |
-
|
271 |
-
</fields>
|
272 |
-
</thirdpartyups>
|
273 |
-
</groups>
|
274 |
-
</carriers>
|
275 |
-
|
276 |
-
<payment>
|
277 |
-
<groups>
|
278 |
-
<net30 translate="label" module="paygate">
|
279 |
-
<!-- will have title 'New Module' -->
|
280 |
-
<label>NET 30</label>
|
281 |
-
<!-- position between other payment methods -->
|
282 |
-
<sort_order>670</sort_order>
|
283 |
-
<!-- do not show this configuration options in store scope -->
|
284 |
-
<show_in_default>1</show_in_default>
|
285 |
-
<show_in_website>1</show_in_website>
|
286 |
-
<show_in_store>0</show_in_store>
|
287 |
-
<fields>
|
288 |
-
<!-- is this payment method active for the website? -->
|
289 |
-
<active translate="label">
|
290 |
-
<!-- label for the field -->
|
291 |
-
<label>Enabled</label>
|
292 |
-
<!-- input type for configuration value -->
|
293 |
-
<frontend_type>select</frontend_type>
|
294 |
-
<!-- model to take the option values from -->
|
295 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
296 |
-
<!-- field position -->
|
297 |
-
<sort_order>1</sort_order>
|
298 |
-
<!-- do not show this field in store scope -->
|
299 |
-
<show_in_default>1</show_in_default>
|
300 |
-
<show_in_website>1</show_in_website>
|
301 |
-
<show_in_store>0</show_in_store>
|
302 |
-
</active>
|
303 |
-
<order_status translate="label">
|
304 |
-
<label>New order status</label>
|
305 |
-
<frontend_type>select</frontend_type>
|
306 |
-
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
307 |
-
<sort_order>4</sort_order>
|
308 |
-
<show_in_default>1</show_in_default>
|
309 |
-
<show_in_website>1</show_in_website>
|
310 |
-
<show_in_store>0</show_in_store>
|
311 |
-
</order_status>
|
312 |
-
<title translate="label">
|
313 |
-
<label>Title</label>
|
314 |
-
<frontend_type>text</frontend_type>
|
315 |
-
<sort_order>2</sort_order>
|
316 |
-
<show_in_default>1</show_in_default>
|
317 |
-
<show_in_website>1</show_in_website>
|
318 |
-
<show_in_store>0</show_in_store>
|
319 |
-
</title>
|
320 |
-
</fields>
|
321 |
-
</net30>
|
322 |
-
|
323 |
-
<net15 translate="label" module="paygate">
|
324 |
-
<!-- will have title 'New Module' -->
|
325 |
-
<label>NET 15</label>
|
326 |
-
<!-- position between other payment methods -->
|
327 |
-
<sort_order>670</sort_order>
|
328 |
-
<!-- do not show this configuration options in store scope -->
|
329 |
-
<show_in_default>1</show_in_default>
|
330 |
-
<show_in_website>1</show_in_website>
|
331 |
-
<show_in_store>0</show_in_store>
|
332 |
-
<fields>
|
333 |
-
<!-- is this payment method active for the website? -->
|
334 |
-
<active translate="label">
|
335 |
-
<!-- label for the field -->
|
336 |
-
<label>Enabled</label>
|
337 |
-
<!-- input type for configuration value -->
|
338 |
-
<frontend_type>select</frontend_type>
|
339 |
-
<!-- model to take the option values from -->
|
340 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
341 |
-
<!-- field position -->
|
342 |
-
<sort_order>1</sort_order>
|
343 |
-
<!-- do not show this field in store scope -->
|
344 |
-
<show_in_default>1</show_in_default>
|
345 |
-
<show_in_website>1</show_in_website>
|
346 |
-
<show_in_store>0</show_in_store>
|
347 |
-
</active>
|
348 |
-
<order_status translate="label">
|
349 |
-
<label>New order status</label>
|
350 |
-
<frontend_type>select</frontend_type>
|
351 |
-
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
352 |
-
<sort_order>4</sort_order>
|
353 |
-
<show_in_default>1</show_in_default>
|
354 |
-
<show_in_website>1</show_in_website>
|
355 |
-
<show_in_store>0</show_in_store>
|
356 |
-
</order_status>
|
357 |
-
<title translate="label">
|
358 |
-
<label>Title</label>
|
359 |
-
<frontend_type>text</frontend_type>
|
360 |
-
<sort_order>2</sort_order>
|
361 |
-
<show_in_default>1</show_in_default>
|
362 |
-
<show_in_website>1</show_in_website>
|
363 |
-
<show_in_store>0</show_in_store>
|
364 |
-
</title>
|
365 |
-
</fields>
|
366 |
-
</net15>
|
367 |
-
|
368 |
-
</groups>
|
369 |
-
</payment>
|
370 |
-
</sections>
|
371 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<sections>
|
5 |
+
<customer translate="label" module="customer">
|
6 |
+
<groups>
|
7 |
+
<customeractivation translate="label" module="customeractivation">
|
8 |
+
<label>Customer Activation</label>
|
9 |
+
<sort_order>768</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<fields>
|
14 |
+
<disable_ext translate="label" module="customeractivation">
|
15 |
+
<label>CustomerActivation</label>
|
16 |
+
<frontend_type>select</frontend_type>
|
17 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
18 |
+
<sort_order>10</sort_order>
|
19 |
+
<show_in_default>1</show_in_default>
|
20 |
+
<show_in_website>1</show_in_website>
|
21 |
+
<show_in_store>1</show_in_store>
|
22 |
+
</disable_ext>
|
23 |
+
|
24 |
+
<always_active_in_admin translate="label" module="customeractivation">
|
25 |
+
<label>Always enable in admin interface</label>
|
26 |
+
<frontend_type>select</frontend_type>
|
27 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
28 |
+
<sort_order>11</sort_order>
|
29 |
+
<show_in_default>1</show_in_default>
|
30 |
+
<show_in_website>0</show_in_website>
|
31 |
+
<show_in_store>0</show_in_store>
|
32 |
+
<comment>If you want to activate accounts created via the admin interface</comment>
|
33 |
+
<depends>
|
34 |
+
<disable_ext>1</disable_ext>
|
35 |
+
</depends>
|
36 |
+
</always_active_in_admin>
|
37 |
+
|
38 |
+
<require_activation_groups>
|
39 |
+
<label>Require Activation for Groups</label>
|
40 |
+
<frontend_type>multiselect</frontend_type>
|
41 |
+
<source_model>customeractivation/adminhtml_system_config_source_customer_group_multiselect</source_model>
|
42 |
+
<sort_order>12</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</require_activation_groups>
|
47 |
+
|
48 |
+
<address_field translate="label" module="customeractivation">
|
49 |
+
<label>Enable Address Fields on Register Form</label>
|
50 |
+
<frontend_type>select</frontend_type>
|
51 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
+
<sort_order>13</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
</address_field>
|
57 |
+
|
58 |
+
<min_qty translate="label" module="customeractivation">
|
59 |
+
<label>Minimum Quantity allowed in Quick order Form</label>
|
60 |
+
<fontend_type>text</fontend_type>
|
61 |
+
<sort_order>14</sort_order>
|
62 |
+
<show_in_default>1</show_in_default>
|
63 |
+
<show_in_website>1</show_in_website>
|
64 |
+
<show_in_store>0</show_in_store>
|
65 |
+
</min_qty>
|
66 |
+
|
67 |
+
<require_aunthenticate_cms>
|
68 |
+
<label>Authentication required for pages</label>
|
69 |
+
<frontend_type>multiselect</frontend_type>
|
70 |
+
<source_model>customeractivation/adminhtml_system_config_source_pages_group_multiselect</source_model>
|
71 |
+
<sort_order>15</sort_order>
|
72 |
+
<show_in_default>1</show_in_default>
|
73 |
+
<show_in_website>1</show_in_website>
|
74 |
+
<show_in_store>1</show_in_store>
|
75 |
+
</require_aunthenticate_cms>
|
76 |
+
|
77 |
+
<require_aunthenticate_categories>
|
78 |
+
<label>Authentication required for Categories</label>
|
79 |
+
<frontend_type>multiselect</frontend_type>
|
80 |
+
<source_model>customeractivation/adminhtml_system_config_source_categories_group_multiselect</source_model>
|
81 |
+
<sort_order>16</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
</require_aunthenticate_categories>
|
86 |
+
|
87 |
+
<require_aunthenticate_products>
|
88 |
+
<label>Authentication required for Products</label>
|
89 |
+
<frontend_type>multiselect</frontend_type>
|
90 |
+
<source_model>customeractivation/adminhtml_system_config_source_products_group_multiselect</source_model>
|
91 |
+
<sort_order>17</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
</require_aunthenticate_products>
|
96 |
+
|
97 |
+
<activation_template1 translate="label" module="customeractivation">
|
98 |
+
<label>Customer Notification Email Template(WholeSale)</label>
|
99 |
+
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
<sort_order>17</sort_order>
|
104 |
+
<frontend_type>select</frontend_type>
|
105 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
106 |
+
</activation_template1>
|
107 |
+
|
108 |
+
<activation_status_default translate="label" module="customeractivation">
|
109 |
+
<label>Activate Wholesaler Accounts by Default</label>
|
110 |
+
<frontend_type>select</frontend_type>
|
111 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
112 |
+
<sort_order>20</sort_order>
|
113 |
+
<show_in_default>1</show_in_default>
|
114 |
+
<show_in_website>1</show_in_website>
|
115 |
+
<show_in_store>1</show_in_store>
|
116 |
+
</activation_status_default>
|
117 |
+
<date_start>
|
118 |
+
<label>Start Date</label>
|
119 |
+
<frontend_type>text</frontend_type>
|
120 |
+
<frontend_model>customeractivation/adminhtml_system_config_date</frontend_model>
|
121 |
+
<sort_order>21</sort_order>
|
122 |
+
<show_in_default>1</show_in_default>
|
123 |
+
<show_in_website>1</show_in_website>
|
124 |
+
<show_in_store>1</show_in_store>
|
125 |
+
<depends>
|
126 |
+
<activation_status_default>1</activation_status_default>
|
127 |
+
</depends>
|
128 |
+
</date_start>
|
129 |
+
|
130 |
+
<date_end>
|
131 |
+
<label>End Date</label>
|
132 |
+
<frontend_type>text</frontend_type>
|
133 |
+
<frontend_model>customeractivation/adminhtml_system_config_date</frontend_model>
|
134 |
+
<sort_order>22</sort_order>
|
135 |
+
<show_in_default>1</show_in_default>
|
136 |
+
<show_in_website>1</show_in_website>
|
137 |
+
<show_in_store>1</show_in_store>
|
138 |
+
<depends>
|
139 |
+
<activation_status_default>1</activation_status_default>
|
140 |
+
</depends>
|
141 |
+
</date_end>
|
142 |
+
|
143 |
+
|
144 |
+
</fields>
|
145 |
+
</customeractivation>
|
146 |
+
</groups>
|
147 |
+
</customer>
|
148 |
+
<carriers translate="label" module="shipping">
|
149 |
+
<groups>
|
150 |
+
<thirdpartyfedex translate="label">
|
151 |
+
<label>3rd Party Fed Ex</label>
|
152 |
+
<frontend_type>text</frontend_type>
|
153 |
+
<sort_order>2</sort_order>
|
154 |
+
<show_in_default>1</show_in_default>
|
155 |
+
<show_in_website>1</show_in_website>
|
156 |
+
<show_in_store>1</show_in_store>
|
157 |
+
<fields>
|
158 |
+
|
159 |
+
<active translate="label">
|
160 |
+
<label>Enabled</label>
|
161 |
+
<frontend_type>select</frontend_type>
|
162 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
163 |
+
<sort_order>1</sort_order>
|
164 |
+
<show_in_default>1</show_in_default>
|
165 |
+
<show_in_website>1</show_in_website>
|
166 |
+
<show_in_store>0</show_in_store>
|
167 |
+
</active>
|
168 |
+
|
169 |
+
<title translate="label">
|
170 |
+
<label>Title</label>
|
171 |
+
<frontend_type>text</frontend_type>
|
172 |
+
<sort_order>2</sort_order>
|
173 |
+
<show_in_default>1</show_in_default>
|
174 |
+
<show_in_website>1</show_in_website>
|
175 |
+
<show_in_store>1</show_in_store>
|
176 |
+
</title>
|
177 |
+
|
178 |
+
<sort_order translate="label">
|
179 |
+
<label>Sort Order</label>
|
180 |
+
<frontend_type>text</frontend_type>
|
181 |
+
<sort_order>100</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>0</show_in_store>
|
185 |
+
</sort_order>
|
186 |
+
|
187 |
+
<sallowspecific translate="label">
|
188 |
+
<label>Ship to Applicable Countries</label>
|
189 |
+
<frontend_type>select</frontend_type>
|
190 |
+
<sort_order>90</sort_order>
|
191 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
192 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
193 |
+
<show_in_default>1</show_in_default>
|
194 |
+
<show_in_website>1</show_in_website>
|
195 |
+
<show_in_store>0</show_in_store>
|
196 |
+
</sallowspecific>
|
197 |
+
|
198 |
+
<specificcountry translate="label">
|
199 |
+
<label>Ship to Specific Countries</label>
|
200 |
+
<frontend_type>multiselect</frontend_type>
|
201 |
+
<sort_order>91</sort_order>
|
202 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
203 |
+
<show_in_default>1</show_in_default>
|
204 |
+
<show_in_website>1</show_in_website>
|
205 |
+
<show_in_store>0</show_in_store>
|
206 |
+
<can_be_empty>1</can_be_empty>
|
207 |
+
</specificcountry>
|
208 |
+
|
209 |
+
</fields>
|
210 |
+
</thirdpartyfedex>
|
211 |
+
|
212 |
+
<thirdpartyups translate="label">
|
213 |
+
<label>3rd Party UPS</label>
|
214 |
+
<frontend_type>text</frontend_type>
|
215 |
+
<sort_order>2</sort_order>
|
216 |
+
<show_in_default>1</show_in_default>
|
217 |
+
<show_in_website>1</show_in_website>
|
218 |
+
<show_in_store>1</show_in_store>
|
219 |
+
<fields>
|
220 |
+
|
221 |
+
<active translate="label">
|
222 |
+
<label>Enabled</label>
|
223 |
+
<frontend_type>select</frontend_type>
|
224 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
225 |
+
<sort_order>1</sort_order>
|
226 |
+
<show_in_default>1</show_in_default>
|
227 |
+
<show_in_website>1</show_in_website>
|
228 |
+
<show_in_store>0</show_in_store>
|
229 |
+
</active>
|
230 |
+
|
231 |
+
<title translate="label">
|
232 |
+
<label>Title</label>
|
233 |
+
<frontend_type>text</frontend_type>
|
234 |
+
<sort_order>2</sort_order>
|
235 |
+
<show_in_default>1</show_in_default>
|
236 |
+
<show_in_website>1</show_in_website>
|
237 |
+
<show_in_store>1</show_in_store>
|
238 |
+
</title>
|
239 |
+
|
240 |
+
<sort_order translate="label">
|
241 |
+
<label>Sort Order</label>
|
242 |
+
<frontend_type>text</frontend_type>
|
243 |
+
<sort_order>100</sort_order>
|
244 |
+
<show_in_default>1</show_in_default>
|
245 |
+
<show_in_website>1</show_in_website>
|
246 |
+
<show_in_store>0</show_in_store>
|
247 |
+
</sort_order>
|
248 |
+
|
249 |
+
<sallowspecific translate="label">
|
250 |
+
<label>Ship to Applicable Countries</label>
|
251 |
+
<frontend_type>select</frontend_type>
|
252 |
+
<sort_order>90</sort_order>
|
253 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
254 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
255 |
+
<show_in_default>1</show_in_default>
|
256 |
+
<show_in_website>1</show_in_website>
|
257 |
+
<show_in_store>0</show_in_store>
|
258 |
+
</sallowspecific>
|
259 |
+
|
260 |
+
<specificcountry translate="label">
|
261 |
+
<label>Ship to Specific Countries</label>
|
262 |
+
<frontend_type>multiselect</frontend_type>
|
263 |
+
<sort_order>91</sort_order>
|
264 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
265 |
+
<show_in_default>1</show_in_default>
|
266 |
+
<show_in_website>1</show_in_website>
|
267 |
+
<show_in_store>0</show_in_store>
|
268 |
+
<can_be_empty>1</can_be_empty>
|
269 |
+
</specificcountry>
|
270 |
+
|
271 |
+
</fields>
|
272 |
+
</thirdpartyups>
|
273 |
+
</groups>
|
274 |
+
</carriers>
|
275 |
+
|
276 |
+
<payment>
|
277 |
+
<groups>
|
278 |
+
<net30 translate="label" module="paygate">
|
279 |
+
<!-- will have title 'New Module' -->
|
280 |
+
<label>NET 30</label>
|
281 |
+
<!-- position between other payment methods -->
|
282 |
+
<sort_order>670</sort_order>
|
283 |
+
<!-- do not show this configuration options in store scope -->
|
284 |
+
<show_in_default>1</show_in_default>
|
285 |
+
<show_in_website>1</show_in_website>
|
286 |
+
<show_in_store>0</show_in_store>
|
287 |
+
<fields>
|
288 |
+
<!-- is this payment method active for the website? -->
|
289 |
+
<active translate="label">
|
290 |
+
<!-- label for the field -->
|
291 |
+
<label>Enabled</label>
|
292 |
+
<!-- input type for configuration value -->
|
293 |
+
<frontend_type>select</frontend_type>
|
294 |
+
<!-- model to take the option values from -->
|
295 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
296 |
+
<!-- field position -->
|
297 |
+
<sort_order>1</sort_order>
|
298 |
+
<!-- do not show this field in store scope -->
|
299 |
+
<show_in_default>1</show_in_default>
|
300 |
+
<show_in_website>1</show_in_website>
|
301 |
+
<show_in_store>0</show_in_store>
|
302 |
+
</active>
|
303 |
+
<order_status translate="label">
|
304 |
+
<label>New order status</label>
|
305 |
+
<frontend_type>select</frontend_type>
|
306 |
+
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
307 |
+
<sort_order>4</sort_order>
|
308 |
+
<show_in_default>1</show_in_default>
|
309 |
+
<show_in_website>1</show_in_website>
|
310 |
+
<show_in_store>0</show_in_store>
|
311 |
+
</order_status>
|
312 |
+
<title translate="label">
|
313 |
+
<label>Title</label>
|
314 |
+
<frontend_type>text</frontend_type>
|
315 |
+
<sort_order>2</sort_order>
|
316 |
+
<show_in_default>1</show_in_default>
|
317 |
+
<show_in_website>1</show_in_website>
|
318 |
+
<show_in_store>0</show_in_store>
|
319 |
+
</title>
|
320 |
+
</fields>
|
321 |
+
</net30>
|
322 |
+
|
323 |
+
<net15 translate="label" module="paygate">
|
324 |
+
<!-- will have title 'New Module' -->
|
325 |
+
<label>NET 15</label>
|
326 |
+
<!-- position between other payment methods -->
|
327 |
+
<sort_order>670</sort_order>
|
328 |
+
<!-- do not show this configuration options in store scope -->
|
329 |
+
<show_in_default>1</show_in_default>
|
330 |
+
<show_in_website>1</show_in_website>
|
331 |
+
<show_in_store>0</show_in_store>
|
332 |
+
<fields>
|
333 |
+
<!-- is this payment method active for the website? -->
|
334 |
+
<active translate="label">
|
335 |
+
<!-- label for the field -->
|
336 |
+
<label>Enabled</label>
|
337 |
+
<!-- input type for configuration value -->
|
338 |
+
<frontend_type>select</frontend_type>
|
339 |
+
<!-- model to take the option values from -->
|
340 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
341 |
+
<!-- field position -->
|
342 |
+
<sort_order>1</sort_order>
|
343 |
+
<!-- do not show this field in store scope -->
|
344 |
+
<show_in_default>1</show_in_default>
|
345 |
+
<show_in_website>1</show_in_website>
|
346 |
+
<show_in_store>0</show_in_store>
|
347 |
+
</active>
|
348 |
+
<order_status translate="label">
|
349 |
+
<label>New order status</label>
|
350 |
+
<frontend_type>select</frontend_type>
|
351 |
+
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
352 |
+
<sort_order>4</sort_order>
|
353 |
+
<show_in_default>1</show_in_default>
|
354 |
+
<show_in_website>1</show_in_website>
|
355 |
+
<show_in_store>0</show_in_store>
|
356 |
+
</order_status>
|
357 |
+
<title translate="label">
|
358 |
+
<label>Title</label>
|
359 |
+
<frontend_type>text</frontend_type>
|
360 |
+
<sort_order>2</sort_order>
|
361 |
+
<show_in_default>1</show_in_default>
|
362 |
+
<show_in_website>1</show_in_website>
|
363 |
+
<show_in_store>0</show_in_store>
|
364 |
+
</title>
|
365 |
+
</fields>
|
366 |
+
</net15>
|
367 |
+
|
368 |
+
</groups>
|
369 |
+
</payment>
|
370 |
+
</sections>
|
371 |
+
</config>
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$this->startSetup();
|
4 |
-
|
5 |
-
$this->addAttribute('customer', 'customer_activated', array(
|
6 |
-
'type' => 'varchar',
|
7 |
-
'input' => 'text',
|
8 |
-
'label' => 'Is activated',
|
9 |
-
'global' => 1,
|
10 |
-
'visible' => 1,
|
11 |
-
'required' => 0,
|
12 |
-
'user_defined' => 1,
|
13 |
-
'visible_on_front' => 0,
|
14 |
-
));
|
15 |
-
|
16 |
-
$this->endSetup();
|
17 |
-
|
18 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$this->startSetup();
|
4 |
+
|
5 |
+
$this->addAttribute('customer', 'customer_activated', array(
|
6 |
+
'type' => 'varchar',
|
7 |
+
'input' => 'text',
|
8 |
+
'label' => 'Is activated',
|
9 |
+
'global' => 1,
|
10 |
+
'visible' => 1,
|
11 |
+
'required' => 0,
|
12 |
+
'user_defined' => 1,
|
13 |
+
'visible_on_front' => 0,
|
14 |
+
));
|
15 |
+
|
16 |
+
$this->endSetup();
|
17 |
+
|
18 |
+
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.0-0.1.1.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$this->startSetup();
|
4 |
-
|
5 |
-
$this->updateAttribute('customer', 'customer_activated', 'frontend_input', 'select');
|
6 |
-
$this->updateAttribute('customer', 'customer_activated', 'source_model', 'customeractivation/resource_attribute_source_customeractivation');
|
7 |
-
|
8 |
-
$this->endSetup();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$this->startSetup();
|
4 |
+
|
5 |
+
$this->updateAttribute('customer', 'customer_activated', 'frontend_input', 'select');
|
6 |
+
$this->updateAttribute('customer', 'customer_activated', 'source_model', 'customeractivation/resource_attribute_source_customeractivation');
|
7 |
+
|
8 |
+
$this->endSetup();
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.1-0.1.2.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$this->startSetup();
|
4 |
-
|
5 |
-
$customer = Mage::getModel('customer/customer');
|
6 |
-
$attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
|
7 |
-
|
8 |
-
$this->addAttributeToSet('customer', $attrSetId, 'General', 'customer_activated');
|
9 |
-
|
10 |
-
$this->endSetup();
|
11 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$this->startSetup();
|
4 |
+
|
5 |
+
$customer = Mage::getModel('customer/customer');
|
6 |
+
$attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
|
7 |
+
|
8 |
+
$this->addAttributeToSet('customer', $attrSetId, 'General', 'customer_activated');
|
9 |
+
|
10 |
+
$this->endSetup();
|
11 |
+
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.2-0.1.3.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
|
7 |
-
if (version_compare(Mage::getVersion(), '1.4.2', '>=')) {
|
8 |
-
Mage::getSingleton('eav/config')
|
9 |
-
->getAttribute('customer', 'customer_activated')
|
10 |
-
->setData('used_in_forms', array('adminhtml_customer'))
|
11 |
-
->save();
|
12 |
-
}
|
13 |
-
|
14 |
-
$installer->endSetup();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
if (version_compare(Mage::getVersion(), '1.4.2', '>=')) {
|
8 |
+
Mage::getSingleton('eav/config')
|
9 |
+
->getAttribute('customer', 'customer_activated')
|
10 |
+
->setData('used_in_forms', array('adminhtml_customer'))
|
11 |
+
->save();
|
12 |
+
}
|
13 |
+
|
14 |
+
$installer->endSetup();
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.3-0.1.4.php
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
$installer->startSetup();
|
5 |
-
|
6 |
-
|
7 |
-
$installer->addAttribute("customer", "paymentmethods", array(
|
8 |
-
"type" => "varchar",
|
9 |
-
"backend" => "",
|
10 |
-
"label" => "Payment Methods",
|
11 |
-
"input" => "multiselect",
|
12 |
-
"source" => "customeractivation/resource_attribute_source_Customerpayment",
|
13 |
-
"backend" => "",
|
14 |
-
"user_defined" => "1",
|
15 |
-
"visible" => true,
|
16 |
-
"required" => false,
|
17 |
-
"default" => "",
|
18 |
-
"frontend" => "",
|
19 |
-
"unique" => false,
|
20 |
-
"note" => ""
|
21 |
-
));
|
22 |
-
|
23 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "paymentmethods");
|
24 |
-
|
25 |
-
|
26 |
-
$used_in_forms = array();
|
27 |
-
|
28 |
-
$used_in_forms[] = "adminhtml_customer";
|
29 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
30 |
-
->setData("is_used_for_customer_segment", true)
|
31 |
-
->setData("is_system", 0)
|
32 |
-
->setData("is_user_defined", 1)
|
33 |
-
->setData("is_visible", 1)
|
34 |
-
->setData("sort_order", 100)
|
35 |
-
;
|
36 |
-
$attribute->save();
|
37 |
-
|
38 |
-
|
39 |
-
$installer->addAttribute("customer", "logo_image", array(
|
40 |
-
"type" => "varchar",
|
41 |
-
"backend" => "",
|
42 |
-
"label" => "Logo Image",
|
43 |
-
"input" => "text",
|
44 |
-
"source" => "",
|
45 |
-
"visible" => true,
|
46 |
-
"required" => false,
|
47 |
-
"default" => "",
|
48 |
-
"frontend" => "",
|
49 |
-
"user_defined" => "0",
|
50 |
-
"unique" => false,
|
51 |
-
"note" => "Logo Image"
|
52 |
-
));
|
53 |
-
|
54 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "logo_image");
|
55 |
-
|
56 |
-
|
57 |
-
$used_in_forms = array();
|
58 |
-
|
59 |
-
$used_in_forms[] = "adminhtml_customer";
|
60 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
61 |
-
->setData("is_used_for_customer_segment", true)
|
62 |
-
->setData("is_system", 0)
|
63 |
-
->setData("is_user_defined", 0)
|
64 |
-
->setData("is_visible", 1)
|
65 |
-
->setData("sort_order", 100)
|
66 |
-
;
|
67 |
-
$attribute->save();
|
68 |
-
$installer->endSetup();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
|
7 |
+
$installer->addAttribute("customer", "paymentmethods", array(
|
8 |
+
"type" => "varchar",
|
9 |
+
"backend" => "",
|
10 |
+
"label" => "Payment Methods",
|
11 |
+
"input" => "multiselect",
|
12 |
+
"source" => "customeractivation/resource_attribute_source_Customerpayment",
|
13 |
+
"backend" => "",
|
14 |
+
"user_defined" => "1",
|
15 |
+
"visible" => true,
|
16 |
+
"required" => false,
|
17 |
+
"default" => "",
|
18 |
+
"frontend" => "",
|
19 |
+
"unique" => false,
|
20 |
+
"note" => ""
|
21 |
+
));
|
22 |
+
|
23 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "paymentmethods");
|
24 |
+
|
25 |
+
|
26 |
+
$used_in_forms = array();
|
27 |
+
|
28 |
+
$used_in_forms[] = "adminhtml_customer";
|
29 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
30 |
+
->setData("is_used_for_customer_segment", true)
|
31 |
+
->setData("is_system", 0)
|
32 |
+
->setData("is_user_defined", 1)
|
33 |
+
->setData("is_visible", 1)
|
34 |
+
->setData("sort_order", 100)
|
35 |
+
;
|
36 |
+
$attribute->save();
|
37 |
+
|
38 |
+
|
39 |
+
$installer->addAttribute("customer", "logo_image", array(
|
40 |
+
"type" => "varchar",
|
41 |
+
"backend" => "",
|
42 |
+
"label" => "Logo Image",
|
43 |
+
"input" => "text",
|
44 |
+
"source" => "",
|
45 |
+
"visible" => true,
|
46 |
+
"required" => false,
|
47 |
+
"default" => "",
|
48 |
+
"frontend" => "",
|
49 |
+
"user_defined" => "0",
|
50 |
+
"unique" => false,
|
51 |
+
"note" => "Logo Image"
|
52 |
+
));
|
53 |
+
|
54 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "logo_image");
|
55 |
+
|
56 |
+
|
57 |
+
$used_in_forms = array();
|
58 |
+
|
59 |
+
$used_in_forms[] = "adminhtml_customer";
|
60 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
61 |
+
->setData("is_used_for_customer_segment", true)
|
62 |
+
->setData("is_system", 0)
|
63 |
+
->setData("is_user_defined", 0)
|
64 |
+
->setData("is_visible", 1)
|
65 |
+
->setData("sort_order", 100)
|
66 |
+
;
|
67 |
+
$attribute->save();
|
68 |
+
$installer->endSetup();
|
app/code/community/Exinent/CustomerActivation/sql/customeractivation_setup/mysql4-upgrade-0.1.4-0.1.5.php
CHANGED
@@ -1,156 +1,156 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
$installer->startSetup();
|
5 |
-
$installer->addAttribute("customer", "store_type", array(
|
6 |
-
"type" => "varchar",
|
7 |
-
"backend" => "",
|
8 |
-
"label" => "Store Type",
|
9 |
-
"input" => "select",
|
10 |
-
"source" => "customeractivation/resource_attribute_source_StoreType",
|
11 |
-
"visible" => true,
|
12 |
-
"required" => false,
|
13 |
-
"default" => "",
|
14 |
-
"frontend" => "",
|
15 |
-
"user_defined" => "1",
|
16 |
-
"unique" => false,
|
17 |
-
"note" => "Store Type"
|
18 |
-
));
|
19 |
-
|
20 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "store_type");
|
21 |
-
|
22 |
-
|
23 |
-
$used_in_forms = array();
|
24 |
-
|
25 |
-
$used_in_forms[] = "adminhtml_customer";
|
26 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
27 |
-
->setData("is_used_for_customer_segment", true)
|
28 |
-
->setData("is_system", 0)
|
29 |
-
->setData("is_user_defined", 1)
|
30 |
-
->setData("is_visible", 1)
|
31 |
-
->setData("sort_order", 100)
|
32 |
-
;
|
33 |
-
$attribute->save();
|
34 |
-
|
35 |
-
|
36 |
-
$installer->addAttribute("customer", "iswebsite_live", array(
|
37 |
-
"type" => "varchar",
|
38 |
-
"backend" => "",
|
39 |
-
"label" => "Iswebsite Live",
|
40 |
-
"input" => "select",
|
41 |
-
"source" => "customeractivation/resource_attribute_source_Iswebsitelive",
|
42 |
-
"visible" => true,
|
43 |
-
"required" => false,
|
44 |
-
"default" => "",
|
45 |
-
"frontend" => "",
|
46 |
-
"user_defined" => "1",
|
47 |
-
"unique" => false,
|
48 |
-
"note" => "Iswebsite Live"
|
49 |
-
));
|
50 |
-
|
51 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "iswebsite_live");
|
52 |
-
|
53 |
-
|
54 |
-
$used_in_forms = array();
|
55 |
-
|
56 |
-
$used_in_forms[] = "adminhtml_customer";
|
57 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
58 |
-
->setData("is_used_for_customer_segment", true)
|
59 |
-
->setData("is_system", 0)
|
60 |
-
->setData("is_user_defined", 1)
|
61 |
-
->setData("is_visible", 1)
|
62 |
-
->setData("sort_order", 100)
|
63 |
-
;
|
64 |
-
$attribute->save();
|
65 |
-
|
66 |
-
$installer->addAttribute("customer", "date_founded", array(
|
67 |
-
"type" => "varchar",
|
68 |
-
"backend" => "",
|
69 |
-
"label" => "Date Founded",
|
70 |
-
"input" => "text",
|
71 |
-
"source" => "",
|
72 |
-
"visible" => true,
|
73 |
-
"required" => false,
|
74 |
-
"default" => "",
|
75 |
-
"frontend" => "",
|
76 |
-
"user_defined" => "1",
|
77 |
-
"unique" => false,
|
78 |
-
"note" => "Date Founded"
|
79 |
-
));
|
80 |
-
|
81 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "date_founded");
|
82 |
-
|
83 |
-
|
84 |
-
$used_in_forms = array();
|
85 |
-
|
86 |
-
$used_in_forms[] = "adminhtml_customer";
|
87 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
88 |
-
->setData("is_used_for_customer_segment", true)
|
89 |
-
->setData("is_system", 0)
|
90 |
-
->setData("is_user_defined", 1)
|
91 |
-
->setData("is_visible", 1)
|
92 |
-
->setData("sort_order", 100)
|
93 |
-
;
|
94 |
-
$attribute->save();
|
95 |
-
|
96 |
-
|
97 |
-
$installer->addAttribute("customer", "accountspayable_email", array(
|
98 |
-
"type" => "varchar",
|
99 |
-
"backend" => "",
|
100 |
-
"label" => "Accounts Payable Email Address",
|
101 |
-
"input" => "text",
|
102 |
-
"source" => "",
|
103 |
-
"visible" => true,
|
104 |
-
"required" => false,
|
105 |
-
"default" => "",
|
106 |
-
"frontend" => "",
|
107 |
-
"user_defined" => "1",
|
108 |
-
"unique" => false,
|
109 |
-
"note" => "Accounts Payable Email Address"
|
110 |
-
));
|
111 |
-
|
112 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "accountspayable_email");
|
113 |
-
|
114 |
-
|
115 |
-
$used_in_forms = array();
|
116 |
-
|
117 |
-
$used_in_forms[] = "adminhtml_customer";
|
118 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
119 |
-
->setData("is_used_for_customer_segment", true)
|
120 |
-
->setData("is_system", 0)
|
121 |
-
->setData("is_user_defined", 1)
|
122 |
-
->setData("is_visible", 1)
|
123 |
-
->setData("sort_order", 100)
|
124 |
-
;
|
125 |
-
$attribute->save();
|
126 |
-
|
127 |
-
$installer->addAttribute("customer", "website_url", array(
|
128 |
-
"type" => "varchar",
|
129 |
-
"backend" => "",
|
130 |
-
"label" => "Website URL",
|
131 |
-
"input" => "text",
|
132 |
-
"source" => "",
|
133 |
-
"visible" => true,
|
134 |
-
"required" => false,
|
135 |
-
"default" => "",
|
136 |
-
"frontend" => "",
|
137 |
-
"user_defined" => "1",
|
138 |
-
"unique" => false,
|
139 |
-
"note" => "Website URL"
|
140 |
-
));
|
141 |
-
|
142 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "website_url");
|
143 |
-
|
144 |
-
|
145 |
-
$used_in_forms = array();
|
146 |
-
|
147 |
-
$used_in_forms[] = "adminhtml_customer";
|
148 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
149 |
-
->setData("is_used_for_customer_segment", true)
|
150 |
-
->setData("is_system", 0)
|
151 |
-
->setData("is_user_defined", 1)
|
152 |
-
->setData("is_visible", 1)
|
153 |
-
->setData("sort_order", 100)
|
154 |
-
;
|
155 |
-
$attribute->save();
|
156 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$installer->startSetup();
|
5 |
+
$installer->addAttribute("customer", "store_type", array(
|
6 |
+
"type" => "varchar",
|
7 |
+
"backend" => "",
|
8 |
+
"label" => "Store Type",
|
9 |
+
"input" => "select",
|
10 |
+
"source" => "customeractivation/resource_attribute_source_StoreType",
|
11 |
+
"visible" => true,
|
12 |
+
"required" => false,
|
13 |
+
"default" => "",
|
14 |
+
"frontend" => "",
|
15 |
+
"user_defined" => "1",
|
16 |
+
"unique" => false,
|
17 |
+
"note" => "Store Type"
|
18 |
+
));
|
19 |
+
|
20 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "store_type");
|
21 |
+
|
22 |
+
|
23 |
+
$used_in_forms = array();
|
24 |
+
|
25 |
+
$used_in_forms[] = "adminhtml_customer";
|
26 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
27 |
+
->setData("is_used_for_customer_segment", true)
|
28 |
+
->setData("is_system", 0)
|
29 |
+
->setData("is_user_defined", 1)
|
30 |
+
->setData("is_visible", 1)
|
31 |
+
->setData("sort_order", 100)
|
32 |
+
;
|
33 |
+
$attribute->save();
|
34 |
+
|
35 |
+
|
36 |
+
$installer->addAttribute("customer", "iswebsite_live", array(
|
37 |
+
"type" => "varchar",
|
38 |
+
"backend" => "",
|
39 |
+
"label" => "Iswebsite Live",
|
40 |
+
"input" => "select",
|
41 |
+
"source" => "customeractivation/resource_attribute_source_Iswebsitelive",
|
42 |
+
"visible" => true,
|
43 |
+
"required" => false,
|
44 |
+
"default" => "",
|
45 |
+
"frontend" => "",
|
46 |
+
"user_defined" => "1",
|
47 |
+
"unique" => false,
|
48 |
+
"note" => "Iswebsite Live"
|
49 |
+
));
|
50 |
+
|
51 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "iswebsite_live");
|
52 |
+
|
53 |
+
|
54 |
+
$used_in_forms = array();
|
55 |
+
|
56 |
+
$used_in_forms[] = "adminhtml_customer";
|
57 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
58 |
+
->setData("is_used_for_customer_segment", true)
|
59 |
+
->setData("is_system", 0)
|
60 |
+
->setData("is_user_defined", 1)
|
61 |
+
->setData("is_visible", 1)
|
62 |
+
->setData("sort_order", 100)
|
63 |
+
;
|
64 |
+
$attribute->save();
|
65 |
+
|
66 |
+
$installer->addAttribute("customer", "date_founded", array(
|
67 |
+
"type" => "varchar",
|
68 |
+
"backend" => "",
|
69 |
+
"label" => "Date Founded",
|
70 |
+
"input" => "text",
|
71 |
+
"source" => "",
|
72 |
+
"visible" => true,
|
73 |
+
"required" => false,
|
74 |
+
"default" => "",
|
75 |
+
"frontend" => "",
|
76 |
+
"user_defined" => "1",
|
77 |
+
"unique" => false,
|
78 |
+
"note" => "Date Founded"
|
79 |
+
));
|
80 |
+
|
81 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "date_founded");
|
82 |
+
|
83 |
+
|
84 |
+
$used_in_forms = array();
|
85 |
+
|
86 |
+
$used_in_forms[] = "adminhtml_customer";
|
87 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
88 |
+
->setData("is_used_for_customer_segment", true)
|
89 |
+
->setData("is_system", 0)
|
90 |
+
->setData("is_user_defined", 1)
|
91 |
+
->setData("is_visible", 1)
|
92 |
+
->setData("sort_order", 100)
|
93 |
+
;
|
94 |
+
$attribute->save();
|
95 |
+
|
96 |
+
|
97 |
+
$installer->addAttribute("customer", "accountspayable_email", array(
|
98 |
+
"type" => "varchar",
|
99 |
+
"backend" => "",
|
100 |
+
"label" => "Accounts Payable Email Address",
|
101 |
+
"input" => "text",
|
102 |
+
"source" => "",
|
103 |
+
"visible" => true,
|
104 |
+
"required" => false,
|
105 |
+
"default" => "",
|
106 |
+
"frontend" => "",
|
107 |
+
"user_defined" => "1",
|
108 |
+
"unique" => false,
|
109 |
+
"note" => "Accounts Payable Email Address"
|
110 |
+
));
|
111 |
+
|
112 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "accountspayable_email");
|
113 |
+
|
114 |
+
|
115 |
+
$used_in_forms = array();
|
116 |
+
|
117 |
+
$used_in_forms[] = "adminhtml_customer";
|
118 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
119 |
+
->setData("is_used_for_customer_segment", true)
|
120 |
+
->setData("is_system", 0)
|
121 |
+
->setData("is_user_defined", 1)
|
122 |
+
->setData("is_visible", 1)
|
123 |
+
->setData("sort_order", 100)
|
124 |
+
;
|
125 |
+
$attribute->save();
|
126 |
+
|
127 |
+
$installer->addAttribute("customer", "website_url", array(
|
128 |
+
"type" => "varchar",
|
129 |
+
"backend" => "",
|
130 |
+
"label" => "Website URL",
|
131 |
+
"input" => "text",
|
132 |
+
"source" => "",
|
133 |
+
"visible" => true,
|
134 |
+
"required" => false,
|
135 |
+
"default" => "",
|
136 |
+
"frontend" => "",
|
137 |
+
"user_defined" => "1",
|
138 |
+
"unique" => false,
|
139 |
+
"note" => "Website URL"
|
140 |
+
));
|
141 |
+
|
142 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "website_url");
|
143 |
+
|
144 |
+
|
145 |
+
$used_in_forms = array();
|
146 |
+
|
147 |
+
$used_in_forms[] = "adminhtml_customer";
|
148 |
+
$attribute->setData("used_in_forms", $used_in_forms)
|
149 |
+
->setData("is_used_for_customer_segment", true)
|
150 |
+
->setData("is_system", 0)
|
151 |
+
->setData("is_user_defined", 1)
|
152 |
+
->setData("is_visible", 1)
|
153 |
+
->setData("sort_order", 100)
|
154 |
+
;
|
155 |
+
$attribute->save();
|
156 |
?>
|
app/design/adminhtml/default/default/layout/customerActivation.xml
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
|
4 |
-
<!-- <adminhtml_customer_edit>
|
5 |
-
<reference name="customer_edit_tabs">
|
6 |
-
<action method="addTab">
|
7 |
-
<name>customer_edit_tab_customerimages</name>
|
8 |
-
<block>customeractivation/adminhtml_customer_edit_tab_customerimages</block>
|
9 |
-
</action>
|
10 |
-
</reference>
|
11 |
-
</adminhtml_customer_edit>
|
12 |
-
-->
|
13 |
</layout>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<!-- <adminhtml_customer_edit>
|
5 |
+
<reference name="customer_edit_tabs">
|
6 |
+
<action method="addTab">
|
7 |
+
<name>customer_edit_tab_customerimages</name>
|
8 |
+
<block>customeractivation/adminhtml_customer_edit_tab_customerimages</block>
|
9 |
+
</action>
|
10 |
+
</reference>
|
11 |
+
</adminhtml_customer_edit>
|
12 |
+
-->
|
13 |
</layout>
|
app/design/adminhtml/default/default/template/customerActivation/customerActivation.phtml
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
-
<?php
|
2 |
-
$customerId = $this->getRequest()->getParam('id');
|
3 |
-
$customerData = Mage::getSingleton('customer/customer')->load($customerId);
|
4 |
-
?>
|
5 |
-
<?php $_element = $this->getElement() ?>
|
6 |
-
<?php echo $_element->getFieldsetContainerId(); ?>
|
7 |
-
<?php if ($_element->getFieldsetContainerId()): ?>
|
8 |
-
|
9 |
-
<div id="<?php echo $_element->getFieldsetContainerId(); ?>">
|
10 |
-
<?php endif; ?>
|
11 |
-
<?php if ($_element->getLegend()): ?>
|
12 |
-
<div class="entry-edit-head">
|
13 |
-
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $_element->getLegend() ?></h4>
|
14 |
-
<div class="form-buttons"><?php echo $_element->getHeaderBar() ?></div>
|
15 |
-
</div>
|
16 |
-
<?php endif; ?>
|
17 |
-
<?php if (!$_element->getNoContainer()): ?>
|
18 |
-
|
19 |
-
<div class="fieldset <?php echo $_element->getClass() ?>" id="<?php echo $_element->getHtmlId() ?>">
|
20 |
-
<?php endif; ?>
|
21 |
-
<div class="hor-scroll">
|
22 |
-
<?php if ($_element->getComment()): ?>
|
23 |
-
<p class="comment"><?php echo $this->escapeHtml($_element->getComment()) ?></p>
|
24 |
-
<?php endif; ?>
|
25 |
-
<?php if ($_element->hasHtmlContent()): ?>
|
26 |
-
<?php echo $_element->getHtmlContent(); ?>
|
27 |
-
<?php else: ?>
|
28 |
-
<table cellspacing="0" class="<?php echo $_element->hasTableClass() ? $_element->getTableClass() : 'form-list' ?>">
|
29 |
-
<?php $img = $_element->getFieldsetContainerId(); ?>
|
30 |
-
<tbody>
|
31 |
-
<?php echo $_element->getChildrenHtml(); ?>
|
32 |
-
|
33 |
-
<?php if ($_element->getHtmlId() == '_accountbase_fieldset'): ?>
|
34 |
-
|
35 |
-
<tr>
|
36 |
-
<td></td>
|
37 |
-
<td>
|
38 |
-
<?php if ($customerData->getLogoImage() != ''): ?>
|
39 |
-
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>" width="20%" height="20%"/></a>
|
40 |
-
<?php endif; ?>
|
41 |
-
</td>
|
42 |
-
</tr>
|
43 |
-
<?php endif; ?>
|
44 |
-
|
45 |
-
|
46 |
-
</tbody>
|
47 |
-
</table>
|
48 |
-
<?php endif; ?>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<?php echo $_element->getSubFieldsetHtml() ?>
|
52 |
-
<?php if (!$_element->getNoContainer()): ?>
|
53 |
-
|
54 |
-
</div>
|
55 |
-
<?php endif; ?>
|
56 |
-
<?php if ($_element->getFieldsetContainerId()): ?>
|
57 |
-
</div>
|
58 |
-
<?php endif; ?>
|
1 |
+
<?php
|
2 |
+
$customerId = $this->getRequest()->getParam('id');
|
3 |
+
$customerData = Mage::getSingleton('customer/customer')->load($customerId);
|
4 |
+
?>
|
5 |
+
<?php $_element = $this->getElement() ?>
|
6 |
+
<?php echo $_element->getFieldsetContainerId(); ?>
|
7 |
+
<?php if ($_element->getFieldsetContainerId()): ?>
|
8 |
+
|
9 |
+
<div id="<?php echo $_element->getFieldsetContainerId(); ?>">
|
10 |
+
<?php endif; ?>
|
11 |
+
<?php if ($_element->getLegend()): ?>
|
12 |
+
<div class="entry-edit-head">
|
13 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $_element->getLegend() ?></h4>
|
14 |
+
<div class="form-buttons"><?php echo $_element->getHeaderBar() ?></div>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if (!$_element->getNoContainer()): ?>
|
18 |
+
|
19 |
+
<div class="fieldset <?php echo $_element->getClass() ?>" id="<?php echo $_element->getHtmlId() ?>">
|
20 |
+
<?php endif; ?>
|
21 |
+
<div class="hor-scroll">
|
22 |
+
<?php if ($_element->getComment()): ?>
|
23 |
+
<p class="comment"><?php echo $this->escapeHtml($_element->getComment()) ?></p>
|
24 |
+
<?php endif; ?>
|
25 |
+
<?php if ($_element->hasHtmlContent()): ?>
|
26 |
+
<?php echo $_element->getHtmlContent(); ?>
|
27 |
+
<?php else: ?>
|
28 |
+
<table cellspacing="0" class="<?php echo $_element->hasTableClass() ? $_element->getTableClass() : 'form-list' ?>">
|
29 |
+
<?php $img = $_element->getFieldsetContainerId(); ?>
|
30 |
+
<tbody>
|
31 |
+
<?php echo $_element->getChildrenHtml(); ?>
|
32 |
+
|
33 |
+
<?php if ($_element->getHtmlId() == '_accountbase_fieldset'): ?>
|
34 |
+
|
35 |
+
<tr>
|
36 |
+
<td></td>
|
37 |
+
<td>
|
38 |
+
<?php if ($customerData->getLogoImage() != ''): ?>
|
39 |
+
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>" width="20%" height="20%"/></a>
|
40 |
+
<?php endif; ?>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
|
46 |
+
</tbody>
|
47 |
+
</table>
|
48 |
+
<?php endif; ?>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
<?php echo $_element->getSubFieldsetHtml() ?>
|
52 |
+
<?php if (!$_element->getNoContainer()): ?>
|
53 |
+
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
<?php if ($_element->getFieldsetContainerId()): ?>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/customerActivation/customerImages.phtml
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
$customerData = $this->getCustomerimages();
|
3 |
-
?>
|
4 |
-
<div id="customer_info_tabs_customer_edit_tab_action_content">
|
5 |
-
|
6 |
-
<div class="entry-edit">
|
7 |
-
<div class="entry-edit-head">
|
8 |
-
<h4 class="icon-head head-edit-form fieldset-legend">Customer Logo</h4>
|
9 |
-
</div>
|
10 |
-
<div id="group_fields4" class="fieldset fieldset-wide">
|
11 |
-
<div class="hor-scroll">
|
12 |
-
<table class="form-list" cellspacing="0">
|
13 |
-
<tbody>
|
14 |
-
<tr>
|
15 |
-
|
16 |
-
<td>
|
17 |
-
<?php if ($customerData->getLogoImage() != ''): ?>
|
18 |
-
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"/></a>
|
19 |
-
<?php endif; ?>
|
20 |
-
</td>
|
21 |
-
</tr>
|
22 |
-
</tbody>
|
23 |
-
</table>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
|
27 |
-
</div>
|
28 |
-
<?php if ($customerData->getNet30Reference() != ''): ?>
|
29 |
-
<div class="entry-edit">
|
30 |
-
<div class="entry-edit-head">
|
31 |
-
<h4 class="icon-head head-edit-form fieldset-legend">Net30 Reference</h4>
|
32 |
-
</div>
|
33 |
-
<div id="group_fields4" class="fieldset fieldset-wide">
|
34 |
-
<div class="hor-scroll">
|
35 |
-
<table class="form-list" cellspacing="0">
|
36 |
-
<tbody>
|
37 |
-
<tr>
|
38 |
-
|
39 |
-
<td>
|
40 |
-
|
41 |
-
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getNet30Reference() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getNet30Reference() ?>" width="100px" height="100px"/></a>
|
42 |
-
|
43 |
-
</td>
|
44 |
-
</tr>
|
45 |
-
</tbody>
|
46 |
-
</table>
|
47 |
-
</div>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
</div>
|
51 |
-
<?php endif; ?>
|
52 |
-
</div>
|
1 |
+
<?php
|
2 |
+
$customerData = $this->getCustomerimages();
|
3 |
+
?>
|
4 |
+
<div id="customer_info_tabs_customer_edit_tab_action_content">
|
5 |
+
|
6 |
+
<div class="entry-edit">
|
7 |
+
<div class="entry-edit-head">
|
8 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Customer Logo</h4>
|
9 |
+
</div>
|
10 |
+
<div id="group_fields4" class="fieldset fieldset-wide">
|
11 |
+
<div class="hor-scroll">
|
12 |
+
<table class="form-list" cellspacing="0">
|
13 |
+
<tbody>
|
14 |
+
<tr>
|
15 |
+
|
16 |
+
<td>
|
17 |
+
<?php if ($customerData->getLogoImage() != ''): ?>
|
18 |
+
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getLogoImage() ?>"/></a>
|
19 |
+
<?php endif; ?>
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
</tbody>
|
23 |
+
</table>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
</div>
|
28 |
+
<?php if ($customerData->getNet30Reference() != ''): ?>
|
29 |
+
<div class="entry-edit">
|
30 |
+
<div class="entry-edit-head">
|
31 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Net30 Reference</h4>
|
32 |
+
</div>
|
33 |
+
<div id="group_fields4" class="fieldset fieldset-wide">
|
34 |
+
<div class="hor-scroll">
|
35 |
+
<table class="form-list" cellspacing="0">
|
36 |
+
<tbody>
|
37 |
+
<tr>
|
38 |
+
|
39 |
+
<td>
|
40 |
+
|
41 |
+
<a target="_blank" href ="<?php echo Mage::getBaseUrl('media') . $customerData->getNet30Reference() ?>"><img src = "<?php echo Mage::getBaseUrl('media') . $customerData->getNet30Reference() ?>" width="100px" height="100px"/></a>
|
42 |
+
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
</tbody>
|
46 |
+
</table>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
</div>
|
51 |
+
<?php endif; ?>
|
52 |
+
</div>
|
app/design/adminhtml/default/default/template/customerActivation/info/purchaseorder.phtml
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
|
1 |
+
<p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
|
app/design/frontend/base/default/layout/customerActivation.xml
CHANGED
@@ -1,75 +1,102 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<customer_account_login>
|
4 |
-
<reference name="root">
|
5 |
-
<action method="setTemplate">
|
6 |
-
<template>page/1column.phtml</template>
|
7 |
-
</action>
|
8 |
-
</reference>
|
9 |
-
<reference name="customer_form_login">
|
10 |
-
<action method="setTemplate">
|
11 |
-
<template>customerActivation/customerActivation.phtml</template>
|
12 |
-
</action>
|
13 |
-
</reference>
|
14 |
-
</customer_account_login>
|
15 |
-
<default>
|
16 |
-
<reference name="
|
17 |
-
<action method="addLink" translate="label">
|
18 |
-
<label>Quick Order</label>
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
<
|
32 |
-
<
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
<
|
61 |
-
|
62 |
-
|
63 |
-
</
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<customer_account_login>
|
4 |
+
<reference name="root">
|
5 |
+
<action method="setTemplate">
|
6 |
+
<template>page/1column.phtml</template>
|
7 |
+
</action>
|
8 |
+
</reference>
|
9 |
+
<reference name="customer_form_login">
|
10 |
+
<action method="setTemplate">
|
11 |
+
<template>customerActivation/customerActivation.phtml</template>
|
12 |
+
</action>
|
13 |
+
</reference>
|
14 |
+
</customer_account_login>
|
15 |
+
<default>
|
16 |
+
<reference name="top.links">
|
17 |
+
<action method="addLink" translate="label title" module="customer" ifconfig="customer/customeractivation/disable_ext">
|
18 |
+
<label>Quick Order</label>
|
19 |
+
<url>customeractivation/quickorder/quickorderproduct</url>
|
20 |
+
<title>Wholesale Registration</title>
|
21 |
+
<prepare>true</prepare>
|
22 |
+
<urlParams/>
|
23 |
+
<position>100</position>
|
24 |
+
</action>
|
25 |
+
</reference>
|
26 |
+
</default>
|
27 |
+
|
28 |
+
<customer_logged_out>
|
29 |
+
<reference name="top.links">
|
30 |
+
<action method="addLink" translate="label title" module="customer" ifconfig="customer/customeractivation/disable_ext">
|
31 |
+
<label>Wholesale Registration</label>
|
32 |
+
<url>customerActivation/index/wholesale</url>
|
33 |
+
<title>Wholesale Registration</title>
|
34 |
+
<prepare>true</prepare>
|
35 |
+
<urlParams/>
|
36 |
+
<position>155</position>
|
37 |
+
</action>
|
38 |
+
</reference>
|
39 |
+
</customer_logged_out>
|
40 |
+
<customeractivation_index_wholesale>
|
41 |
+
<remove name="customer_form_register"/>
|
42 |
+
<reference name="content">
|
43 |
+
<block type = 'customer/form_register' name = 'wholesaleregister' template = 'customerActivation/wholesaleRegister.phtml'></block>
|
44 |
+
</reference>
|
45 |
+
</customeractivation_index_wholesale>
|
46 |
+
<customeractivation_index_wholesalelogin>
|
47 |
+
<remove name="customer_form_login"/>
|
48 |
+
<reference name="content">
|
49 |
+
<block type = 'customer/form_login' name = 'wholesalelogin' template = 'customerActivation/wholesaleLogin.phtml'></block>
|
50 |
+
</reference>
|
51 |
+
</customeractivation_index_wholesalelogin>
|
52 |
+
|
53 |
+
<checkout_cart_index translate="label">
|
54 |
+
<reference name="checkout.cart">
|
55 |
+
<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="customerActivation/checkout/cart/shipping.phtml"/>
|
56 |
+
</reference>
|
57 |
+
</checkout_cart_index>
|
58 |
+
|
59 |
+
<paypal_express_review translate="label">
|
60 |
+
<reference name="paypal.express.review">
|
61 |
+
<block type="paypal/express_review" name="express.review.shipping.method" as="shipping_method" template="customerActivation/review/shipping/method.phtml"/>
|
62 |
+
</reference>
|
63 |
+
</paypal_express_review>
|
64 |
+
|
65 |
+
<checkout_onepage_paymentmethod>
|
66 |
+
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="customerActivation/checkout/onepage/payment/methods.phtml">
|
67 |
+
<action method="setMethodFormTemplate">
|
68 |
+
<method>purchaseorder</method>
|
69 |
+
<template>payment/form/purchaseorder.phtml</template>
|
70 |
+
</action>
|
71 |
+
</block>
|
72 |
+
</checkout_onepage_paymentmethod>
|
73 |
+
<checkout_onepage_shippingmethod>
|
74 |
+
<!-- Mage_Checkout -->
|
75 |
+
<remove name="right"/>
|
76 |
+
<remove name="left"/>
|
77 |
+
|
78 |
+
<block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="customerActivation/checkout/onepage/shipping_method/available.phtml"/>
|
79 |
+
</checkout_onepage_shippingmethod>
|
80 |
+
<customeractivation_productorder_quickorderproduct>
|
81 |
+
<reference name="root">
|
82 |
+
<action method="setTemplate">
|
83 |
+
<template>page/1column.phtml</template>
|
84 |
+
</action>
|
85 |
+
</reference>
|
86 |
+
<update handle="customer_account" />
|
87 |
+
<reference name="my.account.wrapper">
|
88 |
+
<block type="customeractivation/orderproduct" name="ordermgt" template="customerActivation/quickorderproduct.phtml"/>
|
89 |
+
</reference>
|
90 |
+
</customeractivation_productorder_quickorderproduct>
|
91 |
+
<customeractivation_quickorder_quickorderproduct>
|
92 |
+
<reference name="root">
|
93 |
+
<action method="setTemplate">
|
94 |
+
<template>page/1column.phtml</template>
|
95 |
+
</action>
|
96 |
+
</reference>
|
97 |
+
<update handle="customer_account" />
|
98 |
+
<reference name="my.account.wrapper">
|
99 |
+
<block type="customeractivation/orderproduct" name="ordermgt" template="customerActivation/quickorderproduct.phtml"/>
|
100 |
+
</reference>
|
101 |
+
</customeractivation_quickorder_quickorderproduct>
|
102 |
+
</layout>
|
app/design/frontend/base/default/template/customerActivation/checkout/cart/shipping.phtml
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2014 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 /** @var $this Mage_Checkout_Block_Cart_Shipping */ ?>
|
28 |
+
<div class="shipping">
|
29 |
+
<h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
|
30 |
+
<div class="shipping-form">
|
31 |
+
<form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
|
32 |
+
<p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
|
33 |
+
<ul class="form-list">
|
34 |
+
<li>
|
35 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
36 |
+
<div class="input-box">
|
37 |
+
<?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
|
38 |
+
</div>
|
39 |
+
</li>
|
40 |
+
<?php //if($this->getStateActive()): ?>
|
41 |
+
<li>
|
42 |
+
<label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('State/Province') ?></label>
|
43 |
+
<div class="input-box">
|
44 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
|
45 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
46 |
+
</select>
|
47 |
+
<script type="text/javascript">
|
48 |
+
//<![CDATA[
|
49 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
|
50 |
+
//]]>
|
51 |
+
</script>
|
52 |
+
<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
<?php //endif; ?>
|
56 |
+
<?php if($this->getCityActive()): ?>
|
57 |
+
<li>
|
58 |
+
<label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
|
59 |
+
<div class="input-box">
|
60 |
+
<input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" />
|
61 |
+
</div>
|
62 |
+
</li>
|
63 |
+
<?php endif; ?>
|
64 |
+
<li>
|
65 |
+
<label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
|
66 |
+
<div class="input-box">
|
67 |
+
<input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" />
|
68 |
+
</div>
|
69 |
+
</li>
|
70 |
+
</ul>
|
71 |
+
<div class="buttons-set">
|
72 |
+
<button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
|
73 |
+
</div>
|
74 |
+
</form>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
|
78 |
+
//]]>
|
79 |
+
</script>
|
80 |
+
<?php $customer = Mage::getSingleton('customer/session')->getCustomer();
|
81 |
+
$customerObj = Mage::getModel('customer/customer')->load($customer->getId()); ?>
|
82 |
+
<?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
|
83 |
+
<form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
|
84 |
+
<dl class="sp-methods">
|
85 |
+
<?php foreach ($_shippingRateGroups as $code => $_rates):
|
86 |
+
if($customerObj->getGroupId() != 2)
|
87 |
+
{
|
88 |
+
if($code == 'thirdpartyfedex' || $code == 'thirdpartyups')
|
89 |
+
{
|
90 |
+
continue;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
/*if($customerObj->getUpsNumber() == "") {
|
94 |
+
if ($code == 'thirdpartyups') {
|
95 |
+
continue;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
if ($customerObj->getFedexNumber() == "") {
|
99 |
+
if ($code == 'thirdpartyfedex') {
|
100 |
+
continue;
|
101 |
+
}
|
102 |
+
}*/
|
103 |
+
?>
|
104 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
105 |
+
<dd>
|
106 |
+
<ul>
|
107 |
+
<?php foreach ($_rates as $_rate): ?>
|
108 |
+
<li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
|
109 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
110 |
+
<?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
|
111 |
+
<?php else: ?>
|
112 |
+
<input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
|
113 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
114 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
115 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
116 |
+
<?php echo $_excl; ?>
|
117 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
118 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
119 |
+
<?php endif; ?>
|
120 |
+
</label>
|
121 |
+
<?php endif ?>
|
122 |
+
</li>
|
123 |
+
<?php endforeach; ?>
|
124 |
+
</ul>
|
125 |
+
</dd>
|
126 |
+
<?php endforeach; ?>
|
127 |
+
</dl>
|
128 |
+
<div class="buttons-set">
|
129 |
+
<button type="submit" title="<?php echo $this->__('Update Total') ?>" class="button" name="do" value="<?php echo $this->__('Update Total') ?>"><span><span><?php echo $this->__('Update Total') ?></span></span></button>
|
130 |
+
</div>
|
131 |
+
</form>
|
132 |
+
<?php endif; ?>
|
133 |
+
<script type="text/javascript">
|
134 |
+
//<![CDATA[
|
135 |
+
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
136 |
+
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
137 |
+
|
138 |
+
coShippingMethodForm.submit = function () {
|
139 |
+
var country = $F('country');
|
140 |
+
var optionalZip = false;
|
141 |
+
|
142 |
+
for (i=0; i < countriesWithOptionalZip.length; i++) {
|
143 |
+
if (countriesWithOptionalZip[i] == country) {
|
144 |
+
optionalZip = true;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
if (optionalZip) {
|
148 |
+
$('postcode').removeClassName('required-entry');
|
149 |
+
}
|
150 |
+
else {
|
151 |
+
$('postcode').addClassName('required-entry');
|
152 |
+
}
|
153 |
+
return VarienForm.prototype.submit.bind(coShippingMethodForm)();
|
154 |
+
}
|
155 |
+
//]]>
|
156 |
+
</script>
|
157 |
+
</div>
|
158 |
+
</div>
|
app/design/frontend/base/default/template/customerActivation/checkout/onepage/payment/methods.phtml
CHANGED
@@ -1,90 +1,90 @@
|
|
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) 2014 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 |
-
* One page checkout payment methods
|
30 |
-
*
|
31 |
-
* @var $this Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
-
*/
|
33 |
-
?>
|
34 |
-
|
35 |
-
<?php
|
36 |
-
$methods = $this->getMethods();
|
37 |
-
$oneMethod = count($methods) <= 1;
|
38 |
-
$checkoutObject = Mage::getSingleton('checkout/session')->getQuote();
|
39 |
-
if ($checkoutObject->getCustomerGroupId()) {
|
40 |
-
$customerGroupId = $checkoutObject->getCustomerGroupId();
|
41 |
-
}
|
42 |
-
if($checkoutObject->getCustomerId()) {
|
43 |
-
$customerObject = Mage::getModel('customer/customer')->load($checkoutObject->getCustomerId());
|
44 |
-
$customerPaymentMethods = $customerObject->getPaymentmethods();
|
45 |
-
$paymentMethods = explode(',', $customerPaymentMethods);
|
46 |
-
}
|
47 |
-
|
48 |
-
?>
|
49 |
-
<?php if (empty($methods)): ?>
|
50 |
-
<dt>
|
51 |
-
<?php echo $this->__('No Payment Methods') ?>
|
52 |
-
</dt>
|
53 |
-
<?php else:
|
54 |
-
foreach ($methods as $_method):
|
55 |
-
$_code='';
|
56 |
-
$_code = $_method->getCode($_code);
|
57 |
-
|
58 |
-
if($customerGroupId != 2 && ($_code == 'net30' || $_code == 'net15' || $_code == 'net60' || $_code=='purchaseorder')):
|
59 |
-
continue;
|
60 |
-
elseif(($_code == 'net30' || $_code == 'net15' || $_code == 'net60') && !in_array($_code,$paymentMethods)):
|
61 |
-
continue;
|
62 |
-
endif;
|
63 |
-
?>
|
64 |
-
<dt>
|
65 |
-
<?php if(!$oneMethod): ?>
|
66 |
-
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
67 |
-
<?php else: ?>
|
68 |
-
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
69 |
-
<?php $oneMethod = $_code; ?>
|
70 |
-
<?php endif; ?>
|
71 |
-
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
72 |
-
</dt>
|
73 |
-
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
74 |
-
<dd>
|
75 |
-
<?php echo $html; ?>
|
76 |
-
</dd>
|
77 |
-
<?php endif; ?>
|
78 |
-
<?php endforeach;
|
79 |
-
endif;
|
80 |
-
?>
|
81 |
-
<?php echo $this->getChildChildHtml('additional'); ?>
|
82 |
-
<script type="text/javascript">
|
83 |
-
//<![CDATA[
|
84 |
-
<?php echo $this->getChildChildHtml('scripts'); ?>
|
85 |
-
payment.init();
|
86 |
-
<?php if (is_string($oneMethod)): ?>
|
87 |
-
payment.switchMethod('<?php echo $oneMethod ?>');
|
88 |
-
<?php endif; ?>
|
89 |
-
//]]>
|
90 |
-
</script>
|
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) 2014 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 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @var $this Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<?php
|
36 |
+
$methods = $this->getMethods();
|
37 |
+
$oneMethod = count($methods) <= 1;
|
38 |
+
$checkoutObject = Mage::getSingleton('checkout/session')->getQuote();
|
39 |
+
if ($checkoutObject->getCustomerGroupId()) {
|
40 |
+
$customerGroupId = $checkoutObject->getCustomerGroupId();
|
41 |
+
}
|
42 |
+
if($checkoutObject->getCustomerId()) {
|
43 |
+
$customerObject = Mage::getModel('customer/customer')->load($checkoutObject->getCustomerId());
|
44 |
+
$customerPaymentMethods = $customerObject->getPaymentmethods();
|
45 |
+
$paymentMethods = explode(',', $customerPaymentMethods);
|
46 |
+
}
|
47 |
+
|
48 |
+
?>
|
49 |
+
<?php if (empty($methods)): ?>
|
50 |
+
<dt>
|
51 |
+
<?php echo $this->__('No Payment Methods') ?>
|
52 |
+
</dt>
|
53 |
+
<?php else:
|
54 |
+
foreach ($methods as $_method):
|
55 |
+
$_code='';
|
56 |
+
$_code = $_method->getCode($_code);
|
57 |
+
|
58 |
+
if($customerGroupId != 2 && ($_code == 'net30' || $_code == 'net15' || $_code == 'net60' || $_code=='purchaseorder')):
|
59 |
+
continue;
|
60 |
+
elseif(($_code == 'net30' || $_code == 'net15' || $_code == 'net60') && !in_array($_code,$paymentMethods)):
|
61 |
+
continue;
|
62 |
+
endif;
|
63 |
+
?>
|
64 |
+
<dt>
|
65 |
+
<?php if(!$oneMethod): ?>
|
66 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
67 |
+
<?php else: ?>
|
68 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
69 |
+
<?php $oneMethod = $_code; ?>
|
70 |
+
<?php endif; ?>
|
71 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
72 |
+
</dt>
|
73 |
+
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
74 |
+
<dd>
|
75 |
+
<?php echo $html; ?>
|
76 |
+
</dd>
|
77 |
+
<?php endif; ?>
|
78 |
+
<?php endforeach;
|
79 |
+
endif;
|
80 |
+
?>
|
81 |
+
<?php echo $this->getChildChildHtml('additional'); ?>
|
82 |
+
<script type="text/javascript">
|
83 |
+
//<![CDATA[
|
84 |
+
<?php echo $this->getChildChildHtml('scripts'); ?>
|
85 |
+
payment.init();
|
86 |
+
<?php if (is_string($oneMethod)): ?>
|
87 |
+
payment.switchMethod('<?php echo $oneMethod ?>');
|
88 |
+
<?php endif; ?>
|
89 |
+
//]]>
|
90 |
+
</script>
|
app/design/frontend/base/default/template/customerActivation/checkout/onepage/shipping_method/available.phtml
CHANGED
@@ -1,153 +1,168 @@
|
|
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) 2014 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 /** @var $this Mage_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
28 |
-
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
29 |
-
<?php
|
30 |
-
$flag = 0;
|
31 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
32 |
-
$customerObj = Mage::getModel('customer/customer')->load($customer->getId());
|
33 |
-
|
34 |
-
?>
|
35 |
-
<?php if (!$_shippingRateGroups): ?>
|
36 |
-
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
37 |
-
<?php else: ?>
|
38 |
-
<dl class="sp-methods">
|
39 |
-
<?php $shippingCodePrice = array(); ?>
|
40 |
-
<?php $_sole = count($_shippingRateGroups) == 1;
|
41 |
-
foreach ($_shippingRateGroups as $code => $_rates):
|
42 |
-
if($customerObj->getUpsNumber() == "") {
|
43 |
-
if($code == 'thirdpartyups' ){continue;} }
|
44 |
-
if($customerObj->getFedexNumber() == ""){
|
45 |
-
|
46 |
-
}
|
47 |
-
if($customerObj->getGroupId() == 2 && ($code == 'freeshipping' || $code == 'usps' || $code == 'flatrate')) {
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
<?php
|
84 |
-
if ($_rate->getCode() == '
|
85 |
-
$shippingAccNo = " Acct # " . $customerObj->
|
86 |
-
$flag = 1;
|
87 |
-
}
|
88 |
-
?>
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2014 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 /** @var $this Mage_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
28 |
+
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
29 |
+
<?php
|
30 |
+
$flag = 0;
|
31 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
32 |
+
$customerObj = Mage::getModel('customer/customer')->load($customer->getId());
|
33 |
+
|
34 |
+
?>
|
35 |
+
<?php if (!$_shippingRateGroups): ?>
|
36 |
+
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
37 |
+
<?php else: ?>
|
38 |
+
<dl class="sp-methods">
|
39 |
+
<?php $shippingCodePrice = array(); ?>
|
40 |
+
<?php $_sole = count($_shippingRateGroups) == 1;
|
41 |
+
foreach ($_shippingRateGroups as $code => $_rates):
|
42 |
+
//if($customerObj->getUpsNumber() == "") {
|
43 |
+
//if($code == 'thirdpartyups' ){continue;} }
|
44 |
+
//if($customerObj->getFedexNumber() == ""){
|
45 |
+
// if($code == 'thirdpartyfedex'){continue;}
|
46 |
+
//}
|
47 |
+
//if($customerObj->getGroupId() == 2 && ($code == 'freeshipping' || $code == 'usps' || $code == 'flatrate')) {
|
48 |
+
// continue;
|
49 |
+
// }
|
50 |
+
if($customerObj->getGroupId() != 2)
|
51 |
+
{
|
52 |
+
if($code == 'thirdpartyfedex' || $code == 'thirdpartyups')
|
53 |
+
{
|
54 |
+
continue;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
?>
|
58 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
59 |
+
<dd>
|
60 |
+
<ul>
|
61 |
+
<?php $_sole = $_sole && count($_rates) == 1;
|
62 |
+
foreach ($_rates as $_rate):
|
63 |
+
?>
|
64 |
+
<?php $shippingCodePrice[] = "'" . $_rate->getCode() . "':" . (float) $_rate->getPrice(); ?>
|
65 |
+
<li>
|
66 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
67 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
|
68 |
+
<?php else: ?>
|
69 |
+
<?php if ($_sole) : ?>
|
70 |
+
<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
|
71 |
+
<?php else: ?>
|
72 |
+
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if ($_rate->getCode() === $this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
|
73 |
+
|
74 |
+
<?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
lastPrice = <?php echo (float) $_rate->getPrice(); ?>;
|
78 |
+
//]]>
|
79 |
+
</script>
|
80 |
+
<?php endif; ?>
|
81 |
+
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php
|
84 |
+
/*if ($_rate->getCode() == 'thirdpartyfedex_standand') {
|
85 |
+
$shippingAccNo = " Acct # " . $customerObj->getFedexNumber();
|
86 |
+
$flag = 1;
|
87 |
+
}
|
88 |
+
?>
|
89 |
+
|
90 |
+
<?php
|
91 |
+
if ($_rate->getCode() == 'thirdpartyups_standand') {
|
92 |
+
$shippingAccNo = " Acct # " . $customerObj->getUpsNumber();
|
93 |
+
$flag = 1;
|
94 |
+
}*/
|
95 |
+
?>
|
96 |
+
<?php /*
|
97 |
+
|
98 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
99 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
100 |
+
|
101 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>">
|
102 |
+
<?php echo $this->escapeHtml($this->getCarrierName($code)); ?><?php
|
103 |
+
if ($_excl == '<span class="price">$0.00</span>') {
|
104 |
+
|
105 |
+
} else {
|
106 |
+
echo $this->escapeHtml($_rate->getMethodTitle());
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
|
110 |
+
<?php
|
111 |
+
if ($_excl == '<span class="price">$0.00</span>') {
|
112 |
+
|
113 |
+
} else {
|
114 |
+
echo $_excl;
|
115 |
+
}
|
116 |
+
if ($flag == 1) {
|
117 |
+
echo $shippingAccNo;
|
118 |
+
$flag = 0;
|
119 |
+
}
|
120 |
+
?>
|
121 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
122 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
123 |
+
<?php endif; ?>
|
124 |
+
</label> */?>
|
125 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
126 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
127 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
128 |
+
<?php echo $_excl; ?>
|
129 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
130 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
131 |
+
<?php endif; ?>
|
132 |
+
</label>
|
133 |
+
<?php endif ?>
|
134 |
+
</li>
|
135 |
+
<?php endforeach; ?>
|
136 |
+
</ul>
|
137 |
+
</dd>
|
138 |
+
<?php endforeach; ?>
|
139 |
+
</dl>
|
140 |
+
<script type="text/javascript">
|
141 |
+
//<![CDATA[
|
142 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
143 |
+
var shippingCodePrice = {<?php echo implode(',', $shippingCodePrice); ?>};
|
144 |
+
<?php endif; ?>
|
145 |
+
|
146 |
+
$$('input[type="radio"][name="shipping_method"]').each(function (el) {
|
147 |
+
Event.observe(el, 'click', function () {
|
148 |
+
if (el.checked == true) {
|
149 |
+
var getShippingCode = el.getValue();
|
150 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
151 |
+
var newPrice = shippingCodePrice[getShippingCode];
|
152 |
+
if (!lastPrice) {
|
153 |
+
lastPrice = newPrice;
|
154 |
+
quoteBaseGrandTotal += newPrice;
|
155 |
+
}
|
156 |
+
if (newPrice != lastPrice) {
|
157 |
+
quoteBaseGrandTotal += (newPrice - lastPrice);
|
158 |
+
lastPrice = newPrice;
|
159 |
+
}
|
160 |
+
<?php endif; ?>
|
161 |
+
checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
});
|
165 |
+
});
|
166 |
+
//]]>
|
167 |
+
</script>
|
168 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/customerActivation/customerActivation.phtml
CHANGED
@@ -1,75 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
?>
|
4 |
-
<div class="account-login<?php if (!$this->helper('customer')->isRegistrationAllowed()) echo ' login-only' ?>">
|
5 |
-
|
6 |
-
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
7 |
-
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form" class="scaffold-form">
|
8 |
-
<?php echo $this->getBlockHtml('formkey'); ?>
|
9 |
-
<div class="col2-set">
|
10 |
-
<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
|
11 |
-
<div class="col-1 new-users">
|
12 |
-
<div class="content">
|
13 |
-
<h2><?php echo $this->__('New Here?') ?></h2>
|
14 |
-
<p class="form-instructions"><?php echo $this->__('Registration is free and easy!') ?></p>
|
15 |
-
<ul class="benefits">
|
16 |
-
<li><?php echo $this->__('Faster checkout') ?></li>
|
17 |
-
<li><?php echo $this->__('Save multiple shipping addresses') ?></li>
|
18 |
-
<li><?php echo $this->__('View and track orders and more') ?></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
<div class="buttons-set">
|
22 |
-
<a title="<?php echo $this->__('Create an Account') ?>" class="button" href="<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>"><span><span><?php echo $this->__('Create an Account') ?></span></span></a><br/><br/>
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
<li>
|
41 |
-
<label for="
|
42 |
-
<div class="input-box">
|
43 |
-
<input type="
|
44 |
-
</div>
|
45 |
-
</li>
|
46 |
-
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
</
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
?>
|
4 |
+
<div class="account-login<?php if (!$this->helper('customer')->isRegistrationAllowed()) echo ' login-only' ?>">
|
5 |
+
|
6 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
7 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form" class="scaffold-form">
|
8 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
9 |
+
<div class="col2-set">
|
10 |
+
<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
|
11 |
+
<div class="col-1 new-users">
|
12 |
+
<div class="content">
|
13 |
+
<h2><?php echo $this->__('New Here?') ?></h2>
|
14 |
+
<p class="form-instructions"><?php echo $this->__('Registration is free and easy!') ?></p>
|
15 |
+
<ul class="benefits">
|
16 |
+
<li><?php echo $this->__('Faster checkout') ?></li>
|
17 |
+
<li><?php echo $this->__('Save multiple shipping addresses') ?></li>
|
18 |
+
<li><?php echo $this->__('View and track orders and more') ?></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
<div class="buttons-set">
|
22 |
+
<a title="<?php echo $this->__('Create an Account') ?>" class="button" href="<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>"><span><span><?php echo $this->__('Create an Account') ?></span></span></a><br/><br/>
|
23 |
+
<?php
|
24 |
+
|
25 |
+
$moduleName = 'Exinent_CustomerActivation'; // edit to your required module name
|
26 |
+
//Mage::helper('core')->isModuleEnabled($moduleName) ||
|
27 |
+
if (!(Mage::getStoreConfig('advanced/modules_disable_output/Exinent_CustomerActivation')) && (Mage::getStoreConfig('customer/customeractivation/disable_ext'))) { ?>
|
28 |
+
<a class="button" href = "<?php echo Mage::getBaseUrl() . 'customerActivation/index/wholesale'; ?> "><span><span><?php echo $this->__('Wholesale Registration') ?></span></span></a>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<?php endif; ?>
|
33 |
+
<?php // This column should be col-1 if the registration column is not displayed ?>
|
34 |
+
<div class="<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>col-2<?php else: ?>col-1<?php endif; ?> registered-users">
|
35 |
+
<div class="content fieldset">
|
36 |
+
<h2><?php echo $this->__('Already registered?') ?></h2>
|
37 |
+
<p class="form-instructions"><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
38 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
39 |
+
<ul class="form-list">
|
40 |
+
<li>
|
41 |
+
<label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
42 |
+
<div class="input-box">
|
43 |
+
<input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
|
44 |
+
</div>
|
45 |
+
</li>
|
46 |
+
<li>
|
47 |
+
<label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
48 |
+
<div class="input-box">
|
49 |
+
<input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
|
50 |
+
</div>
|
51 |
+
</li>
|
52 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
53 |
+
<li>
|
54 |
+
<a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
|
55 |
+
</li>
|
56 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
57 |
+
</ul>
|
58 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
59 |
+
</div>
|
60 |
+
<div class="buttons-set">
|
61 |
+
<button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
|
62 |
+
<br/><br/>
|
63 |
+
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
|
68 |
+
<input name="context" type="hidden" value="checkout" />
|
69 |
+
<?php endif; ?>
|
70 |
+
</form>
|
71 |
+
<!-- <a class="button" style="float:right;margin-right:372px;"href = "<?php echo Mage::getBaseUrl() . 'customerActivation/index/wholesalelogin'; ?> "><span><span><?php echo $this->__('Wholesale Login') ?></span></span></a> -->
|
72 |
+
<script type="text/javascript">
|
73 |
+
//<![CDATA[
|
74 |
+
var dataForm = new VarienForm('login-form', true);
|
75 |
+
//]]>
|
76 |
+
</script>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<div class="buttons-set wholesale">
|
80 |
+
|
81 |
+
</div>
|
app/design/frontend/base/default/template/customerActivation/form/purchaseorder.phtml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
-
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
|
3 |
-
<li>
|
4 |
-
|
5 |
-
</li>
|
6 |
-
</ul>
|
7 |
-
|
1 |
+
|
2 |
+
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
|
3 |
+
<li>
|
4 |
+
|
5 |
+
</li>
|
6 |
+
</ul>
|
7 |
+
|
app/design/frontend/base/default/template/customerActivation/info/purchaseorder.phtml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
-
<?php //Mage::log($this->getInfo()->getData()); ?>
|
3 |
-
<p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
|
4 |
-
|
1 |
+
|
2 |
+
<?php //Mage::log($this->getInfo()->getData()); ?>
|
3 |
+
<p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
|
4 |
+
|
app/design/frontend/base/default/template/customerActivation/onepage/shipping_method/available.phtml
CHANGED
@@ -1,131 +1,131 @@
|
|
1 |
-
|
2 |
-
<?php /** @var $this Mage_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
3 |
-
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
4 |
-
<?php
|
5 |
-
$flag = 0;
|
6 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
7 |
-
$customerObj = Mage::getModel('customer/customer')->load($customer->getId());
|
8 |
-
?>
|
9 |
-
<?php if (!$_shippingRateGroups): ?>
|
10 |
-
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
11 |
-
<?php else: ?>
|
12 |
-
<dl class="sp-methods">
|
13 |
-
<?php $shippingCodePrice = array(); ?>
|
14 |
-
<?php
|
15 |
-
$_sole = count($_shippingRateGroups) == 1;
|
16 |
-
foreach ($_shippingRateGroups as $code => $_rates):
|
17 |
-
if ($customerObj->getUpsNumber() == "") {
|
18 |
-
if ($code == 'thirdparty') {
|
19 |
-
continue;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
if ($customerObj->getFedexNumber() == "") {
|
23 |
-
if ($code == 'thirdpartyfed') {
|
24 |
-
continue;
|
25 |
-
}
|
26 |
-
}
|
27 |
-
?>
|
28 |
-
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
29 |
-
<dd>
|
30 |
-
<ul>
|
31 |
-
<?php
|
32 |
-
$_sole = $_sole && count($_rates) == 1;
|
33 |
-
foreach ($_rates as $_rate):
|
34 |
-
?>
|
35 |
-
<?php $shippingCodePrice[] = "'" . $_rate->getCode() . "':" . (float) $_rate->getPrice(); ?>
|
36 |
-
<li>
|
37 |
-
<?php if ($_rate->getErrorMessage()): ?>
|
38 |
-
<ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
|
39 |
-
<?php else: ?>
|
40 |
-
<?php if ($_sole) : ?>
|
41 |
-
<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
|
42 |
-
<?php else: ?>
|
43 |
-
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if ($_rate->getCode() === $this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
|
44 |
-
|
45 |
-
<?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
|
46 |
-
<script type="text/javascript">
|
47 |
-
//<![CDATA[
|
48 |
-
lastPrice = <?php echo (float) $_rate->getPrice(); ?>;
|
49 |
-
//]]>
|
50 |
-
</script>
|
51 |
-
<?php endif; ?>
|
52 |
-
|
53 |
-
<?php endif; ?>
|
54 |
-
<?php
|
55 |
-
if ($_rate->getCode() == 'thirdpartyfed_standand') {
|
56 |
-
$shippingAccNo = " Acct # " . $customerObj->getFedexNumber();
|
57 |
-
$flag = 1;
|
58 |
-
}
|
59 |
-
?>
|
60 |
-
|
61 |
-
<?php
|
62 |
-
if ($_rate->getCode() == 'thirdparty_standand') {
|
63 |
-
$shippingAccNo = " Acct # " . $customerObj->getUpsNumber();
|
64 |
-
$flag = 1;
|
65 |
-
}
|
66 |
-
?>
|
67 |
-
|
68 |
-
|
69 |
-
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
70 |
-
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
71 |
-
|
72 |
-
<label for="s_method_<?php echo $_rate->getCode() ?>">
|
73 |
-
<?php echo $this->escapeHtml($this->getCarrierName($code)); ?><?php
|
74 |
-
if ($_excl == '<span class="price">$0.00</span>') {
|
75 |
-
|
76 |
-
} else {
|
77 |
-
echo $this->escapeHtml($_rate->getMethodTitle());
|
78 |
-
}
|
79 |
-
?>
|
80 |
-
|
81 |
-
<?php
|
82 |
-
if ($_excl == '<span class="price">$0.00</span>') {
|
83 |
-
|
84 |
-
} else {
|
85 |
-
echo $_excl;
|
86 |
-
}
|
87 |
-
if ($flag == 1) {
|
88 |
-
echo $shippingAccNo;
|
89 |
-
$flag = 0;
|
90 |
-
}
|
91 |
-
?>
|
92 |
-
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
93 |
-
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
94 |
-
<?php endif; ?>
|
95 |
-
</label>
|
96 |
-
<?php endif ?>
|
97 |
-
</li>
|
98 |
-
<?php endforeach; ?>
|
99 |
-
</ul>
|
100 |
-
</dd>
|
101 |
-
<?php endforeach; ?>
|
102 |
-
</dl>
|
103 |
-
<script type="text/javascript">
|
104 |
-
//<![CDATA[
|
105 |
-
<?php if (!empty($shippingCodePrice)): ?>
|
106 |
-
var shippingCodePrice = {<?php echo implode(',', $shippingCodePrice); ?>};
|
107 |
-
<?php endif; ?>
|
108 |
-
|
109 |
-
$$('input[type="radio"][name="shipping_method"]').each(function(el) {
|
110 |
-
Event.observe(el, 'click', function() {
|
111 |
-
if (el.checked == true) {
|
112 |
-
var getShippingCode = el.getValue();
|
113 |
-
<?php if (!empty($shippingCodePrice)): ?>
|
114 |
-
var newPrice = shippingCodePrice[getShippingCode];
|
115 |
-
if (!lastPrice) {
|
116 |
-
lastPrice = newPrice;
|
117 |
-
quoteBaseGrandTotal += newPrice;
|
118 |
-
}
|
119 |
-
if (newPrice != lastPrice) {
|
120 |
-
quoteBaseGrandTotal += (newPrice - lastPrice);
|
121 |
-
lastPrice = newPrice;
|
122 |
-
}
|
123 |
-
<?php endif; ?>
|
124 |
-
checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
125 |
-
return false;
|
126 |
-
}
|
127 |
-
});
|
128 |
-
});
|
129 |
-
//]]>
|
130 |
-
</script>
|
131 |
-
<?php endif; ?>
|
1 |
+
|
2 |
+
<?php /** @var $this Mage_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
3 |
+
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
4 |
+
<?php
|
5 |
+
$flag = 0;
|
6 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
7 |
+
$customerObj = Mage::getModel('customer/customer')->load($customer->getId());
|
8 |
+
?>
|
9 |
+
<?php if (!$_shippingRateGroups): ?>
|
10 |
+
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
11 |
+
<?php else: ?>
|
12 |
+
<dl class="sp-methods">
|
13 |
+
<?php $shippingCodePrice = array(); ?>
|
14 |
+
<?php
|
15 |
+
$_sole = count($_shippingRateGroups) == 1;
|
16 |
+
foreach ($_shippingRateGroups as $code => $_rates):
|
17 |
+
if ($customerObj->getUpsNumber() == "") {
|
18 |
+
if ($code == 'thirdparty') {
|
19 |
+
continue;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
if ($customerObj->getFedexNumber() == "") {
|
23 |
+
if ($code == 'thirdpartyfed') {
|
24 |
+
continue;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
?>
|
28 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
29 |
+
<dd>
|
30 |
+
<ul>
|
31 |
+
<?php
|
32 |
+
$_sole = $_sole && count($_rates) == 1;
|
33 |
+
foreach ($_rates as $_rate):
|
34 |
+
?>
|
35 |
+
<?php $shippingCodePrice[] = "'" . $_rate->getCode() . "':" . (float) $_rate->getPrice(); ?>
|
36 |
+
<li>
|
37 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
38 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
|
39 |
+
<?php else: ?>
|
40 |
+
<?php if ($_sole) : ?>
|
41 |
+
<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
|
42 |
+
<?php else: ?>
|
43 |
+
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if ($_rate->getCode() === $this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
|
44 |
+
|
45 |
+
<?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
|
46 |
+
<script type="text/javascript">
|
47 |
+
//<![CDATA[
|
48 |
+
lastPrice = <?php echo (float) $_rate->getPrice(); ?>;
|
49 |
+
//]]>
|
50 |
+
</script>
|
51 |
+
<?php endif; ?>
|
52 |
+
|
53 |
+
<?php endif; ?>
|
54 |
+
<?php
|
55 |
+
if ($_rate->getCode() == 'thirdpartyfed_standand') {
|
56 |
+
$shippingAccNo = " Acct # " . $customerObj->getFedexNumber();
|
57 |
+
$flag = 1;
|
58 |
+
}
|
59 |
+
?>
|
60 |
+
|
61 |
+
<?php
|
62 |
+
if ($_rate->getCode() == 'thirdparty_standand') {
|
63 |
+
$shippingAccNo = " Acct # " . $customerObj->getUpsNumber();
|
64 |
+
$flag = 1;
|
65 |
+
}
|
66 |
+
?>
|
67 |
+
|
68 |
+
|
69 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
70 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
71 |
+
|
72 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>">
|
73 |
+
<?php echo $this->escapeHtml($this->getCarrierName($code)); ?><?php
|
74 |
+
if ($_excl == '<span class="price">$0.00</span>') {
|
75 |
+
|
76 |
+
} else {
|
77 |
+
echo $this->escapeHtml($_rate->getMethodTitle());
|
78 |
+
}
|
79 |
+
?>
|
80 |
+
|
81 |
+
<?php
|
82 |
+
if ($_excl == '<span class="price">$0.00</span>') {
|
83 |
+
|
84 |
+
} else {
|
85 |
+
echo $_excl;
|
86 |
+
}
|
87 |
+
if ($flag == 1) {
|
88 |
+
echo $shippingAccNo;
|
89 |
+
$flag = 0;
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
93 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
94 |
+
<?php endif; ?>
|
95 |
+
</label>
|
96 |
+
<?php endif ?>
|
97 |
+
</li>
|
98 |
+
<?php endforeach; ?>
|
99 |
+
</ul>
|
100 |
+
</dd>
|
101 |
+
<?php endforeach; ?>
|
102 |
+
</dl>
|
103 |
+
<script type="text/javascript">
|
104 |
+
//<![CDATA[
|
105 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
106 |
+
var shippingCodePrice = {<?php echo implode(',', $shippingCodePrice); ?>};
|
107 |
+
<?php endif; ?>
|
108 |
+
|
109 |
+
$$('input[type="radio"][name="shipping_method"]').each(function(el) {
|
110 |
+
Event.observe(el, 'click', function() {
|
111 |
+
if (el.checked == true) {
|
112 |
+
var getShippingCode = el.getValue();
|
113 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
114 |
+
var newPrice = shippingCodePrice[getShippingCode];
|
115 |
+
if (!lastPrice) {
|
116 |
+
lastPrice = newPrice;
|
117 |
+
quoteBaseGrandTotal += newPrice;
|
118 |
+
}
|
119 |
+
if (newPrice != lastPrice) {
|
120 |
+
quoteBaseGrandTotal += (newPrice - lastPrice);
|
121 |
+
lastPrice = newPrice;
|
122 |
+
}
|
123 |
+
<?php endif; ?>
|
124 |
+
checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
});
|
128 |
+
});
|
129 |
+
//]]>
|
130 |
+
</script>
|
131 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/customerActivation/quickorderproduct.phtml
CHANGED
@@ -1,87 +1,87 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$orderSimpleProductsCollection = $this->getOrderSimpleProducts();
|
4 |
-
|
5 |
-
$baseUrl = Mage::getBaseUrl();
|
6 |
-
$minQty = Mage::getStoreConfig('customer/customeractivation/min_qty', Mage::app()->getStore());
|
7 |
-
if($minQty){
|
8 |
-
?>
|
9 |
-
<div><h5>Minimum Order Quantity <?php echo $minQty; ?></h5></div>
|
10 |
-
<?php } ?>
|
11 |
-
<div class="order_prodct_collection inner-container">
|
12 |
-
<form name="" id="" method="post" action="<?php echo Mage::getUrl('*/*/submitorderbySimpleproduct') ?>">
|
13 |
-
<div class="third-block grid12-12">
|
14 |
-
<?php $i=0;
|
15 |
-
foreach ($orderSimpleProductsCollection as $orderProduct):
|
16 |
-
?>
|
17 |
-
<?php //if ($typeCategory == $orderProduct['category']): ?>
|
18 |
-
<div class="order_product grid12-3">
|
19 |
-
<img src="<?php echo $orderProduct['image']; ?>" />
|
20 |
-
<div class="order_product_sku">
|
21 |
-
<div class="order_product_name"><a href="<?php echo $baseUrl.$orderProduct['product_url'].'html';
|
22 |
-
?>"><?php
|
23 |
-
echo $orderProduct['name']; ?></a></div>
|
24 |
-
<div class="order_product_name"><?php echo $orderProduct['price']; ?></div>
|
25 |
-
<span class="attr-width cart-table">
|
26 |
-
<label>Quantity</label>
|
27 |
-
<?php $skureplace = str_replace(' ', '', $orderProduct['sku']);
|
28 |
-
$skureplace = str_replace("'", "", $skureplace);
|
29 |
-
?>
|
30 |
-
|
31 |
-
<?php $sku = $orderProduct['sku']; ?>
|
32 |
-
<input type="text" class="input-text qty" onchange="qtyCalculate('<?php echo $skureplace . '_' . $i; ?>', '<?php echo count($orderProduct['sku']); ?>')" name="<?php echo $orderProduct['product_id'] ?>_<?php echo $sku; ?>" id="<?php echo $skureplace . '_' . $i; ?>" value=""/>
|
33 |
-
</span>
|
34 |
-
|
35 |
-
<b><span class="totalcount" name="total" id="<?php //echo $skureplace; ?>"></span></b>
|
36 |
-
|
37 |
-
</div>
|
38 |
-
|
39 |
-
</div>
|
40 |
-
<?php $i++;
|
41 |
-
if($i%4==0){?>
|
42 |
-
<div class="clear"></div>
|
43 |
-
<?php }
|
44 |
-
?>
|
45 |
-
<?php endforeach; ?></div>
|
46 |
-
<div><input type="submit" class="add_to_basket button float-right" name="Add to Basket" value="Add to Basket"></div>
|
47 |
-
</form>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<script type="text/javascript">
|
51 |
-
function qtyCalculate(sku, count) {
|
52 |
-
var totalsku = sku.split('_');
|
53 |
-
var totQty = 0;
|
54 |
-
for (var i = 1; i <= count; i++) {
|
55 |
-
var qty = parseInt(document.getElementById(totalsku[0] + '_' + i).value);
|
56 |
-
if (isNaN(qty))
|
57 |
-
{
|
58 |
-
qty = 0;
|
59 |
-
}
|
60 |
-
totQty = totQty + qty;
|
61 |
-
}
|
62 |
-
document.getElementById(totalsku[0]).innerHTML = totQty;
|
63 |
-
}
|
64 |
-
|
65 |
-
</script>
|
66 |
-
<style type="text/css">
|
67 |
-
.attr-width{display:inline-block;}
|
68 |
-
.attr-width label{padding: 0 5px;}
|
69 |
-
.order_prodct_collection{border:1px solid #ccc;}
|
70 |
-
.order_product{ float: left; margin: 5px 0; padding: 10px;}
|
71 |
-
.order_product:first-child{border-top:0 !important;}
|
72 |
-
.order_product_qty .attr-width{color:red;}
|
73 |
-
.order_product_attr .attr-width, .order_product_qty .attr-width,
|
74 |
-
.order_product_sku .attr-width{margin-top:9px;}
|
75 |
-
.order_product_name {font-weight:bold;font-size:14px;}
|
76 |
-
.clear{clear:both;}
|
77 |
-
.add_to_basket.float-right {margin: 10px;}
|
78 |
-
.customeractivation-productorder-quickorderproduct .my-account h2 {display: inline-block; padding: 0 9px;}
|
79 |
-
.grid12-3 {width:
|
80 |
-
.grid12-1, .grid12-2, .grid12-3, .grid12-4, .grid12-5, .grid12-6, .grid12-7, .grid12-8, .grid12-9, .grid12-10, .grid12-11, .grid12-12, .grid-full, .grid-col2-sidebar, .grid-col2-main { display: inline; float: left; margin-left: 1%; margin-right: 1%; }
|
81 |
-
.grid12-1 {width: 6.33%;}
|
82 |
-
.grid12-8 {width: 64.67%;}
|
83 |
-
.inner-container:before, .inner-container:after {content: "";display: table; line-height: 0;}
|
84 |
-
.inner-container:after { clear: both;}
|
85 |
-
.inner-container { clear: both; padding-left: 15px; padding-right: 15px;}
|
86 |
-
.clearer:after { clear: both; content: "."; display: block; font-size: 0; height: 0; line-height: 0; overflow: hidden; }
|
87 |
-
</style>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$orderSimpleProductsCollection = $this->getOrderSimpleProducts();
|
4 |
+
|
5 |
+
$baseUrl = Mage::getBaseUrl();
|
6 |
+
$minQty = Mage::getStoreConfig('customer/customeractivation/min_qty', Mage::app()->getStore());
|
7 |
+
if($minQty){
|
8 |
+
?>
|
9 |
+
<div><h5>Minimum Order Quantity <?php echo $minQty; ?></h5></div>
|
10 |
+
<?php } ?>
|
11 |
+
<div class="order_prodct_collection inner-container">
|
12 |
+
<form name="" id="" method="post" action="<?php echo Mage::getUrl('*/*/submitorderbySimpleproduct') ?>">
|
13 |
+
<div class="third-block grid12-12">
|
14 |
+
<?php $i=0;
|
15 |
+
foreach ($orderSimpleProductsCollection as $orderProduct):
|
16 |
+
?>
|
17 |
+
<?php //if ($typeCategory == $orderProduct['category']): ?>
|
18 |
+
<div class="order_product grid12-3">
|
19 |
+
<img src="<?php echo $orderProduct['image']; ?>" style="width:200px;" />
|
20 |
+
<div class="order_product_sku">
|
21 |
+
<div class="order_product_name"><a href="<?php echo $baseUrl.$orderProduct['product_url'].'.html';
|
22 |
+
?>"><?php
|
23 |
+
echo $orderProduct['name']; ?></a></div>
|
24 |
+
<div class="order_product_name"><?php echo $orderProduct['price']; ?></div>
|
25 |
+
<span class="attr-width cart-table">
|
26 |
+
<label>Quantity</label>
|
27 |
+
<?php $skureplace = str_replace(' ', '', $orderProduct['sku']);
|
28 |
+
$skureplace = str_replace("'", "", $skureplace);
|
29 |
+
?>
|
30 |
+
|
31 |
+
<?php $sku = $orderProduct['sku']; ?>
|
32 |
+
<input type="text" class="input-text qty" onchange="qtyCalculate('<?php echo $skureplace . '_' . $i; ?>', '<?php echo count($orderProduct['sku']); ?>')" name="<?php echo $orderProduct['product_id'] ?>_<?php echo $sku; ?>" id="<?php echo $skureplace . '_' . $i; ?>" value=""/>
|
33 |
+
</span>
|
34 |
+
|
35 |
+
<b><span class="totalcount" name="total" id="<?php //echo $skureplace; ?>"></span></b>
|
36 |
+
|
37 |
+
</div>
|
38 |
+
|
39 |
+
</div>
|
40 |
+
<?php $i++;
|
41 |
+
if($i%4==0){?>
|
42 |
+
<div class="clear"></div>
|
43 |
+
<?php }
|
44 |
+
?>
|
45 |
+
<?php endforeach; ?></div>
|
46 |
+
<div><input type="submit" class="add_to_basket button float-right" name="Add to Basket" value="Add to Basket"></div>
|
47 |
+
</form>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<script type="text/javascript">
|
51 |
+
function qtyCalculate(sku, count) {
|
52 |
+
var totalsku = sku.split('_');
|
53 |
+
var totQty = 0;
|
54 |
+
for (var i = 1; i <= count; i++) {
|
55 |
+
var qty = parseInt(document.getElementById(totalsku[0] + '_' + i).value);
|
56 |
+
if (isNaN(qty))
|
57 |
+
{
|
58 |
+
qty = 0;
|
59 |
+
}
|
60 |
+
totQty = totQty + qty;
|
61 |
+
}
|
62 |
+
document.getElementById(totalsku[0]).innerHTML = totQty;
|
63 |
+
}
|
64 |
+
|
65 |
+
</script>
|
66 |
+
<style type="text/css">
|
67 |
+
.attr-width{display:inline-block;}
|
68 |
+
.attr-width label{padding: 0 5px;}
|
69 |
+
.order_prodct_collection{border:1px solid #ccc;}
|
70 |
+
.order_product{ float: left; margin: 5px 0; padding: 10px;}
|
71 |
+
.order_product:first-child{border-top:0 !important;}
|
72 |
+
.order_product_qty .attr-width{color:red;}
|
73 |
+
.order_product_attr .attr-width, .order_product_qty .attr-width,
|
74 |
+
.order_product_sku .attr-width{margin-top:9px;}
|
75 |
+
.order_product_name {font-weight:bold;font-size:14px;}
|
76 |
+
.clear{clear:both;}
|
77 |
+
.add_to_basket.float-right {margin: 10px;}
|
78 |
+
.customeractivation-productorder-quickorderproduct .my-account h2 {display: inline-block; padding: 0 9px;}
|
79 |
+
.grid12-3 {width: 21%;}
|
80 |
+
.grid12-1, .grid12-2, .grid12-3, .grid12-4, .grid12-5, .grid12-6, .grid12-7, .grid12-8, .grid12-9, .grid12-10, .grid12-11, .grid12-12, .grid-full, .grid-col2-sidebar, .grid-col2-main { display: inline; float: left; margin-left: 1%; margin-right: 1%; }
|
81 |
+
.grid12-1 {width: 6.33%;}
|
82 |
+
.grid12-8 {width: 64.67%;}
|
83 |
+
.inner-container:before, .inner-container:after {content: "";display: table; line-height: 0;}
|
84 |
+
.inner-container:after { clear: both;}
|
85 |
+
.inner-container { clear: both; padding-left: 15px; padding-right: 15px;}
|
86 |
+
.clearer:after { clear: both; content: "."; display: block; font-size: 0; height: 0; line-height: 0; overflow: hidden; }
|
87 |
+
</style>
|
app/design/frontend/base/default/template/customerActivation/review/shipping/method.phtml
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/** @var $this Mage_Paypal_Block_Express_Review */
|
27 |
+
?>
|
28 |
+
<?php $customer = Mage::getSingleton('customer/session')->getCustomer();
|
29 |
+
$customerObj = Mage::getModel('customer/customer')->load($customer->getId()); ?>
|
30 |
+
<fieldset id="shipping-method-container">
|
31 |
+
<?php if ($this->getCanEditShippingMethod() || !$this->getCurrentShippingRate()):?>
|
32 |
+
<?php if ($groups = $this->getShippingRateGroups()):?>
|
33 |
+
<?php $currentRate = $this->getCurrentShippingRate(); ?>
|
34 |
+
<select name="shipping_method" id="shipping_method" style="width:250px;" class="required-entry">
|
35 |
+
<?php if (!$currentRate):?>
|
36 |
+
<option value=""><?php echo $this->__('Please select a shipping method...') ?></option>
|
37 |
+
<?php endif;?>
|
38 |
+
<?php foreach ($groups as $code => $rates):
|
39 |
+
if($customerObj->getGroupId() != 2)
|
40 |
+
{
|
41 |
+
if($code == 'thirdpartyfedex' || $code == 'thirdpartyups')
|
42 |
+
{
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
?>
|
47 |
+
<optgroup label="<?php echo $this->escapeHtml($this->getCarrierName($code)) ?>" style="font-style:normal;">
|
48 |
+
<?php foreach ($rates as $rate):?>
|
49 |
+
<option value="<?php echo $this->renderShippingRateValue($rate)?>"<?php echo ($currentRate === $rate) ? ' selected="selected"' : '' ;?>>
|
50 |
+
<?php echo $this->renderShippingRateOption($rate)?>
|
51 |
+
</option>
|
52 |
+
<?php endforeach;?>
|
53 |
+
</optgroup>
|
54 |
+
<?php endforeach;?>
|
55 |
+
</select>
|
56 |
+
<?php else: ?>
|
57 |
+
<p><strong><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></strong></p>
|
58 |
+
<?php endif;?>
|
59 |
+
<?php else: ?>
|
60 |
+
<p><strong><?php echo $this->renderShippingRateOption($this->getCurrentShippingRate())?></strong></p>
|
61 |
+
<?php endif; ?>
|
62 |
+
</fieldset>
|
63 |
+
<div style="display:none" id="shipping_method_update"><p><?php echo $this->__('Please update order data to get shipping methods and rates') ?></p></div>
|
app/design/frontend/base/default/template/customerActivation/wholesaleLogin.phtml
CHANGED
@@ -1,86 +1,86 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Customer login form template
|
4 |
-
*
|
5 |
-
* @see app/design/frontend/base/default/template/customer/form/login.phtml
|
6 |
-
*/
|
7 |
-
/** @var $this Mage_Customer_Block_Form_Login */
|
8 |
-
?>
|
9 |
-
<div class="account-login <?php if (!$this->helper('customer')->isRegistrationAllowed()) echo ' login-only' ?> ">
|
10 |
-
|
11 |
-
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
12 |
-
<form action="<?php echo Mage::getBaseUrl() . 'customerActivation/account/loginPost'; ?>" method="post" id="login-form" class="scaffold-form">
|
13 |
-
<?php echo $this->getBlockHtml('formkey'); ?>
|
14 |
-
<div class="col2-set">
|
15 |
-
<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
|
16 |
-
<div class="col-1 new-users">
|
17 |
-
<div class="content">
|
18 |
-
<h2><?php echo $this->__('New Here?') ?></h2>
|
19 |
-
<p class="form-instructions"><?php echo $this->__('Registration is free and easy!') ?></p>
|
20 |
-
<ul class="benefits">
|
21 |
-
<li><?php echo $this->__('Faster checkout') ?></li>
|
22 |
-
<li><?php echo $this->__('Save multiple shipping addresses') ?></li>
|
23 |
-
<li><?php echo $this->__('View and track orders and more') ?></li>
|
24 |
-
</ul>
|
25 |
-
</div>
|
26 |
-
<div class="buttons-set">
|
27 |
-
<a title="<?php echo $this->__('Wholesale Registration') ?>" class="button" href = "<?php echo Mage::getBaseUrl() . 'customerActivation/index/wholesale'; ?> "><span><span><?php echo $this->__('Wholesale Registration') ?></span></span></a>
|
28 |
-
</div>
|
29 |
-
</div>
|
30 |
-
<?php endif; ?>
|
31 |
-
<?php // This column should be col-1 if the registration column is not displayed ?>
|
32 |
-
<div class="<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>col-2<?php else: ?>col-1<?php endif; ?> registered-users">
|
33 |
-
<div class="content fieldset">
|
34 |
-
<h2><?php echo $this->__('Already registered?') ?></h2>
|
35 |
-
<p class="form-instructions"><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
36 |
-
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
37 |
-
<ul class="form-list">
|
38 |
-
<li>
|
39 |
-
<label for="email"><em>*</em><?php echo $this->__('Account Id') ?></label>
|
40 |
-
<div class="input-box">
|
41 |
-
<input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text" title="<?php echo $this->__('Email Address') ?>" />
|
42 |
-
</div>
|
43 |
-
</li>
|
44 |
-
<li>
|
45 |
-
<label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
46 |
-
<div class="input-box">
|
47 |
-
<input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
|
48 |
-
</div>
|
49 |
-
</li>
|
50 |
-
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
51 |
-
<li>
|
52 |
-
<a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
|
53 |
-
</li>
|
54 |
-
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
55 |
-
<input type="hidden" name="groupname" value="2" />
|
56 |
-
</ul>
|
57 |
-
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
58 |
-
|
59 |
-
</div>
|
60 |
-
<div class="buttons-set">
|
61 |
-
<button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
|
62 |
-
<br/><br/>
|
63 |
-
|
64 |
-
</div>
|
65 |
-
</div>
|
66 |
-
</div>
|
67 |
-
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
|
68 |
-
<input name="context" type="hidden" value="checkout" />
|
69 |
-
<?php endif; ?>
|
70 |
-
</form>
|
71 |
-
|
72 |
-
<style type="text/css">
|
73 |
-
.col3-layout .col-wrapper .col-main {
|
74 |
-
float: none;
|
75 |
-
width: auto;
|
76 |
-
padding: 0;
|
77 |
-
}
|
78 |
-
.buttons-set{margin-right:219px;border-top:0;}
|
79 |
-
.col2-set .col-2 {border-left: 1px solid #ededed;}
|
80 |
-
</style>
|
81 |
-
<script type="text/javascript">
|
82 |
-
//<![CDATA[
|
83 |
-
var dataForm = new VarienForm('login-form', true);
|
84 |
-
//]]>
|
85 |
-
</script>
|
86 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer login form template
|
4 |
+
*
|
5 |
+
* @see app/design/frontend/base/default/template/customer/form/login.phtml
|
6 |
+
*/
|
7 |
+
/** @var $this Mage_Customer_Block_Form_Login */
|
8 |
+
?>
|
9 |
+
<div class="account-login <?php if (!$this->helper('customer')->isRegistrationAllowed()) echo ' login-only' ?> ">
|
10 |
+
|
11 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
12 |
+
<form action="<?php echo Mage::getBaseUrl() . 'customerActivation/account/loginPost'; ?>" method="post" id="login-form" class="scaffold-form">
|
13 |
+
<?php echo $this->getBlockHtml('formkey'); ?>
|
14 |
+
<div class="col2-set">
|
15 |
+
<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>
|
16 |
+
<div class="col-1 new-users">
|
17 |
+
<div class="content">
|
18 |
+
<h2><?php echo $this->__('New Here?') ?></h2>
|
19 |
+
<p class="form-instructions"><?php echo $this->__('Registration is free and easy!') ?></p>
|
20 |
+
<ul class="benefits">
|
21 |
+
<li><?php echo $this->__('Faster checkout') ?></li>
|
22 |
+
<li><?php echo $this->__('Save multiple shipping addresses') ?></li>
|
23 |
+
<li><?php echo $this->__('View and track orders and more') ?></li>
|
24 |
+
</ul>
|
25 |
+
</div>
|
26 |
+
<div class="buttons-set">
|
27 |
+
<a title="<?php echo $this->__('Wholesale Registration') ?>" class="button" href = "<?php echo Mage::getBaseUrl() . 'customerActivation/index/wholesale'; ?> "><span><span><?php echo $this->__('Wholesale Registration') ?></span></span></a>
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
<?php endif; ?>
|
31 |
+
<?php // This column should be col-1 if the registration column is not displayed ?>
|
32 |
+
<div class="<?php if ($this->helper('customer')->isRegistrationAllowed()): ?>col-2<?php else: ?>col-1<?php endif; ?> registered-users">
|
33 |
+
<div class="content fieldset">
|
34 |
+
<h2><?php echo $this->__('Already registered?') ?></h2>
|
35 |
+
<p class="form-instructions"><?php echo $this->__('If you have an account with us, please log in.') ?></p>
|
36 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
37 |
+
<ul class="form-list">
|
38 |
+
<li>
|
39 |
+
<label for="email"><em>*</em><?php echo $this->__('Account Id') ?></label>
|
40 |
+
<div class="input-box">
|
41 |
+
<input type="text" autocapitalize="off" autocorrect="off" spellcheck="false" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text" title="<?php echo $this->__('Email Address') ?>" />
|
42 |
+
</div>
|
43 |
+
</li>
|
44 |
+
<li>
|
45 |
+
<label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
46 |
+
<div class="input-box">
|
47 |
+
<input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
51 |
+
<li>
|
52 |
+
<a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
|
53 |
+
</li>
|
54 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
55 |
+
<input type="hidden" name="groupname" value="2" />
|
56 |
+
</ul>
|
57 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
58 |
+
|
59 |
+
</div>
|
60 |
+
<div class="buttons-set">
|
61 |
+
<button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
|
62 |
+
<br/><br/>
|
63 |
+
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
|
68 |
+
<input name="context" type="hidden" value="checkout" />
|
69 |
+
<?php endif; ?>
|
70 |
+
</form>
|
71 |
+
|
72 |
+
<style type="text/css">
|
73 |
+
.col3-layout .col-wrapper .col-main {
|
74 |
+
float: none;
|
75 |
+
width: auto;
|
76 |
+
padding: 0;
|
77 |
+
}
|
78 |
+
.buttons-set{margin-right:219px;border-top:0;}
|
79 |
+
.col2-set .col-2 {border-left: 1px solid #ededed;}
|
80 |
+
</style>
|
81 |
+
<script type="text/javascript">
|
82 |
+
//<![CDATA[
|
83 |
+
var dataForm = new VarienForm('login-form', true);
|
84 |
+
//]]>
|
85 |
+
</script>
|
86 |
+
</div>
|
app/design/frontend/base/default/template/customerActivation/wholesaleRegister.phtml
CHANGED
@@ -1,486 +1,489 @@
|
|
1 |
-
<?php ?>
|
2 |
-
<div class="account-create">
|
3 |
-
<div class="page-title">
|
4 |
-
<h1><?php echo $this->__('Create WholesaleAccount') ?></h1>
|
5 |
-
</div>
|
6 |
-
<?php
|
7 |
-
$email_error = Mage::getSingleton('core/session')->getEmailError();
|
8 |
-
$url = Mage::getBaseUrl() . 'customer/account/forgotpassword/';
|
9 |
-
if ($email_error) {
|
10 |
-
$this->getMessagesBlock()->addError('There is already an account with this email address. If you are sure that it is your email address, <a href="' . $url . '">click here</a> to get your password and access your account.');
|
11 |
-
echo $this->getMessagesBlock()->getGroupedHtml();
|
12 |
-
Mage::getSingleton('core/session')->unsEmailError();
|
13 |
-
}
|
14 |
-
?>
|
15 |
-
<?php echo $this->getChildHtml('form_fields_before') ?>
|
16 |
-
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
17 |
-
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" onsubmit="return Validate(this);" name="frmSample" enctype="multipart/form-data">
|
18 |
-
<div class="fieldset">
|
19 |
-
<input type="hidden" name="customer_activation" value="customerActivation" />
|
20 |
-
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
21 |
-
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
22 |
-
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
|
23 |
-
<ul class="form-list">
|
24 |
-
<input type="hidden" name="group_id" id="group_id" value="2"/>
|
25 |
-
<?php Mage::getSingleton('customer/session')->setNewRegistration(1); ?>
|
26 |
-
<li class="fields">
|
27 |
-
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
|
28 |
-
</li>
|
29 |
-
<li>
|
30 |
-
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
31 |
-
<div class="input-box">
|
32 |
-
<input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
33 |
-
</div>
|
34 |
-
</li>
|
35 |
-
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
36 |
-
<?php if ($_dob->isEnabled()): ?>
|
37 |
-
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
|
38 |
-
<?php endif ?>
|
39 |
-
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
40 |
-
<?php if ($_taxvat->isEnabled()): ?>
|
41 |
-
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
|
42 |
-
<?php endif ?>
|
43 |
-
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
44 |
-
<?php if ($_gender->isEnabled()): ?>
|
45 |
-
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
|
46 |
-
<?php endif ?>
|
47 |
-
</ul>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<div class="fieldset">
|
51 |
-
|
52 |
-
<ul class="form-list">
|
53 |
-
<?php $addressconfig = Mage::getStoreConfig('customer/customeractivation/address_field', Mage::app()->getStore()); ?>
|
54 |
-
<?php if ($addressconfig == 1): ?>
|
55 |
-
<input type="hidden" name="create_address" value="1" />
|
56 |
-
<li class="fields">
|
57 |
-
<div class="field">
|
58 |
-
<label for="company"><?php echo $this->__('Company') ?></label>
|
59 |
-
<div class="input-box">
|
60 |
-
<input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
61 |
-
</div>
|
62 |
-
</div>
|
63 |
-
<div class="field">
|
64 |
-
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
65 |
-
<div class="input-box">
|
66 |
-
<input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
67 |
-
</div>
|
68 |
-
</div>
|
69 |
-
</li>
|
70 |
-
|
71 |
-
|
72 |
-
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
73 |
-
<li class="wide">
|
74 |
-
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Address line 1') ?></label>
|
75 |
-
<div class="input-box">
|
76 |
-
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
|
77 |
-
</div>
|
78 |
-
</li>
|
79 |
-
|
80 |
-
|
81 |
-
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
82 |
-
|
83 |
-
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
84 |
-
<li class="wide">
|
85 |
-
<label for="street_1"><?php echo $this->__('Address line 2') ?></label>
|
86 |
-
<div class="input-box">
|
87 |
-
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
88 |
-
</div>
|
89 |
-
</li>
|
90 |
-
|
91 |
-
<li class="fields">
|
92 |
-
<div class="field">
|
93 |
-
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
94 |
-
<div class="input-box">
|
95 |
-
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
96 |
-
</div>
|
97 |
-
</div>
|
98 |
-
<div class="field">
|
99 |
-
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
100 |
-
<div class="input-box">
|
101 |
-
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
102 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
103 |
-
</select>
|
104 |
-
<script type="text/javascript">
|
105 |
-
//<![CDATA[
|
106 |
-
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
107 |
-
//]]>
|
108 |
-
</script>
|
109 |
-
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
110 |
-
</div>
|
111 |
-
</div>
|
112 |
-
</li>
|
113 |
-
<li class="fields">
|
114 |
-
<div class="field">
|
115 |
-
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
116 |
-
<div class="input-box">
|
117 |
-
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
118 |
-
</div>
|
119 |
-
</div>
|
120 |
-
<div class="field">
|
121 |
-
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
122 |
-
<div class="input-box">
|
123 |
-
<?php echo $this->getCountryHtmlSelect() ?>
|
124 |
-
</div>
|
125 |
-
</div>
|
126 |
-
</li>
|
127 |
-
<li class="control">
|
128 |
-
<input type="hidden" name="default_billing" value="1" />
|
129 |
-
<input class="checkbox" id="termas" type="radio" name="default_shipping" onClick="shippingCheck()" />
|
130 |
-
<label for="termas"><?php echo $this->__('Select if Billing and Shipping address are same') ?></label><br/><br/>
|
131 |
-
<input class="checkbox" id="notcheck" type="radio" name="default_shipping" onclick="showMe('div_1', this)"/>
|
132 |
-
<label for="notcheck"><?php echo $this->__('Select if Billing and Shipping address are not same') ?></label>
|
133 |
-
</li>
|
134 |
-
<div id="div_1" class="fieldset" style="display:none">
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
<
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
<
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
<
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
<?php
|
164 |
-
|
165 |
-
|
166 |
-
<
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
<
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
<
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
<
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
<
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
<
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
<
|
236 |
-
|
237 |
-
|
238 |
-
<option value="
|
239 |
-
<option value="
|
240 |
-
<option value="
|
241 |
-
<option value="
|
242 |
-
<option value="
|
243 |
-
<option value="
|
244 |
-
<option value="
|
245 |
-
<option value="
|
246 |
-
<option value="
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
<
|
260 |
-
|
261 |
-
|
262 |
-
<option value="
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
<
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
<
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
<
|
282 |
-
|
283 |
-
|
284 |
-
<option value="
|
285 |
-
<option value="
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
<input name="
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
<
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
<
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
<
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
<p class="
|
327 |
-
<
|
328 |
-
|
329 |
-
|
330 |
-
</
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
var
|
345 |
-
var
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
jQuery(
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
new RegionUpdater('country', '
|
375 |
-
|
376 |
-
|
377 |
-
<script type="text/javascript">
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
</
|
388 |
-
<
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
if (i ==
|
431 |
-
this[i] =
|
432 |
-
}
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
var
|
442 |
-
var
|
443 |
-
var
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
|
|
|
|
|
1 |
+
<?php ?>
|
2 |
+
<div class="account-create">
|
3 |
+
<div class="page-title">
|
4 |
+
<h1><?php echo $this->__('Create WholesaleAccount') ?></h1>
|
5 |
+
</div>
|
6 |
+
<?php
|
7 |
+
$email_error = Mage::getSingleton('core/session')->getEmailError();
|
8 |
+
$url = Mage::getBaseUrl() . 'customer/account/forgotpassword/';
|
9 |
+
if ($email_error) {
|
10 |
+
$this->getMessagesBlock()->addError('There is already an account with this email address. If you are sure that it is your email address, <a href="' . $url . '">click here</a> to get your password and access your account.');
|
11 |
+
echo $this->getMessagesBlock()->getGroupedHtml();
|
12 |
+
Mage::getSingleton('core/session')->unsEmailError();
|
13 |
+
}
|
14 |
+
?>
|
15 |
+
<?php echo $this->getChildHtml('form_fields_before') ?>
|
16 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
17 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" onsubmit="return Validate(this);" name="frmSample" enctype="multipart/form-data">
|
18 |
+
<div class="fieldset">
|
19 |
+
<input type="hidden" name="customer_activation" value="customerActivation" />
|
20 |
+
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
21 |
+
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
22 |
+
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
|
23 |
+
<ul class="form-list">
|
24 |
+
<input type="hidden" name="group_id" id="group_id" value="2"/>
|
25 |
+
<?php Mage::getSingleton('customer/session')->setNewRegistration(1); ?>
|
26 |
+
<li class="fields">
|
27 |
+
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?>
|
28 |
+
</li>
|
29 |
+
<li>
|
30 |
+
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
31 |
+
<div class="input-box">
|
32 |
+
<input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
33 |
+
</div>
|
34 |
+
</li>
|
35 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
36 |
+
<?php if ($_dob->isEnabled()): ?>
|
37 |
+
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
|
38 |
+
<?php endif ?>
|
39 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
40 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
41 |
+
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
|
42 |
+
<?php endif ?>
|
43 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
44 |
+
<?php if ($_gender->isEnabled()): ?>
|
45 |
+
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
|
46 |
+
<?php endif ?>
|
47 |
+
</ul>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<div class="fieldset">
|
51 |
+
|
52 |
+
<ul class="form-list">
|
53 |
+
<?php $addressconfig = Mage::getStoreConfig('customer/customeractivation/address_field', Mage::app()->getStore()); ?>
|
54 |
+
<?php if ($addressconfig == 1): ?>
|
55 |
+
<input type="hidden" name="create_address" value="1" />
|
56 |
+
<li class="fields">
|
57 |
+
<div class="field">
|
58 |
+
<label for="company"><?php echo $this->__('Company') ?></label>
|
59 |
+
<div class="input-box">
|
60 |
+
<input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<div class="field">
|
64 |
+
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
65 |
+
<div class="input-box">
|
66 |
+
<input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</li>
|
70 |
+
|
71 |
+
|
72 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
73 |
+
<li class="wide">
|
74 |
+
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Address line 1') ?></label>
|
75 |
+
<div class="input-box">
|
76 |
+
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
|
77 |
+
</div>
|
78 |
+
</li>
|
79 |
+
|
80 |
+
|
81 |
+
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
82 |
+
|
83 |
+
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
84 |
+
<li class="wide">
|
85 |
+
<label for="street_1"><?php echo $this->__('Address line 2') ?></label>
|
86 |
+
<div class="input-box">
|
87 |
+
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
88 |
+
</div>
|
89 |
+
</li>
|
90 |
+
|
91 |
+
<li class="fields">
|
92 |
+
<div class="field">
|
93 |
+
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
94 |
+
<div class="input-box">
|
95 |
+
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<div class="field">
|
99 |
+
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
100 |
+
<div class="input-box">
|
101 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
102 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
103 |
+
</select>
|
104 |
+
<script type="text/javascript">
|
105 |
+
//<![CDATA[
|
106 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
107 |
+
//]]>
|
108 |
+
</script>
|
109 |
+
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</li>
|
113 |
+
<li class="fields">
|
114 |
+
<div class="field">
|
115 |
+
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
116 |
+
<div class="input-box">
|
117 |
+
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
<div class="field">
|
121 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
122 |
+
<div class="input-box">
|
123 |
+
<?php echo $this->getCountryHtmlSelect() ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<li class="control">
|
128 |
+
<input type="hidden" name="default_billing" value="1" />
|
129 |
+
<input class="checkbox" id="termas" type="radio" name="default_shipping" onClick="shippingCheck()" />
|
130 |
+
<label for="termas"><?php echo $this->__('Select if Billing and Shipping address are same') ?></label><br/><br/>
|
131 |
+
<input class="checkbox" id="notcheck" type="radio" name="default_shipping" onclick="showMe('div_1', this)"/>
|
132 |
+
<label for="notcheck"><?php echo $this->__('Select if Billing and Shipping address are not same') ?></label>
|
133 |
+
</li>
|
134 |
+
<div id="div_1" class="fieldset" style="display:none">
|
135 |
+
<input type="hidden" name="both_not_same" id="both_not_same" value="1" />
|
136 |
+
<div>
|
137 |
+
<label for="shipping_address">Default Shipping Address</label>
|
138 |
+
</div>
|
139 |
+
<br/>
|
140 |
+
<div>
|
141 |
+
<ul class="form-list">
|
142 |
+
<li class="fields">
|
143 |
+
<?php /*<div class="field">
|
144 |
+
<label for="company"class="required"><em>*</em><?php echo $this->__('Company') ?></label>
|
145 |
+
<div class="input-box">
|
146 |
+
<input type="text" name="shipping[company]" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text required-entry" />
|
147 |
+
</div>
|
148 |
+
</div> */?>
|
149 |
+
<div class="field">
|
150 |
+
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
151 |
+
<div class="input-box">
|
152 |
+
<input type="text" name="shipping[telephone]" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</li>
|
156 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
157 |
+
<li class="wide">
|
158 |
+
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Address line 1') ?></label>
|
159 |
+
<div class="input-box">
|
160 |
+
<input type="text" name="shipping[street][]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
|
161 |
+
</div>
|
162 |
+
</li>
|
163 |
+
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
164 |
+
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
165 |
+
<li class="wide">
|
166 |
+
<label for="street_1"><?php echo $this->__('Address line 2') ?></label>
|
167 |
+
<div class="input-box">
|
168 |
+
<input type="text" name="shipping[street][]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
169 |
+
</div>
|
170 |
+
</li>
|
171 |
+
<?php endfor; ?>
|
172 |
+
<li class="fields">
|
173 |
+
<div class="field">
|
174 |
+
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
175 |
+
<div class="input-box">
|
176 |
+
<input type="text" name="shipping[city]" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
|
180 |
+
<div class="field">
|
181 |
+
<label for="shipping[region_id]" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
182 |
+
<div class="input-box">
|
183 |
+
<select id="shipping[region_id]" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
184 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
185 |
+
</select>
|
186 |
+
<script type="text/javascript">
|
187 |
+
//<![CDATA[
|
188 |
+
$('shipping[region_id]').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
189 |
+
//]]>
|
190 |
+
</script>
|
191 |
+
<input type="text" id="shipping[region]" name="shipping[region]" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
</li>
|
195 |
+
<li class="fields">
|
196 |
+
<div class="field">
|
197 |
+
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
198 |
+
<div class="input-box">
|
199 |
+
<input type="text" name="shipping[postcode]" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<div class="field">
|
203 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
204 |
+
<div class="input-box">
|
205 |
+
<?php echo $this->getCountryHtmlSelect(null, 'shipping[country_id]', 'shipping[country_id]', 'Shipping Country') ?>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
</li>
|
209 |
+
</ul>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
<?php endfor; ?>
|
213 |
+
<?php endif; ?>
|
214 |
+
<li class="fields">
|
215 |
+
<div class="field">
|
216 |
+
<label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
217 |
+
<div class="input-box">
|
218 |
+
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
219 |
+
</div>
|
220 |
+
</div>
|
221 |
+
<div class="field">
|
222 |
+
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
223 |
+
<div class="input-box">
|
224 |
+
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
|
225 |
+
</div>
|
226 |
+
</div>
|
227 |
+
</li>
|
228 |
+
<li>
|
229 |
+
<label for="accountpayble_email" ><?php echo $this->__('Accounts Payable Email Address') ?></label>
|
230 |
+
<div class="input-box">
|
231 |
+
<input type="text" name="accountpayble_email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Accounts Payable Email Address') ?>" class="input-text validate-email " />
|
232 |
+
</div>
|
233 |
+
</li>
|
234 |
+
<li>
|
235 |
+
<label for="storetype" ><?php echo $this->__('Store Type') ?></label>
|
236 |
+
<div class="input-box">
|
237 |
+
<select id="storetype" name="storetype" title="<?php echo $this->__('Store Type') ?>" class="select" >
|
238 |
+
<option selected="selected"value="default">Please select store type</option>
|
239 |
+
<option value="outdoor">Outdoor</option>
|
240 |
+
<option value="surf">Surf</option>
|
241 |
+
<option value="fashion">Fashion</option>
|
242 |
+
<option value="naturalfood">Natural_Food</option>
|
243 |
+
<option value="wellness">Wellness - Yoga/Pilates/Medical/Spa/Beauty</option>
|
244 |
+
<option value="hospitalityh">Hospitality - Hotels/Tourism</option>
|
245 |
+
<option value="sportinggoods">Sporting_Goods</option>
|
246 |
+
<option value="giftshop">Gift_Shop</option>
|
247 |
+
<option value="footwear">Footwear_Only</option>
|
248 |
+
</select>
|
249 |
+
|
250 |
+
</div>
|
251 |
+
</li>
|
252 |
+
<li>
|
253 |
+
<label for="website_url" ><?php echo $this->__('Website (Must have a URL)') ?></label>
|
254 |
+
<div class="input-box">
|
255 |
+
<input type="text" name="website_url" id="website_url" title="<?php echo $this->__('Website URL') ?>" class="input-text validate-clean-url" />
|
256 |
+
</div>
|
257 |
+
</li>
|
258 |
+
<li>
|
259 |
+
<label for="iswebsitelive" ><?php echo $this->__('Is Website Live?') ?></label>
|
260 |
+
<div class="input-box">
|
261 |
+
<select id="iswebsitelive" name="iswebsitelive" title="<?php echo $this->__('Is Website Live?') ?>" class="select" >
|
262 |
+
<option selected="selected"value="1">Yes</option>
|
263 |
+
<option value="0">No</option>
|
264 |
+
</select>
|
265 |
+
</div>
|
266 |
+
</li>
|
267 |
+
<li>
|
268 |
+
<label for="datefounded"><?php echo $this->__("Date Founded")." (mm/dd/yyyy)";?></label>
|
269 |
+
<div class="input-box">
|
270 |
+
<input type="text" id="datefounded" name="datefounded" class="input-text" />
|
271 |
+
</div>
|
272 |
+
<div id="dateerror"></div>
|
273 |
+
</li>
|
274 |
+
<li>
|
275 |
+
<label for="uploadimage"><?php echo $this->__('Upload Image of store') ?></label>
|
276 |
+
<input name="MAX_FILE_SIZE" type="hidden" value="2000000" />
|
277 |
+
<input name="attachment" id="attachment" type="file" />
|
278 |
+
<div id="imgerror"></div>
|
279 |
+
</li>
|
280 |
+
<li id="payment-terms">
|
281 |
+
<label for="paymentterms" ><?php echo $this->__('Payment-terms Options') ?></label>
|
282 |
+
<div class="input-box">
|
283 |
+
<select id="paymentterms" name="paymentterms" title="<?php echo $this->__('Payment-terms Options') ?>" class="select" >
|
284 |
+
<option selected="selected"value="default">Please select Payment-terms</option>
|
285 |
+
<option value="net30">Net30</option>
|
286 |
+
<option value="net15">Net15</option>
|
287 |
+
</select>
|
288 |
+
</div>
|
289 |
+
<div id ="information_msg" style="display:none;"><?php echo 'if selected net30,please include credit reference'; ?>
|
290 |
+
<input name="MAX_FILE_SIZE" type="hidden" value="2000000" />
|
291 |
+
<input name="net30reference" id="net30reference" type="file" />
|
292 |
+
</div>
|
293 |
+
</li>
|
294 |
+
<li id="brandsyoucarry">
|
295 |
+
<label for="brandsyoucarry" ><?php echo $this->__('Brands youCarry') ?></label>
|
296 |
+
<div class="input-box">
|
297 |
+
<input type="text" name="brandsyoucarry[]" id="brandsyoucarry" value="<?php echo $this->htmlEscape($this->getFormData()->getAccountNumber()) ?>"title="<?php echo $this->__('Account Number') ?>" class="input-text" />
|
298 |
+
</div>
|
299 |
+
<div class="input-box">
|
300 |
+
<input type="text" name="brandsyoucarry[]" id="brandsyoucarry" value="<?php echo $this->htmlEscape($this->getFormData()->getAccountNumber()) ?>"title="<?php echo $this->__('Account Number') ?>" class="input-text" />
|
301 |
+
</div>
|
302 |
+
<div class="input-box">
|
303 |
+
<input type="text" name="brandsyoucarry[]" id="brandsyoucarry" value="<?php echo $this->htmlEscape($this->getFormData()->getAccountNumber()) ?>"title="<?php echo $this->__('Account Number') ?>" class="input-text" />
|
304 |
+
</div>
|
305 |
+
<div class="input-box">
|
306 |
+
<input type="text" name="brandsyoucarry[]" id="brandsyoucarry" value="<?php echo $this->htmlEscape($this->getFormData()->getAccountNumber()) ?>"title="<?php echo $this->__('Account Number') ?>" class="input-text" />
|
307 |
+
</div>
|
308 |
+
</li>
|
309 |
+
<li id="ups">
|
310 |
+
<label for="ups number" ><?php echo $this->__('UPS Account number') ?></label>
|
311 |
+
<div class="input-box">
|
312 |
+
<input type="text" name="upsnumber" id="account_number" value="<?php echo $this->htmlEscape($this->getFormData()->getAccountNumber()) ?>"title="<?php echo $this->__('Account Number') ?>" class="input-text" />
|
313 |
+
</div>
|
314 |
+
</li>
|
315 |
+
<!-- <li class="control">
|
316 |
+
<input class="checkbox required-entry" id="termas" name="termas" type="checkbox" value="1" />
|
317 |
+
<label for="termas" class="required" ><?php echo $this->__('Terms and Conditions') ?></label>
|
318 |
+
</li> -->
|
319 |
+
</ul>
|
320 |
+
</div>
|
321 |
+
<?php if (Mage::getStoreConfig("fontis_recaptcha/recaptcha/customer", Mage::app()->getStore())): ?>
|
322 |
+
<?php echo $this->getChildHtml('recaptcha_box') ?>
|
323 |
+
<?php endif; ?>
|
324 |
+
|
325 |
+
<div class="buttons-set">
|
326 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
327 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
328 |
+
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
|
329 |
+
</div>
|
330 |
+
</form>
|
331 |
+
</div>
|
332 |
+
<script type="text/javascript">
|
333 |
+
jQuery.noConflict();
|
334 |
+
var _validFileExtensions = [".jpg", ".jpeg", ".bmp", ".gif", ".png"];
|
335 |
+
function Validate() {
|
336 |
+
|
337 |
+
var dt = document.frmSample.datefounded
|
338 |
+
if (dt.value != '') {
|
339 |
+
if (isDate(dt.value) == false) {
|
340 |
+
dt.focus()
|
341 |
+
return false
|
342 |
+
}
|
343 |
+
}
|
344 |
+
var fup = document.getElementById('attachment');
|
345 |
+
var fileName = fup.value;
|
346 |
+
var ext = fileName.substring(fileName.lastIndexOf('.') + 1);
|
347 |
+
if (fileName != ''){
|
348 |
+
if (ext == "png" || ext == "PNG" || ext == "JPG" || ext == "jpg" || ext == "JPEG" || ext == "jpeg" || ext == "pdf")
|
349 |
+
{
|
350 |
+
jQuery('#imgerror').removeClass('validation-advice');
|
351 |
+
document.getElementById("imgerror").innerHTML = "";
|
352 |
+
|
353 |
+
}
|
354 |
+
else
|
355 |
+
{
|
356 |
+
jQuery('#imgerror').addClass('validation-advice');
|
357 |
+
document.getElementById("imgerror").innerHTML = "Upload PNG or JPG or PDF Files only";
|
358 |
+
return false;
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
362 |
+
var paymentterms = jQuery('#paymentterms').val();
|
363 |
+
jQuery(document).ready(function () {
|
364 |
+
jQuery("#paymentterms").change(function (event) {
|
365 |
+
if (jQuery(this).val() == 'net30' || jQuery(this).val() == 'net15') {
|
366 |
+
jQuery("#information_msg").show();
|
367 |
+
} else {
|
368 |
+
jQuery("#information_msg").hide();
|
369 |
+
}
|
370 |
+
});
|
371 |
+
});
|
372 |
+
//<![CDATA[
|
373 |
+
var dataForm = new VarienForm('form-validate', true);
|
374 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
|
375 |
+
new RegionUpdater('country', 'shipping[region]', 'shipping[region_id]', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip'); </script>
|
376 |
+
|
377 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(); ?>js/jquery-ui-main.js"></script>
|
378 |
+
<script type="text/javascript">
|
379 |
+
function showMe() {
|
380 |
+
jQuery("#div_1").css("display", "block");
|
381 |
+
jQuery("#both_not_same").val(0);
|
382 |
+
}
|
383 |
+
function shippingCheck() {
|
384 |
+
jQuery("#div_1").css("display", "none");
|
385 |
+
jQuery("#both_not_same").val(1);
|
386 |
+
}
|
387 |
+
</script>
|
388 |
+
<style type="text/css">
|
389 |
+
#payment-terms, #brandsyoucarry, #ups{display: none;}
|
390 |
+
</style>
|
391 |
+
<script language = "Javascript">
|
392 |
+
|
393 |
+
var dtCh = "/";
|
394 |
+
var minYear = 1900;
|
395 |
+
var maxYear = 2100;
|
396 |
+
|
397 |
+
function isInteger(s) {
|
398 |
+
var i;
|
399 |
+
for (i = 0; i < s.length; i++) {
|
400 |
+
// Check that current character is number.
|
401 |
+
var c = s.charAt(i);
|
402 |
+
if (((c < "0") || (c > "9")))
|
403 |
+
return false;
|
404 |
+
}
|
405 |
+
// All characters are numbers.
|
406 |
+
return true;
|
407 |
+
}
|
408 |
+
|
409 |
+
function stripCharsInBag(s, bag) {
|
410 |
+
var i;
|
411 |
+
var returnString = "";
|
412 |
+
// Search through string's characters one by one.
|
413 |
+
// If character is not in bag, append to returnString.
|
414 |
+
for (i = 0; i < s.length; i++) {
|
415 |
+
var c = s.charAt(i);
|
416 |
+
if (bag.indexOf(c) == -1)
|
417 |
+
returnString += c;
|
418 |
+
}
|
419 |
+
return returnString;
|
420 |
+
}
|
421 |
+
|
422 |
+
function daysInFebruary(year) {
|
423 |
+
// February has 29 days in any year evenly divisible by four,
|
424 |
+
// EXCEPT for centurial years which are not also divisible by 400.
|
425 |
+
return (((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28);
|
426 |
+
}
|
427 |
+
function DaysArray(n) {
|
428 |
+
for (var i = 1; i <= n; i++) {
|
429 |
+
this[i] = 31
|
430 |
+
if (i == 4 || i == 6 || i == 9 || i == 11) {
|
431 |
+
this[i] = 30
|
432 |
+
}
|
433 |
+
if (i == 2) {
|
434 |
+
this[i] = 29
|
435 |
+
}
|
436 |
+
}
|
437 |
+
return this
|
438 |
+
}
|
439 |
+
|
440 |
+
function isDate(dtStr) {
|
441 |
+
var daysInMonth = DaysArray(12)
|
442 |
+
var pos1 = dtStr.indexOf(dtCh)
|
443 |
+
var pos2 = dtStr.indexOf(dtCh, pos1 + 1)
|
444 |
+
var strMonth = dtStr.substring(0, pos1)
|
445 |
+
var strDay = dtStr.substring(pos1 + 1, pos2)
|
446 |
+
var strYear = dtStr.substring(pos2 + 1)
|
447 |
+
strYr = strYear
|
448 |
+
if (strDay.charAt(0) == "0" && strDay.length > 1)
|
449 |
+
strDay = strDay.substring(1)
|
450 |
+
if (strMonth.charAt(0) == "0" && strMonth.length > 1)
|
451 |
+
strMonth = strMonth.substring(1)
|
452 |
+
for (var i = 1; i <= 3; i++) {
|
453 |
+
if (strYr.charAt(0) == "0" && strYr.length > 1)
|
454 |
+
strYr = strYr.substring(1)
|
455 |
+
}
|
456 |
+
month = parseInt(strMonth)
|
457 |
+
day = parseInt(strDay)
|
458 |
+
year = parseInt(strYr)
|
459 |
+
if (pos1 == -1 || pos2 == -1) {
|
460 |
+
jQuery('#dateerror').addClass('validation-advice');
|
461 |
+
document.getElementById("dateerror").innerHTML = "The date format should be : mm/dd/yyyy";
|
462 |
+
//alert("The date format should be : mm/dd/yyyy")
|
463 |
+
return false
|
464 |
+
}
|
465 |
+
if (strMonth.length < 1 || month < 1 || month > 12) {
|
466 |
+
jQuery('#dateerror').addClass('validation-advice');
|
467 |
+
document.getElementById("dateerror").innerHTML = "The date format should be : mm/dd/yyyy";
|
468 |
+
return false
|
469 |
+
}
|
470 |
+
if (strDay.length < 1 || day < 1 || day > 31 || (month == 2 && day > daysInFebruary(year)) || day > daysInMonth[month]) {
|
471 |
+
jQuery('#dateerror').addClass('validation-advice');
|
472 |
+
document.getElementById("dateerror").innerHTML = "The date format should be : mm/dd/yyyy";
|
473 |
+
return false
|
474 |
+
}
|
475 |
+
if (strYear.length != 4 || year == 0 || year < minYear || year > maxYear) {
|
476 |
+
jQuery('#dateerror').addClass('validation-advice');
|
477 |
+
document.getElementById("dateerror").innerHTML = "The date format should be : mm/dd/yyyy";
|
478 |
+
return false
|
479 |
+
}
|
480 |
+
if (dtStr.indexOf(dtCh, pos2 + 1) != -1 || isInteger(stripCharsInBag(dtStr, dtCh)) == false) {
|
481 |
+
jQuery('#dateerror').addClass('validation-advice');
|
482 |
+
document.getElementById("dateerror").innerHTML = "The date format should be : mm/dd/yyyy";
|
483 |
+
return false
|
484 |
+
}
|
485 |
+
jQuery('#dateerror').removeClass('validation-advice');
|
486 |
+
document.getElementById("dateerror").innerHTML = "";
|
487 |
+
return true
|
488 |
+
}
|
489 |
+
</script>
|
app/etc/modules/Exinent_CustomerActivation.xml
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Exinent_CustomerActivation>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
<depends>
|
8 |
-
<Mage_Core />
|
9 |
-
<Mage_Customer />
|
10 |
-
<Mage_Adminhtml />
|
11 |
-
</depends>
|
12 |
-
</Exinent_CustomerActivation>
|
13 |
-
</modules>
|
14 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Exinent_CustomerActivation>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Core />
|
9 |
+
<Mage_Customer />
|
10 |
+
<Mage_Adminhtml />
|
11 |
+
</depends>
|
12 |
+
</Exinent_CustomerActivation>
|
13 |
+
</modules>
|
14 |
+
</config>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Wholesale_Customer_Activation</name>
|
4 |
-
<version>9.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license>Open Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
-
<authors><author><name>Exinent</name><user>
|
13 |
-
<date>2015-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Exinent"><dir name="CustomerActivation"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Customerimages.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Wholesale_Customer_Activation</name>
|
4 |
+
<version>9.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary> Bug fixes </summary>
|
10 |
+
<description> Bug fixes </description>
|
11 |
+
<notes>Bug Fixes</notes>
|
12 |
+
<authors><author><name>Exinent</name><user>LLC</user><email>developer@exinent.com</email></author></authors>
|
13 |
+
<date>2015-09-16</date>
|
14 |
+
<time>13:34:10</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Exinent"><dir name="CustomerActivation"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Customerimages.php" hash="215eae3a1dd7de7b33cdd0ee7d56f909"/></dir></dir></dir><dir name="Rewrite"><file name="Fieldset.php" hash="603db1c915c44e1bac4b2afed4111bc8"/></dir><dir name="System"><dir name="Config"><file name="Date.php" hash="5443bc043b8efdfef40b30ae274a4456"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Boolean.php" hash="b997162f35d7d72c302587842b2f9b2b"/></dir></dir></dir></dir></dir><file name="Orderproduct.php" hash="3db14e01a40f0b4f3eed7a311b9d7759"/><dir name="Page"><dir name="Html"><file name="Topmenu.php" hash="6e661560d0a4243d456bbe12558afac4"/></dir></dir><file name="Purchaseorder.php" hash="ab01905025cf61e8c24c672514766d4a"/><file name="Purchaseorderinfo.php" hash="aaee8276d0e3a99119bd74175def9223"/><dir name="Rewrite"><file name="Fieldset.php" hash="1e59352859809173a1d87a571f27d523"/></dir><dir name="collection"><file name="toobar.php" hash="b611d4d5d561114fea01e4b729f62908"/></dir><file name="toobar.php" hash="b611d4d5d561114fea01e4b729f62908"/></dir><dir name="Helper"><file name="Data.php" hash="2d56c0e12aafb6ac1d504e884740f0ec"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Categories"><dir name="Group"><file name="Multiselect.php" hash="d0942f3403a0f9d22d732759843dddd5"/></dir></dir><dir name="Customer"><dir name="Group"><file name="Multiselect.php" hash="5e61e754a00b8ea6a9b8e914d4074980"/></dir></dir><dir name="Pages"><dir name="Group"><file name="Multiselect.php" hash="ae06083087a33b70cd17a5da4d64dcc4"/></dir></dir><dir name="Products"><dir name="Group"><file name="Multiselect.php" hash="f3066327a0ba3a90b8a3092f63cbbfda"/></dir><dir name="Price"><file name="Multiselect.php" hash="077f3d4e265689bbfec17634c76ae4c9"/></dir></dir></dir></dir></dir></dir><file name="Customer.php" hash="30bc4351e9f665951a1b56bbc9be9766"/><file name="Info.php" hash="a67fed06ce99507f36521f98dac1a0bb"/><dir name="Mysql4"><file name="Info.php" hash="8dd4e1801fc3dfd5f68c04fa183bea84"/><dir name="Subscriber"><file name="Collection.php" hash="6797261fe4384ad90a97a1832cee489f"/></dir><file name="Subscriber.php" hash="556c9595f4607378bcd73f965dca88fe"/></dir><file name="Net15.php" hash="1c054ccc9877df7bd8f5499e1778deca"/><file name="Net30.php" hash="f5373ae7b4c711441aa8b3a8369a65e2"/><file name="Observer.php" hash="030022695e4e3f7b32293ad481634d67"/><file name="Order.php" hash="ef12616357789ac90fd7e346858fe25e"/><dir name="Resource"><dir name="Attribute"><dir name="Source"><file name="Customeractivation.php" hash="86ba48768facd6dca55d9cb5890c9180"/><file name="Customerpayment.php" hash="a13742eadcbccd48702b4002ea281460"/><file name="Customershippingmethods.php" hash="b76444a74d3a8e4f128adfa5d29f3ae2"/><file name="Iswebsitelive.php" hash="bf670eb540fdf3475f852eb5acece0be"/><file name="StoreType.php" hash="9e4f5846e8c7e77057128c62a3ccbc6d"/></dir></dir><file name="Customer.php" hash="34e44d55a5fd741b146dfff071d9e59c"/></dir><file name="Subscriber.php" hash="101af35cf8b0b2e2f1246d11e6812d1c"/><file name="Thirdparty.php" hash="a9c784f61aa2fac70bb132fa2b21a56c"/><file name="Thirdpartyfed.php" hash="b53e2d472142556bf387825b17d31fca"/><file name="Thirdpartyfedex.php" hash="bff88485e03a28fbb578850848dbeba1"/><file name="Thirdpartyups.php" hash="3f16b44592fb40de598e06eb1cff652c"/></dir><dir name="controllers"><file name="AccountController.php" hash="80524b33ffefd15b623156f788edb403"/><file name="AdminController.php" hash="32227d4e51c1f616f2c61c631edfc9a4"/><file name="CategoryController.php" hash="13805e215c7f6fe4a4245626aefd5007"/><file name="IndexController.php" hash="0caf2d4b77df2f160167251ce08029df"/><file name="PageController.php" hash="c36f0633d2da58ec2ab71a860017a94e"/><file name="ProductController.php" hash="7872f60116c7e6efe56f1c1916f4bdb4"/><file name="QuickorderController.php" hash="b89350f089e53cb893b506cf65c78e08"/><file name="productOrderController.php" hash="63fda7329a51fddeb9d3e1f88ab90b57"/></dir><dir name="etc"><file name="config.xml" hash="66e069c9b567613940ec2b983d36dbc7"/><file name="system.xml" hash="d7bd5f3c74664b21a0b0d9542ffd1b9e"/></dir><dir name="sql"><dir name="customeractivation_setup"><file name="mysql4-install-0.1.0.php" hash="156dfec01fd19750a168564d90534dfb"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="58abc475f1df610d1d3addec29414b96"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="bd73d7680d12f85f7a63e8151e965bdb"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="5e4f2181e0d717b24785524deed8bf05"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="658f37fbea0a87fcce790bf8291021ae"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="2d1a257dd3e699df7acec1b72296e552"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="customerActivation.xml" hash="1318db505e31f11c934f61981768975b"/></dir><dir name="template"><dir name="customerActivation"><file name="customerActivation.phtml" hash="af3957e22037bafd28ae5ddc517e964a"/><file name="customerImages.phtml" hash="e7e772fbe282d8da0a5a16ed8a1bb93e"/><file name="fieldset.phtml" hash="7afaa32a0710c041158f3688b5efa0c2"/><dir name="info"><file name="purchaseorder.phtml" hash="2c357b777dd536fe14ddb8da27b45f33"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="customerActivation.xml" hash="bddeae5476e2d5488bf8b8a62e5d34b9"/></dir><dir name="template"><dir name="customerActivation"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="9b65b336037b7e016b83d518eef6deaa"/></dir><dir name="onepage"><dir name="payment"><file name="methods.phtml" hash="12e9b34b519aa01fc9c368a28d1ab721"/></dir><dir name="shipping_method"><file name="available.phtml" hash="c39e3193726730caf2f2be078cd398c1"/></dir></dir></dir><file name="customerActivation.phtml" hash="d7187e56c09b8fe50bb4cc7ecbacc030"/><dir name="form"><file name="purchaseorder.phtml" hash="38ee648f4646873f976b3e30c105ded8"/></dir><dir name="info"><file name="purchaseorder.phtml" hash="19d14f210cc0cf4df9de682222bf7f54"/></dir><dir name="onepage"><dir name="shipping_method"><file name="available.phtml" hash="b8ec09e8bfcd3459db1181ac8b60b863"/></dir></dir><file name="quickorderproduct.phtml" hash="17e30011ce80a7dd7b08aa1ff51ffd79"/><dir name="review"><dir name="shipping"><file name="method.phtml" hash="a51805e06ec61ff386d00dc66c838fb7"/></dir></dir><file name="wholesaleLogin.phtml" hash="0b50df1495b4ba92369c52aed9896c21"/><file name="wholesaleRegister.phtml" hash="9d5b14f022b349377081722fa0af437e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Exinent_CustomerActivation.xml" hash="7a194e8636b3e4fa1334acb707a0cb6d"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|