目录定价规则中的 Magento 1.8.0.0 中是否存在错误。我正在尝试以适当的价格获取数据馈送,但 1.8.0.0 什么也没吐出,而 1.8.1.0 给了我我想要的东西。
$store_id = 1; // Use the default store
$discounted_price = Mage::getResourceModel('catalogrule/rule')->getRulePrice(
Mage::app()->getLocale()->storeTimeStamp($store_id),
Mage::app()->getStore($store_id)->getWebsiteId(),
Mage::getSingleton('customer/session')->getCustomerGroupId(),
$_product->getId());
// if the product isn't discounted then default back to the original price
echo $discounted_price;`
不幸的是,我的开发服务器在 1.8.1.0 上,而我的实时站点正在运行 1.8.0.0,任何人都可以提出修复建议。我应该添加前端价格和促销价格都正确显示,所以数据就在某个地方,现在不知道从哪里检索它。