添加magento产品规格

时间:2014-01-31 05:57:58

标签: php magento

我需要在magento后端的产品详细信息页面中添加某些产品的规格,例如要在最后显示的规格

<h2>Specifications</h2>
<ul>
<li>Spacing: 3 to 20 feet (0,9 to 6,1 m).</li>
<li>Pressure: 15 to 70 psi (1 to 5 bar).</li>
<li>Regulates nozzle pressure to an average 30 psi (2.1 bar) with inlet pressures of up to 70 psi (4.8 bar).</li>
<li>Flow-by: 0 at 8 psi (0.6 bar) or greater; 0.1 gpm (0.02 m3/h; 0.006 l/s) otherwise.</li>

<li>Installation: bottom inlet.</li>
</ul>
<h2>Dimensions</h2>
<ul>
<li>1/2" (15/21) female threaded inlets</li>
<li>Body height: 6" (15,2 cm) body height; 4" pop-up height (10,2 cm)</li>
<li>Exposed surface diameter: 2 1/4" (5,7 cm) </li>
</ul>

2 个答案:

答案 0 :(得分:1)

您好,您将为规范

创建属性

答案 1 :(得分:1)

如果您为规范中的每个项目创建一个新属性,Magento的默认主题将在一个漂亮的表格中将其显示为附加信息。根据您的主题,您可以根据需要编辑表格。

以这种方式执行规范的好处使您可以在每个规范名称:值对上比较您的产品。

如果这些都不是一个选项,那么您可以创建一个名为specification的属性,其属性代码为spec_table,并将类型设置为文本区域,允许您输入您提供的HTML。使用此属性集,您可以检查product/view.phtml文件中的字段和输出,如下所示:

if($specTable = $_product->getResource()->getAttribute('spec_table')->getFrontend()->getValue($_product)) { echo $specTable }