Bemaged_NoFax - Version 1.0.3

Version Notes

Updated maximum PHP version

Download this release

Release Info

Developer Matthijs IJsseldijk
Extension Bemaged_NoFax
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/Bemaged/NoFax/Block/Widget/Fax.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Bemaged
22
+ * @package Bemaged_NoFax
23
+ * @copyright Copyright (c) 2014 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Bemaged_NoFax_Block_Widget_Fax extends Mage_Customer_Block_Widget_Abstract
28
+ {
29
+ /**
30
+ * Initialize block
31
+ */
32
+ public function _construct()
33
+ {
34
+ parent::_construct();
35
+
36
+ // default template location
37
+ $this->setTemplate('bemaged/nofax/customer/widget/fax.phtml');
38
+ }
39
+
40
+ /**
41
+ * Can show config value
42
+ *
43
+ * @param string $key
44
+ * @return bool
45
+ */
46
+ protected function _showConfig($key)
47
+ {
48
+ return (bool)$this->getConfig($key);
49
+ }
50
+
51
+ /**
52
+ * Define if fax attribute can be shown
53
+ *
54
+ * @return bool
55
+ */
56
+ public function showFax()
57
+ {
58
+ return (bool)$this->_getAttribute('fax')->getIsVisible();
59
+ }
60
+
61
+ /**
62
+ * Define if fax attribute is required
63
+ *
64
+ * @return bool
65
+ */
66
+ public function isFaxRequired()
67
+ {
68
+ return (bool)$this->_getAttribute('fax')->getIsRequired();
69
+ }
70
+
71
+ /**
72
+ * Retrieve store attribute label
73
+ *
74
+ * @param string $attributeCode
75
+ * @return string
76
+ */
77
+ public function getStoreLabel($attributeCode)
78
+ {
79
+ $attribute = $this->_getAttribute($attributeCode);
80
+ return $attribute ? $this->__($attribute->getStoreLabel()) : '';
81
+ }
82
+
83
+ /**
84
+ * Get current customer from session
85
+ *
86
+ * @return Mage_Customer_Model_Customer
87
+ */
88
+ public function getCustomer()
89
+ {
90
+ return Mage::getSingleton('customer/session')->getCustomer();
91
+ }
92
+ }
app/code/community/Bemaged/NoFax/Helper/Data.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
14
+ * versions in the future.
15
+ *
16
+ * @category Bemaged
17
+ * @package Bemaged_NoFax
18
+ * @copyright Copyright (c) 2014 Matthijs IJsseldijk http://www.zelfeenwebwinkelstarten.nl/
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ class Bemaged_NoFax_Helper_Data extends Mage_Core_Helper_Abstract
23
+ {
24
+
25
+ }
app/code/community/Bemaged/NoFax/etc/config.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Bemaged_NoFax
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * http://opensource.org/licenses/OSL-3.0
10
+ *
11
+ * @package Bemaged_NoFax
12
+ * @copyright Copyright (c) 2014 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
13
+ * @author Matthijs IJsseldijk <info@zelfeenwebwinkelstarten.nl>
14
+ * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
15
+ */
16
+ -->
17
+ <config>
18
+ <modules>
19
+ <Bemaged_NoFax>
20
+ <version>1.0.1</version>
21
+ </Bemaged_NoFax>
22
+ </modules>
23
+ <global>
24
+ <resources>
25
+ <nofax_setup>
26
+ <setup>
27
+ <module>Bemaged_NoFax</module>
28
+ <class>Mage_Eav_Model_Entity_Setup</class>
29
+ </setup>
30
+ <connection>
31
+ <use>core_setup</use>
32
+ </connection>
33
+ </nofax_setup>
34
+ </resources>
35
+ <blocks>
36
+ <nofax>
37
+ <class>Bemaged_NoFax_Block</class>
38
+ </nofax>
39
+ </blocks>
40
+ <helpers>
41
+ <nofax>
42
+ <class>Bemaged_NoFax_Helper</class>
43
+ </nofax>
44
+ </helpers>
45
+ </global>
46
+ <frontend>
47
+ <layout>
48
+ <updates>
49
+ <bemaged_nofax>
50
+ <file>bemaged_nofax.xml</file>
51
+ </bemaged_nofax>
52
+ </updates>
53
+ </layout>
54
+ </frontend>
55
+ <adminhtml>
56
+ <translate>
57
+ <modules>
58
+ <Bemaged_NoFax>
59
+ <files>
60
+ <default>Bemaged_NoFax.csv</default>
61
+ </files>
62
+ </Bemaged_NoFax>
63
+ </modules>
64
+ </translate>
65
+ </adminhtml>
66
+ <default>
67
+ <customer>
68
+ <address>
69
+ <fax_show>1</fax_show>
70
+ </address>
71
+ </customer>
72
+ </default>
73
+ </config>
app/code/community/Bemaged/NoFax/etc/system.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Bemaged_NoFax
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * http://opensource.org/licenses/OSL-3.0
10
+ *
11
+ * @package Bemaged_NoFax
12
+ * @copyright Copyright (c) 2014 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
13
+ * @author Matthijs IJsseldijk <info@zelfeenwebwinkelstarten.nl>
14
+ * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
15
+ */
16
+ -->
17
+ <config>
18
+ <sections>
19
+ <customer>
20
+ <groups>
21
+ <address>
22
+ <fields>
23
+ <fax_show translate="label comment" module="nofax">
24
+ <label>Show Fax</label>
25
+ <frontend_type>select</frontend_type>
26
+ <source_model>adminhtml/system_config_source_yesno</source_model>
27
+ <comment>Display Fax Input Field for Billing and Shipping Address</comment>
28
+ <backend_model>adminhtml/system_config_backend_customer_show_address</backend_model>
29
+ <sort_order>200</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>0</show_in_store>
33
+ </fax_show>
34
+ </fields>
35
+ </address>
36
+ </groups>
37
+ </customer>
38
+ </sections>
39
+ </config>
app/code/community/Bemaged/NoFax/sql/nofax_setup/mysql4-install-0.0.1.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Bemaged NoFax Extension
4
+ *
5
+ * @category Extension
6
+ * @copyright Copyright (c) 2014 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
7
+ * @author Matthijs IJsseldijk
8
+ * @license
9
+ * @terms of use
10
+ * @version Release: 1.0
11
+ * @since Release available since Release 1.0
12
+ */
13
+
14
+ $installer = $this;
15
+
16
+ $installer->startSetup();
17
+
18
+ $installer->addAttribute('customer', 'fax', array(
19
+ 'type' => 'varchar',
20
+ 'input' => 'text',
21
+ 'label' => 'Fax',
22
+ 'required' => 0,
23
+ 'user_defined' => 0,
24
+ 'unique' => 0,
25
+ ));
26
+
27
+ $installer->endSetup();
app/design/frontend/base/default/layout/bemaged_nofax.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <layout version="1.0.0">
4
+
5
+ <checkout_onepage_index>
6
+
7
+ <reference name="checkout.onepage.billing">
8
+ <!-- Remove Fax from Billing Address (has to be enabled in admin) -->
9
+ <action method="setTemplate"><template>bemaged/nofax/checkout/onepage/billing.phtml</template></action>
10
+ </reference>
11
+
12
+ <reference name="checkout.onepage.shipping">
13
+ <!-- Remove Fax from Shipping Address (has to be enabled in admin) -->
14
+ <action method="setTemplate"><template>bemaged/nofax/checkout/onepage/shipping.phtml</template></action>
15
+ </reference>
16
+
17
+ </checkout_onepage_index>
18
+
19
+ </layout>
app/design/frontend/base/default/template/bemaged/nofax/checkout/onepage/billing.phtml ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="co-billing-form" action="">
28
+ <fieldset>
29
+ <ul class="form-list">
30
+ <?php if ($this->customerHasAddresses()): ?>
31
+ <li class="wide">
32
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
+ <div class="input-box">
34
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
+ </div>
36
+ </li>
37
+ <?php endif; ?>
38
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
+ <fieldset>
40
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
+ <ul>
42
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
43
+ <li class="fields">
44
+ <div class="field">
45
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
+ <div class="input-box">
47
+ <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
48
+ </div>
49
+ </div>
50
+ <?php if(!$this->isCustomerLoggedIn()): ?>
51
+ <div class="field">
52
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
+ <div class="input-box">
54
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
55
+ </div>
56
+ </div>
57
+ <?php endif; ?>
58
+ </li>
59
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
60
+ <li class="wide">
61
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
62
+ <div class="input-box">
63
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
64
+ </div>
65
+ </li>
66
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
67
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
68
+ <li class="wide">
69
+ <div class="input-box">
70
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
71
+ </div>
72
+ </li>
73
+ <?php endfor; ?>
74
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
75
+ <li class="wide">
76
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
77
+ <div class="input-box">
78
+ <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
79
+ </div>
80
+ </li>
81
+ <?php endif; ?>
82
+ <li class="fields">
83
+ <div class="field">
84
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
85
+ <div class="input-box">
86
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
87
+ </div>
88
+ </div>
89
+ <div class="field">
90
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
91
+ <div class="input-box">
92
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
93
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
94
+ </select>
95
+ <script type="text/javascript">
96
+ //<![CDATA[
97
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
98
+ //]]>
99
+ </script>
100
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
107
+ <div class="input-box">
108
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
113
+ <div class="input-box">
114
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
115
+ </div>
116
+ </div>
117
+ </li>
118
+ <li class="fields">
119
+ <div class="field">
120
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
121
+ <div class="input-box">
122
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
123
+ </div>
124
+ </div>
125
+ <?php echo $this->getLayout()->createBlock('nofax/widget_fax')->setObject($this->getAddress()->getFax() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
126
+ </li>
127
+ <?php if(!$this->isCustomerLoggedIn()): ?>
128
+
129
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
130
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
131
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
132
+ <li class="fields">
133
+ <?php if ($_dob->isEnabled()): ?>
134
+ <div class="field">
135
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
136
+ </div>
137
+ <?php endif; ?>
138
+ <?php if ($_gender->isEnabled()): ?>
139
+ <div class="field">
140
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
141
+ </div>
142
+ <?php endif ?>
143
+ </li>
144
+ <?php endif ?>
145
+
146
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
147
+ <?php if ($_taxvat->isEnabled()): ?>
148
+ <li>
149
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
150
+ </li>
151
+ <?php endif ?>
152
+
153
+ <li class="fields" id="register-customer-password">
154
+ <div class="field">
155
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
156
+ <div class="input-box">
157
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
158
+ </div>
159
+ </div>
160
+ <div class="field">
161
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
162
+ <div class="input-box">
163
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
164
+ </div>
165
+ </div>
166
+ </li>
167
+ <?php endif; ?>
168
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
169
+ <li class="control">
170
+ <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
171
+ </li>
172
+ <?php else:?>
173
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
174
+ <?php endif; ?>
175
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
176
+ </ul>
177
+ </fieldset>
178
+ </li>
179
+ <?php /* Extensions placeholder */ ?>
180
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
181
+ <?php if ($this->canShip()): ?>
182
+ <li class="control">
183
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
184
+ <li class="control">
185
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
186
+ </li>
187
+ <?php endif; ?>
188
+ </ul>
189
+ <?php if (!$this->canShip()): ?>
190
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
191
+ <?php endif; ?>
192
+ <div class="buttons-set" id="billing-buttons-container">
193
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
194
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
195
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
196
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
197
+ </span>
198
+ </div>
199
+ </fieldset>
200
+ </form>
201
+ <script type="text/javascript">
202
+ //<![CDATA[
203
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
204
+ var billingForm = new VarienForm('co-billing-form');
205
+
206
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
207
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
208
+
209
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
210
+ //]]>
211
+ </script>
app/design/frontend/base/default/template/bemaged/nofax/checkout/onepage/shipping.phtml ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form action="" id="co-shipping-form">
28
+ <ul class="form-list">
29
+ <?php if ($this->customerHasAddresses()): ?>
30
+ <li class="wide">
31
+ <label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
32
+ <div class="input-box">
33
+ <?php echo $this->getAddressesHtmlSelect('shipping') ?>
34
+ </div>
35
+ </li>
36
+ <?php endif ?>
37
+ <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
38
+ <fieldset>
39
+ <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
40
+ <ul>
41
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
42
+ <li class="fields">
43
+ <div class="fields">
44
+ <label for="shipping:company"><?php echo $this->__('Company') ?></label>
45
+ <div class="input-box">
46
+ <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
47
+ </div>
48
+ </div>
49
+ </li>
50
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
51
+ <li class="wide">
52
+ <label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
53
+ <div class="input-box">
54
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
55
+ </div>
56
+ </li>
57
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
58
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
59
+ <li class="wide">
60
+ <div class="input-box">
61
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
62
+ </div>
63
+ </li>
64
+ <?php endfor; ?>
65
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
66
+ <li class="wide">
67
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
68
+ <div class="input-box">
69
+ <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
70
+ </div>
71
+ </li>
72
+ <?php endif; ?>
73
+ <li class="fields">
74
+ <div class="field">
75
+ <label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
76
+ <div class="input-box">
77
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
78
+ </div>
79
+ </div>
80
+ <div class="field">
81
+ <label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
82
+ <div class="input-box">
83
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
84
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
85
+ </select>
86
+ <script type="text/javascript">
87
+ //<![CDATA[
88
+ $('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
89
+ //]]>
90
+ </script>
91
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
92
+ </div>
93
+ </div>
94
+ </li>
95
+ <li class="fields">
96
+ <div class="field">
97
+ <label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
98
+ <div class="input-box">
99
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
100
+ </div>
101
+ </div>
102
+ <div class="field">
103
+ <label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
104
+ <div class="input-box">
105
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
106
+ </div>
107
+ </div>
108
+ </li>
109
+ <li class="fields">
110
+ <div class="field">
111
+ <label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
112
+ <div class="input-box">
113
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
114
+ </div>
115
+ </div>
116
+ <?php echo $this->getLayout()->createBlock('nofax/widget_fax')->setObject($this->getAddress()->getFax() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?>
117
+ </li>
118
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
119
+ <li class="control">
120
+ <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
121
+ <?php else:?>
122
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
123
+ <?php endif;?>
124
+ </ul>
125
+ </fieldset>
126
+ </li>
127
+ <li class="control">
128
+ <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
129
+ </li>
130
+ </ul>
131
+ <div class="buttons-set" id="shipping-buttons-container">
132
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
133
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
134
+ <button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
135
+ <span id="shipping-please-wait" class="please-wait" style="display:none;">
136
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
137
+ </span>
138
+ </div>
139
+ </form>
140
+ <script type="text/javascript">
141
+ //<![CDATA[
142
+ var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
143
+ '<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
144
+ var shippingForm = new VarienForm('co-shipping-form');
145
+ shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
146
+ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
147
+ $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
148
+
149
+ var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
150
+ //]]>
151
+ </script>
app/design/frontend/base/default/template/bemaged/nofax/customer/widget/fax.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Matthijs IJsseldijk (http://www.zelfeenwebwinkelstarten.nl)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->showFax()): ?>
28
+ <?php $isFaxRequired = $this->isFaxRequired(); ?>
29
+ <div class="field">
30
+ <label for="<?php echo $this->getFieldId('fax')?>"<?php echo $isFaxRequired ? ' class="required"' : '' ?>><?php echo $isFaxRequired ? '<em>*</em>' : '' ?><?php echo $this->getStoreLabel('fax') ?></label>
31
+ <div class="input-box">
32
+ <input type="text" name="<?php echo $this->getFieldName('fax')?>" value="<?php echo $this->escapeHtml($this->getObject()->getFax()) ?>" title="<?php echo $this->getStoreLabel('fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="<?php echo $this->getFieldId('fax')?>" <?php echo $this->getFieldParams() ?> />
33
+ </div>
34
+ </div>
35
+ <?php endif; ?>
app/etc/modules/Bemaged_NoFax.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Bemaged_NoFax>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Bemaged_NoFax>
8
+ </modules>
9
+ </config>
app/locale/de_DE/Bemaged_NoFax.csv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ "Display Fax Input Field for Billing and Shipping Address","Das Fax-Feld f&uuml;r Rechnungs- und Versandanschrift verwenden"
2
+ "Show Fax","Fax abfragen"
app/locale/en_US/Bemaged_NoFax.csv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ "Display Fax Input Field for Billing and Shipping Address","Display Fax Input Field for Billing and Shipping Address"
2
+ "Show Fax","Show Fax"
app/locale/nl_NL/Bemaged_NoFax.csv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ "Display Fax Input Field for Billing and Shipping Address","Toon Fax Invoerveld voor Factuur- en Ontvangstadres"
2
+ "Show Fax","Fax tonen"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bemaged_NoFax</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -15,8 +15,8 @@ The extension comes with English (en_US), Dutch (nl_NL) and German (de_DE) langu
15
  <notes>Updated maximum PHP version</notes>
16
  <authors><author><name>Matthijs IJsseldijk</name><user>BeMaged</user><email>hello@bemaged.com</email></author></authors>
17
  <date>2015-04-24</date>
18
- <time>16:01:42</time>
19
- <contents><target name="mageetc"><dir name="modules"><file name="Bemaged_NoFax.xml" hash=""/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bemaged_nofax.xml" hash=""/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Bemaged_NoFax.csv" hash=""/></dir><dir name="de_DE"><file name="Bemaged_NoFax.csv" hash=""/></dir><dir name="nl_NL"><file name="Bemaged_NoFax.csv" hash=""/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bemaged_NoFax</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
15
  <notes>Updated maximum PHP version</notes>
16
  <authors><author><name>Matthijs IJsseldijk</name><user>BeMaged</user><email>hello@bemaged.com</email></author></authors>
17
  <date>2015-04-24</date>
18
+ <time>16:26:23</time>
19
+ <contents><target name="magecommunity"><dir name="Bemaged"><dir name="NoFax"><dir name="Block"><dir name="Widget"><file name="Fax.php" hash="e95b8f1e2afdf0a1b5b6e4a1e88861dd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a713f6b693b38ce3421da30411b0a5dd"/></dir><dir name="etc"><file name="config.xml" hash="2a583b26a8d5e63b5f5d07dab69edbaf"/><file name="system.xml" hash="bf742fd0f360a9effab7721ab7748ca4"/></dir><dir name="sql"><dir name="nofax_setup"><file name="mysql4-install-0.0.1.php" hash="6e08f35743fabae23d4e20d5beaf2da0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bemaged_NoFax.xml" hash="48e00a4dc8cde9771cf0e6f1390ff987"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bemaged_nofax.xml" hash="c791a6934f8e0e8df2ab305b28eff6f4"/></dir><dir name="template"><dir name="bemaged"><dir name="nofax"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="28bd40bcba25b1856d8f63009c14c1a1"/><file name="shipping.phtml" hash="e9f503dce7332d908c8809836443786d"/></dir></dir><dir name="customer"><dir name="widget"><file name="fax.phtml" hash="4fae57bb7c4a00c20eea1a4dcce5c42b"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Bemaged_NoFax.csv" hash="0100a90a34fd72642361904b28afc2d0"/></dir><dir name="de_DE"><file name="Bemaged_NoFax.csv" hash="6d6eebb19fc22eb32025be1bb345ff92"/></dir><dir name="nl_NL"><file name="Bemaged_NoFax.csv" hash="0225f52faa79de18212753526755c9e6"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>