I use this Javascript to masked the telephone fields just to make sure my customer type exact number of phone number.
This is important to me hoping some help.
I use
http://digitalbush.com/projects/masked-input-plugin/
as Javascript
Here the code.
I think I made it Correct but it was not working with my codes.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Masked Tekephone</name>
<code>mask-telephone</code>
<version>1.0</version>
<author>mash0028</author>
<link>http://www.berrylensestm.com</link>
<file name="catalog/view/theme/ioc7/template/common/header.tpl">
<operation>
<search><![CDATA['catalog/view/javascript/jquery/jquery-2.1.1.min.js',]]>
</search>
<add position="after">
<![CDATA[
'http://www.berrylensestm.com/catalog/view/javascript/social_login_free/jquery.maskedinput.min.js',
]]>
</add>
</operation>
</file>
<file name="catalog/view/theme/ioc7/template/account/" name="register.tpl,edit.tpl,address_form.tpl">
<operation>
<search>
<![CDATA[<?php echo $footer; ?>]]>
</search>
<add position="before">
<![CDATA[
<script type="text/javascript"><!--
$(document).ready(function() {
$("#telephone").mask("99999999999");
})
//--></script>
]]></add>
</operation>
</file>
<file name="catalog/view/theme/ioc7/template/affiliate/" name="register.tpl,edit.tpl">
<operation>
<search>
<![CDATA[<?php echo $footer; ?>]]>
</search>
<add position="before">
<![CDATA[
<script type="text/javascript"><!--
$(document).ready(function() {
$("#telephone").mask("99999999999");
})
//--></script>
]]></add>
</operation>
</file>
<file name="catalog/view/theme/ioc7/template/checkout/" name="register.tpl,guest.tpl,guest_shipping.tpl,payment_address.tpl,shipping_address.tpl">
<operation>
<search>
<![CDATA[$('#collapse-payment-address select[name=\'country_id\']').trigger('change');]]>
</search>
<add position="before">
<![CDATA[
<script type="text/javascript"><!--
$(document).ready(function() {
$("#telephone").mask("99999999999");
})
//--></script>
]]></add>
</operation>
</file>
</modification>