1
A
回答
0
嗯,這是Magento的核心問題是:https://github.com/magento/magento2/issues/9961,但是你可以用下面的,現在的解決方案。
獲得從attributes.phtml文件:/vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtml
複製這個文件,並在你的主題貼:/應用/設計/前端/ [你的包裝]/[你的主題] /模板/目錄/產品/視圖/屬性.phtml。
搜索下面的代碼:
<tr>
<th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
通過下面的代碼替換上面代碼:
<?php
$_attribute = $_product->getResource()->getAttribute($_data['code']);
if (!$_attribute->getFrontend()->getValue($_product)) {
continue;
}
?>
<tr>
<th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
以上解決方案在Magento 2.2
相關問題
- 1. Virtuemart 1.1產品詳細信息頁面
- 2. 產品詳細信息頁面未顯示在magento
- 3. 更改magento中的產品詳細信息頁面?
- 4. Magento的產品詳細信息頁面顯示404錯誤
- 5. 產品詳細信息頁面上的Magento模塊
- 6. Magento sql查詢產品詳細信息
- 7. 在產品詳細信息頁面中添加自定義Metabox(Woo-commerce產品詳細信息頁面)
- 8. 從Magento產品詳細信息頁面中刪除「價格」
- 9. magento每個產品詳細信息頁面顯示404
- 10. Virtuemart 2產品詳細信息PDF
- 11. Magento 2追加到意願清單返回到產品詳細信息頁面
- 12. 詳細信息頁面上可配置產品的錯誤?
- 13. 如何在magento 2的產品詳細信息頁面中使用產品ID獲取類別集合?
- 14. 如何編輯產品的詳細信息頁面的html在Magento adminhtml
- 15. Magento的2亮度產品的詳細頁面調整
- 16. NSIS在顯示詳細信息後隱藏詳細信息
- 17. Magento:在自定義尺寸的產品詳細信息頁面上添加textboxx
- 18. Magento在onclick鏈接的產品詳細信息頁面打開描述標籤
- 19. 我怎樣才能顯示他們的屬性在產品詳細信息頁面在magento
- 20. 產品詳細信息頁上的Woocommerce產品變體
- 21. Virtuemart產品詳細信息頁面與主頁相同
- 22. Magento:在產品詳細信息頁面添加Pinterest「Pin it」按鈕
- 23. Magento產品詳細信息頁面未在搜索結果後加載
- 24. Magento在詳細信息頁面上顯示多個產品圖像
- 25. 如何在Magento Go CMS頁面中獲取產品詳細信息?
- 26. Magento的圍棋 - jQuery的僅適用於產品的詳細信息頁面
- 27. 在頁面中顯示產品詳細信息
- 28. 隱藏藉助沃爾瑪頁的詳細信息最新產品模塊
- 29. Magento針對不同產品類型的不同詳細信息頁面
- 30. 如何從Magento的產品詳細信息頁面中刪除數量框?
同樣的問題,可以正常使用:https://開頭計算器。 COM /問題/ 44665119 /如何去除的空的屬性-NA-在-Magento的-2 – Alex