gpt4 book ai didi

php - OpenCart 3 + Journal 3,从访客结账中删除电子邮件字段?

转载 作者:行者123 更新时间:2023-12-04 09:20:34 25 4
gpt4 key购买 nike

我想从访客的结帐页面中删除电子邮件字段,我使用 打开购物车 3 与主题 期刊 3 .那我能做什么?
我试过从 呼唤它 guest .php 但还是不行。

最佳答案

您不能只删除电子邮件字段。许多系统属性在结账时连接到电子邮件,尽管使用 journal3 会使电子邮件的提取更加复杂。
您可以在 Journal Quick Checkout 中查看可以打开/切换的字段:
日志 > 皮肤 > 结帐

更新
要在 Journal 3 Quick Checkout 中仅对访客禁用电子邮件:
转到/catalog/view/theme/journal3/template/journal3/checkout/register.twig

{# 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>
现在去/catalog/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');
}
}

关于php - OpenCart 3 + Journal 3,从访客结账中删除电子邮件字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63107087/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com