Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Magento 前端的产品比较窗口中显示颜色下拉属性。我知道如何显示下拉列表的选定值,但我希望在前端显示实际的下拉列表,特别是在比较产品窗口中。我该如何实施?请指教。
您可以使用获取属性的值
Mage::getResourceModel('catalog/product') ->getAttributeRawValue ($productId, 'attribute_code', $storeId);
根据您的要求获得这些值后,您可以使用启用模板路径提示在 phtml 中进行编辑。
我试图理解一段代码,并遇到了 PHP 的 preg_replace 函数中使用的这个正则表达式。
'/(?<!-)color[^{:]*:[^{#]*$/i'
这一点……(?<!-) 没有出现在我的任何正则表达式手册中。请问有人知道这是什么意思吗?(谷歌不返回任何东西——我认为符号在谷歌中不起作用。)
(?<!-)