我试图通过使用自定义属性在Magento中为产品设置我自己的自定义规范链接但我无法在head.phtml文件中获取该属性.这就是我到目前为止所拥有的.请有人帮忙吗?
<?php if (Mage::registry('current_product')) : ?>
<?php $customcanonical = Mage::registry(‘current_product’)->getData(‘canonical_link’); ?>
<link rel="canonical" content="<?php echo $customcanonical ?>" />
<?php endif; ?>
Run Code Online (Sandbox Code Playgroud)
其中canonical_link是我的自定义属性