【发布时间】:2016-08-19 16:46:54
【问题描述】:
如何获得价格产品
使用简单的产品:$oldPrice= $_product->getPrice();
$newPrice= $_product->getSpecialPrice();
它返回正确的结果
使用可配置产品:
$oldPrice= $_product->getPrice(); //return Null
$newPrice= $_product->getSpecialPrice(); // return Null
我有 1 个可配置产品和 2 个简单产品
测试Con1
简单 1:价格 120 美元。特价:100$
simple2:价格 120 美元。特价:90 美元
我需要获得可配置回报的价格:TestCon1 价格 120 美元。特价:90 美元。
我使用$oldpriceConf= $_product->getFinalPrice(); // retunr 100$
【问题讨论】:
-
您找到解决方案了吗?
-
如何获取子产品的价格
标签: attributes magento2 configurable-product price