OpenCart 3+Journal 3,从客人结账中删除电子邮件字段



我想从客人的结账页面中删除电子邮件字段,我使用主题为Journal3

OpenCart3我试着从guest.php调用它,但仍然不起作用。

您不能只删除电子邮件字段。许多系统属性在结账时连接到电子邮件,尽管使用journal3会使电子邮件的提取更加复杂。

您可以在Journal Quick Checkout:中查看可以打开/切换的字段

期刊>皮肤>结账


更新

要在日记本3快速结账中禁用仅针对客人的电子邮件:

转到/cocatalog/view/theme/journal3/template/journal3/checkout/register.titch

查找

{# customer email #}
<div class="form-group required account-email">
<label class="control-label" for="input-email">{{ entry_email }}</label>
<input v-model="order_data.email" type="text" name="email" value="" placeholder="{{ entry_email }}" id="input-email" class="form-control"/>
<span class="text-danger" v-if="error && error.email" v-html="error.email"></span>
</div>

添加检查,如密码v-if="account === 'register'"。新代码是

{# customer email #}
<div v-if="account === 'register'" class="form-group required account-email">
<label class="control-label" for="input-email">{{ entry_email }}</label>
<input v-model="order_data.email" type="text" name="email" value="" placeholder="{{ entry_email }}" id="input-email" class="form-control"/>
<span class="text-danger" v-if="error && error.email" v-html="error.email"></span>
</div>

现在转到/controller/journal3/checkout.php并找到

// email
if ((utf8_strlen(Arr::get($this->request->post, 'order_data.email')) > 96) || !filter_var(Arr::get($this->request->post, 'order_data.email'), FILTER_VALIDATE_EMAIL)) {
$error['email'] = $this->language->get('error_email');
} else if (($this->session->data['account'] === 'register') && $this->model_account_customer->getTotalCustomersByEmail(Arr::get($this->request->post, 'order_data.email'))) {
$error['email'] = $this->language->get('error_exists');
}

更换为

// email
if ($this->session->data['account'] === 'register') {
if ((utf8_strlen(Arr::get($this->request->post, 'order_data.email')) > 96) || !filter_var(Arr::get($this->request->post, 'order_data.email'), FILTER_VALIDATE_EMAIL)) {
$error['email'] = $this->language->get('error_email');
} else if (($this->session->data['account'] === 'register') && $this->model_account_customer->getTotalCustomersByEmail(Arr::get($this->request->post, 'order_data.email'))) {
$error['email'] = $this->language->get('error_exists');
}
}

除了上面提到的3个步骤之外,您还必须修复sendmail函数。这里还有两个步骤提到了一种方法:

文件:system/library/mail.php更改:

$this->to = $to;

收件人:

if ($to != '') {$this->to = $to;} else { $this->to = 'web-and-seo@itech.bg';}

更改web-and-seo@itech.bg发送到一封电子邮件,您将代替客户收到确认。

  1. 然后从结账页面的邮件字段中删除*

文件:catalog/view/theme/journal3/template/journal3/checkout/register.titch更改:

<div class="form-group required account-email">

收件人:

<div class="form-group account-email">

祝你好运。

相关内容

  • 没有找到相关文章

最新更新