magento - 隐藏 magento 默认可配置选项并创建自己的
问题描述
我想在产品页面上隐藏默认的 magento 1.9 可配置选项选择并创建我自己的产品选择,如尺寸、颜色等。我如何在 magenot 1.9 中做到这一点
解决方案
您可以将可配置选项的默认模板替换为以下内容/app/design/frontend/[your]/[theme]/layout/local.xml
:
<PRODUCT_TYPE_configurable>
<reference name="product.info.options.configurable">
<action method="setTemplate"><template>path/to/your/template.phtml</template></action>
<reference>
</PRODUCT_TYPE_configurable>
我建议从一份副本开始以/app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml
供参考,这样您就可以看到提取相关数据的代码。
否则,您可以自定义您的代码,app/design/frontend/[your]/[theme]/template/path/to/your/file.phtml
直到您心满意足!
推荐阅读
- cmake - 如何在 Windows 中使用 cmake 构建和链接谷歌基准测试
- d3.js - 我可以在 d3.js 轴中定义最大刻度数吗?
- python - 在 Python 中手动输入中位数作为 K-means 的质心
- django - 如何在 Django 模型中返回数组字段?
- javascript - 在嵌入 HTML 的 Shiny 应用程序中包含 AmChart
- javascript - 如何将状态元素推送到状态数组?
- jquery - 如何在 laravel ajax 中更改针对 id 的状态?
- android - Gradle 构建失败 ....Failed to create component for 'dialog' 原因:java.awt.HeadlessException
- sql - Case When 语句的意外结果
- javascript - 如何在 setInterval(function(){...}) 中传递服务器发送事件对象