2
Q
顏色色板
A
回答
1
要對產品顏色swtach比較,您需要創建自定義模塊頁: - 創建名稱爲catalog_product_compare_index.xml佈局文件,並添加以下代碼在創建的文件中。
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Magento_Swatches::css/swatches.css"/>
</head>
<body>
<referenceContainer name="content">
<referenceBlock name="catalog.compare.list">
<action method="setTemplate">
<argument name="template" xsi:type="string">W3solver_Compareswatch::product/compare/list.phtml</argument>
</action>
<block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers" as="details.renderers">
<block class="Magento\Swatches\Block\Product\Renderer\Listing\Configurable" as="configurable" template="Magento_Swatches::product/listing/renderer.phtml" />
</block>
</referenceBlock>
</referenceContainer>
</body>
</page>
您需要在您的被覆蓋的list.phtml添加一個功能上線63
<?php
if($_item->getTypeId() == "configurable"):
echo $block->getProductDetailsHtml($_item);
endif;
?>
這將顯示在頁面比較色塊。
相關問題
- 1. 創建顏色調色板從基色
- 2. 顏色選擇器(調色板)顯示所有顏色
- 3. 查找顏色接近colorBrewer調色板的顏色名稱
- 4. Seaborn圖表顏色與調色板指定的顏色不同
- 5. 使用調色板中的所有顏色色板
- 6. 在r中調整顏色調色板
- 7. Magento產品配置和顏色色板
- 8. 獲取一些顏色的調色板
- 9. Seaborn調色板 - 防止顏色回收
- 10. Magento可配置顏色色板產品
- 11. 改變顏色的調色板中ggplot
- 12. Overplotting不同顏色的調色板GGPLOT2
- 13. 如何移除調色板顏色heatmap
- 14. 搜索顏色,有調色板
- 15. 餅圖中的調色板顏色
- 16. dc.js顏色餅圖顏色與顏色域的顏色
- 17. 獲取面板顏色
- 18. 更改面板顏色
- 19. 獲取面板的顏色
- 20. 更改面板顏色
- 21. 面板丟失顏色
- 22. 雙色顏色
- 23. WPF:重置顏色以使用模板顏色
- 24. 更改面板顏色從xcode中的主顏色
- 25. 更改面板的顏色以匹配用戶主題顏色
- 26. 更新顏色選擇器面板中的新顏色
- 27. Aptana模板顏色 - 如何更改definitiion顏色
- 28. 面板BackColor控件的顏色設置顏色
- 29. RibbonWindow Office 2007黑色主題的調色板(使用的顏色)?
- 30. 從真彩色圖像轉換爲調色板顏色