更改 Magento 中的产品选项布局
如何更改产品选项框的布局?我创建了一个带有颜色选项的可配置产品。
我注意到 Magento 演示商店没有一致地显示产品选项。
我的选项框出现在整个列中,只有 1 个字符的选择。
我希望至少像这个产品一样显示选项: http://demo .magentocommerce.com/zolof-the-rock-and-roll-destroyer-lol-cat-t-shirt-1.html
如果您能提供任何帮助,我们将不胜感激。
谢谢。
How do you change the layout of the product options box? I have created a Configurable product with color options.
I notice that Magento demo store doesn’t display the product options consistently.
My options box appears spanning the entire column for what is just a 1 character choice.
I would like the options to display at the very least like this product:
http://demo.magentocommerce.com/zolof-the-rock-and-roll-destroyer-lol-cat-t-shirt-1.html
Any help you can provide would be much appreciated.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@Joseph 的答案将有助于装饰造型,但如果您需要编辑标记,那么您将需要以下中的模板文件
app\design\frontend\base\default\template\bundle\catalog\product\view\type\bundle\option\
并根据您的配置,编辑checkbox.phtml
、radio.phtml
、select.phtml
等。不要忘记将文件复制到本地主题路径中以进行升级安全编辑。
干杯,
乔纳森
@Joseph's answer will help with cosmetic styling, but if you need to edit the markup, then you'll need the template files in
app\design\frontend\base\default\template\bundle\catalog\product\view\type\bundle\option\
and depending on your configuration, editcheckbox.phtml
,radio.phtml
,select.phtml
, etc.Don't forget to copy the files into your local theme path for upgrade-safe edits.
Cheers,
Jonathan
听起来您在使用 CSS 选项时遇到了问题。如果是这种情况,请尝试更改为以下样式规则:
这将使选择框仅占用最小的必要空间来显示其选项。请注意,之前的规则 (
width:99%
) 是为了保持视觉一致性,因此您的选项可能看起来参差不齐。希望有帮助!
谢谢,
乔
It sounds like you're having trouble w/ the CSS for the options. If that's the case, try changing to the following style rule:
That will make select boxes take only the minimum necessary space to display their options. Be aware that the previous rule (
width:99%
) is there for visual consistency so your options may look ragged this way.Hope that helps!
Thanks,
Joe