系统允许多次添加单个地址。
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.
任何好友都可以帮我解决这个问题..用户应该只在保存按钮上点击一次..
答案 0 :(得分:2)
这可能有助于将来对其他人,用户填写表格中的有效价值,只有他/她能够点击提交按钮。
<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>
答案 1 :(得分:0)
如果您已对其进行了自定义,请尝试检查该页面上是否有多个表单。