系统允许在 magento 中多次添加单个地址
System allow to add single address multiple times in magento
系统允许多次添加一个地址。
Step -
→ Login with valid user credential in magento frontend.
→ Tap on “Address book” from My Account.
→ Then click on “Add new address”.
→ Enter valid information in field and tap on “save” button more then one time.
=> System save same address multiple times.
哪位朋友能帮我解决这个问题..用户应该只点击一次保存按钮..
如果你已经自定义了,请尝试检查该页面上是否有多个表单。
这可能对以后的其他人有所帮助,用户在表单中填写有效值,并且只有一次 he/she 才能点击提交按钮。
<script type="text/javascript">
var dataForm = new VarienForm('my-form-id', true);
var formAlreadySubmitted = false;
$j('#my-form-id').submit(function(e){
if(dataForm.validator.validate()){
if(formAlreadySubmitted){
e.preventDefault();
return false;
}
var submitChildren = $j(this).find('button[type=submit]');
submitChildren.attr('disabled', 'disabled');
submitChildren.addClass('disabled');
formAlreadySubmitted = true;
}
});
//]]>
</script>
系统允许多次添加一个地址。
Step -
→ Login with valid user credential in magento frontend.
→ Tap on “Address book” from My Account.
→ Then click on “Add new address”.
→ Enter valid information in field and tap on “save” button more then one time.
=> System save same address multiple times.
哪位朋友能帮我解决这个问题..用户应该只点击一次保存按钮..
如果你已经自定义了,请尝试检查该页面上是否有多个表单。
这可能对以后的其他人有所帮助,用户在表单中填写有效值,并且只有一次 he/she 才能点击提交按钮。
<script type="text/javascript">
var dataForm = new VarienForm('my-form-id', true);
var formAlreadySubmitted = false;
$j('#my-form-id').submit(function(e){
if(dataForm.validator.validate()){
if(formAlreadySubmitted){
e.preventDefault();
return false;
}
var submitChildren = $j(this).find('button[type=submit]');
submitChildren.attr('disabled', 'disabled');
submitChildren.addClass('disabled');
formAlreadySubmitted = true;
}
});
//]]>
</script>