我已经成功地将其他打开的图形标签添加到我们的Magento头部,但没有运气显示价格。
如果我添加以下代码,则分页:
meta property="og:price:amount" content="currency($finalPrice, true, false);"?>/
价格也需要去掉货币符号。
页面的例子:http://www.discountdisplays.co.uk/html/contemporary-bar-stool.html
任何帮助都将非常感激。
解决方案我用下面的代码得到了正确的价格:
<meta property="og:price:amount" content="<?php echo Mage::registry('product')->getFinalPrice(); ?>" />
Try
Mage::registry('current_product')->getFinalPrice(); ?>
代替
Mage::registry('product')->getFinalPrice(); ?>
获取当前产品
使用下面的一次
$_coreHelper = Mage:;helper('core');
$finalPrice= $_coreHelper->currency(Mage::registry('current_product')
->getFinalPrice(),false,true);
此代码将为您提供产品数量