cal*_*pit 1 magento magento-1.7
我想根据Magento中的country_of_manufacture属性打印出产品的原产国.当我执行以下操作时:
<?php echo $_product->getCountryOfManufacture(); ?>
Run Code Online (Sandbox Code Playgroud)
它只会打印国家/地区代码(例如:美国或IT),而不是完整的国家/地区名称.如何获取它以便显示完整的国家/地区名称,就像我在编辑产品时选择它一样?
试试这样:
<?php echo $_product->getAttributeText('country_of_manufacture');?>
Run Code Online (Sandbox Code Playgroud)