magento - 如何将 magento 1.9 代码迁移到 magento 2.3
问题描述
我在 magento 1,9 checkout 上创建了一个时事通讯复选框,它工作正常。有代码:
app/design/frontend/default 主题/default/template/persistent/ Checkout/onepage/billing.phtml
Newsletter : <input type="checkbox" name="billing[is_subscribed]" title="" value="1" id="billing:is_subscribed" class="checkbox" checked="checked" />
最后:app/code/core/(le nom de ton Magento)/Checkout/controllers/Onepagecontroller.php
if (isset($data['is_subscribed'])) {
$status = Mage::getModel('newsletter/subscriber')->subscribe($data['email']);
}
它在 magento 1.9 中像魅力一样工作,但我不知道如何在 Magento 2.3 中使用它的结构不同:/
有人可以帮助我吗?此致
解决方案
推荐阅读
- scala - 错误:(63, 3) 类型不匹配;找到:所需单位:双
- android - RxJava 登录并获取用户信息
- powershell - Get-Printer:找不到与参数名称“Like”匹配的参数
- javascript - 如何删除模态框内的 tbody 数据
- vb.net - 在 VB.NET 中禁用 CheckListBox 中的项目?
- docker - 无法始终将数据从主机发送到 docker 容器
- c - 创建树时出现分段错误 (C)
- react-native - 如何处理 codepush 和 Google playstore / Apple appstore 之间的潜在竞争条件
- python - 根据多列的总和顺序复制行
- php - 使用 ReactJS 作为前端的 Drupal 8(服务器端渲染)