css - 更改产品页面上产品信息的顺序

标签 css magento layout magento-1.7 magento-1.8

我知道这可以在布局文件上使用 beforeafter 来完成,但是有人可以向我解释一下吗?比方说,我想将简短描述放在“价格”下,或者只是换个地方。或者将price放在SKU所在的位置。我希望有人解释这是如何工作的以及我如何实现这一目标。 另外,是否可以按类别进行?

我非常感谢您的帮助。非常感谢。

最佳答案

要检查的第一个 phtml 文件可能是 yourtheme/template/catalog/product/view.phtml

如果您在该文件中执行 Ctrl+查找,您将找到这些属性的位置( short_descriptionprice 等)。

例如你可以剪

<?php if ($_product->getShortDescription()):?>
                <div class="short-description">
                    <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
                </div>
            <?php endif;?>

然后粘贴到<div class="price-info">...</div>的末尾

(右键检查元素是你的 friend

我建议您还启用模板路径提示。转到 admin->system ,将当前配置范围更改为您的商店之一(靠近左上角),然后单击开发者(开发者在左下角)。然后在中间的 Debug 菜单中,将 Template Path Hints 更改为 Yes。这允许您查看哪些模板 phtml 文件服务于您前端的哪些部分。)

关于css - 更改产品页面上产品信息的顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31042099/

相关文章:

css - 如何隐藏CSS网格中的内容?

javascript - 滚动时让右div在父div中滑动

html - CSS-:focus无法在iOS上使用

php - Phalcon:css 仅在 indexAction 中工作

mysql - Magento MySQL 调整

forms - 在管理面板表单 magento 中添加一些 HTML

java - 在边框布局中添加按钮

html - 在导航栏中的链接之间均匀间隔 horz 链接和元素符号

Magento WS-I 兼容 v2 API WSDL Web 服务 SOAP-ERROR : Encoding: object has no 'sessionId' property

css - 为什么我不能右对齐显示 : block and width: X? 的元素