Php 在list.phtml页面中将自定义属性添加为下拉列表

Php 在list.phtml页面中将自定义属性添加为下拉列表,php,iphone,magento,attributes,Php,Iphone,Magento,Attributes,我正在使用第三方magento扩展(IPhone主题)。所以这个主题并没有在我的IPhone中显示我的自定义属性,例如“年份、品牌…”。但这些属性在桌面上的下拉列表中显示良好,因此您可以进行筛选。 这个插件主题有一个文件“list.phtml”,我想在下拉列表中添加我的自定义属性,这样用户就可以在他们的IPhone主题中过滤出结果。 我试图把这个代码,但它只是显示一个空的选择框。请帮忙 $_productCollection=$this->getLoadedProductCollecti

我正在使用第三方magento扩展(IPhone主题)。所以这个主题并没有在我的IPhone中显示我的自定义属性,例如“年份、品牌…”。但这些属性在桌面上的下拉列表中显示良好,因此您可以进行筛选。 这个插件主题有一个文件“list.phtml”,我想在下拉列表中添加我的自定义属性,这样用户就可以在他们的IPhone主题中过滤出结果。 我试图把这个代码,但它只是显示一个空的选择框。请帮忙

 $_productCollection=$this->getLoadedProductCollection();
 $_helper = $this->helper('catalog/output');

<select id='filter' onchange="ajaxfunction()">
<?php foreach($_productCollection as $product): ?>
<option value="<?php $product->getAttributeText('years') ?>"><?php     $product->getAttributeText('years') ?></option>
<?php endforeach; ?>
</select>
$\u productCollection=$this->getLoadedProductCollection();
$\u helper=$this->helper('catalog/output');

echo$product->getAttributeText('years')面向对象。。我怎么会错过呢。。如何把链接放在上面你会以同样的方式回显url
so让我们假设实际链接应该是www.test.com/page.phtml?years=125。那么我该如何添加属性类型和属性ID。$url为我提供了路径,但我需要添加具有属性类型和ID的querystring