计算magento 2中可配置产品的总价
Calculate total price of configurable product in magento 2
我正在尝试计算 magento 2 中任何可配置产品的总价,但我正在为此苦苦挣扎。
假设我有两个下拉属性如下,
1.纸张大小
Option Price
A4 1$
A3 2$
2。颜色选项
Option Price
black & white 1$
colored 2$
结果应该是这样的:
If someone selected,
paper size = A4
color option = black & white
total price = 1+1 = 2$
If someone selected,
paper size = A4
color option = colored
total price = 1+2 = 3$
lly,if,
paper size = A3
color option = colored
total price = 2+2 = 4$
但总价看起来与我预期的有些不同。并且会有更多这样的下拉属性。
我做错了什么吗?有没有更好的方法来做到这一点。
美好的一天!
您可以根据您的要求使用捆绑产品。
Steps are:
1. Create a new bundle product
2. select ship bundle item option "together"
3. click "create new option" then "add products"
4. select the products you want to add to the bundle
5. save the product
我正在尝试计算 magento 2 中任何可配置产品的总价,但我正在为此苦苦挣扎。
假设我有两个下拉属性如下,
1.纸张大小
Option Price
A4 1$
A3 2$
2。颜色选项
Option Price
black & white 1$
colored 2$
结果应该是这样的:
If someone selected,
paper size = A4
color option = black & white
total price = 1+1 = 2$
If someone selected,
paper size = A4
color option = colored
total price = 1+2 = 3$
lly,if,
paper size = A3
color option = colored
total price = 2+2 = 4$
但总价看起来与我预期的有些不同。并且会有更多这样的下拉属性。 我做错了什么吗?有没有更好的方法来做到这一点。 美好的一天!
您可以根据您的要求使用捆绑产品。
Steps are:
1. Create a new bundle product
2. select ship bundle item option "together"
3. click "create new option" then "add products"
4. select the products you want to add to the bundle
5. save the product