superpayments / superpayment-hyva
为 Superpayment 提供的 Hyvä 主题兼容性模块
Requires
- hyva-themes/magento2-compat-module-fallback: *
- hyva-themes/magento2-hyva-checkout: ^1.1
- magento/framework: *
- superpayments/superpayment: *
This package is auto-updated.
Last update: 2024-09-29 03:37:43 UTC
README
本存储库包含使 Hyvä 支持超级支付的模块,https://www.hyva.io/。
先决条件
在安装 Super Payments Hyvä 插件之前,您必须安装以下内容。
-
安装 SuperPayments Magento 2 模块,https://github.com/superpayments/magento-plugin
-
安装 Hyva Checkout,https://docs.hyva.io/checkout/hyva-checkout/getting-started/index.html
-
Hyva 主题,https://docs.hyva.io/hyva-themes/getting-started/index.html(有一个默认主题)
-
Hyva 兼容性模块,https://docs.hyva.io/hyva-themes/compatibility-modules/index.html#compat-module-development-videos
生成超级支付 Hyvä 模块
-
更新超级支付 Hyvä 模块版本。
-
可以通过以下方式创建新版本: https://github.com/superpayments/magento-plugin-hyva/releases/new。
手动安装模块
-
下载并解压 ZIP 文件。
-
连接到 Magento 服务器。
-
导航到 "app/code" 目录。确保存在“SuperPayments”文件夹,并在该文件夹中创建另一个名为“SuperPaymentHyva”的文件夹。
-
转到路径 "app/code/Superpayments/SuperPaymentHyva"。将下载模块中的“src”文件夹中的所有超级支付 Hyvä 模块文件夹和文件复制到其中。
-
在终端中运行以下命令
php bin/magento hyva:config:generate
-
检查文件 "app/etc/hyva-themes.json",确保 Hyva 兼容性模块文件路径正确指定。这是生成样式所必需的。
-
生成 CSS 文件
npm --prefix vendor/hyva-themes/magento2-default-theme/web/tailwind/ run ci npm --prefix vendor/hyva-themes/magento2-default-theme/web/tailwind/ run build-prod
或从您的主题
npm --prefix app/design/frontend/<Vendor>/<Theme>/web/tailwind run ci npm --prefix app/design/frontend/<Vendor>/<Theme>/web/tailwind run build-prod
- 运行命令,然后在管理面板中配置模块。
php bin/magento setup:upgrade
缺少样式?
确保您的主题中使用 PostCSS 时使用了 postcssImportHyvaModules
插件
- 转到您的主题文件夹:
app/design/frontend/<Vendor>/<Theme>/web/tailwind
- 安装模块
npm install --save-dev @hyva-themes/hyva-modules
- 打开您的
postcss.config.js
并将其作为第一行添加
const { postcssImportHyvaModules } = require("@hyva-themes/hyva-modules");
- 确保插件包含在插件列表中
module.exports = { plugins: [ postcssImportHyvaModules, // ... ], };