kuriousagency / commerce-currency-prices
3.0.0-beta.4
2022-10-13 13:49 UTC
Requires
- craftcms/cms: ^4.0
- craftcms/commerce: ^4.0
- dev-master
- 3.0.0-beta.4
- 3.0.0-beta.3
- 3.0.0-beta.2
- 3.0.0-beta.1
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.2
- 1.0.0
- dev-craft3
- dev-feature/bundles
This package is auto-updated.
Last update: 2023-05-26 14:09:39 UTC
README
添加了在多种货币中设置产品价格的功能
要求
此插件需要 Craft CMS 3.0.0-beta.23 或更高版本。
安装
要安装此插件,请按照以下说明操作。
-
打开您的终端并转到您的 Craft 项目目录
cd /path/to/project
-
然后让 Composer 加载插件
composer require webdna/commerce-currency-prices
-
在控制面板中,转到设置 → 插件,并点击“安装”按钮以安装货币价格插件。
货币价格概述
在 Craft Commerce 设置中配置您的支付货币 - 为每种货币设置汇率为 1。
将为产品、折扣和运费规则添加额外的货币价格字段。
产品
产品现在将显示每个设置货币的价格字段。
购物车中使用的商品价格将根据选择的支付货币而变化。
要显示商品货币价格,请使用以下 Twig 过滤器之一
{{ product.defaultVariant|currencyPrice('GBP') }} {{ product.defaultVariant|currencySalePrice('GBP') }}
当前购物车支付货币可用于在 Twig 过滤器中设置货币
{{ product.defaultVariant|currencyPrice(cart.paymentCurrency) }} {{ product.defaultVariant|currencySalePrice(cart.paymentCurrency) }}
折扣
为您的每种货币添加产品折扣
运费
为您的每种支付货币设置运费条件和成本。
运费条件
运费成本
货币字段类型
添加了 'Currencies' 字段类型,提供了一个支付货币的下拉列表
由 webdna 提供