magento产品可变价格取决于两个参数 [英] magento product variable price depending on two parameters
本文介绍了magento产品可变价格取决于两个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想添加价格取决于两个参数的产品,例如杆长和数量
假设1米杆成本为100rs,2米成本为200 rs等等......
如果用户必须购买9米,4棒总价将为900 * 4 = 3600rs。
有没有在后端可用的选项或我必须在代码中进行一些自定义。
请帮助
i want to add product whose price depends on two parameters for e.g. length of rod and quantity
Suppose 1m rod cost 100rs , 2meter cost 200 rs and so on...
if user have to buy 9 meter ,4 rods total price will be 900*4 = 3600rs.
Is there any option avalible in backend for that or i have to do some customization in code .
please help
推荐答案
编写一个接受的PHP函数2个参数 - 杆的长度和数量,进行计算然后返回总价格。
Write a php function that takes in 2 arguments - length of rod and quantity, do the calculation and then returns the total price.
这篇关于magento产品可变价格取决于两个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文