[英]VirtueMart Browse page shows subcategories and parent products - how to change order?
I currently have a Joomla 1.5 site with VirtueMart installed. 我目前有一个安装了VirtueMart的Joomla 1.5站点。 The hierarchy of product categories is something like: 产品类别的层次结构类似于:
category a, with subcategory a1 and products 1,2,3 (the products belong to the category a, not subcategory a1) 类别a,具有子类别a1和产品1,2,3(产品属于类别a,而不是子类别a1)
On the 'category a' browse page I see a tile / box for subcategory a1, then products 1, 2 and 3. 在“类别a”浏览页面上,我看到一个子类别a1,然后是产品1、2和3的图块/框。
I'd like to switch these round, so that the products directly associated with 'category a' are shown first, and the tile for 'subcategory a1' is shown afterwards. 我想切换这些回合,以便首先显示与“类别a”直接相关的产品,然后显示“类别a1”的图块。
I'm sure this is just a case of switching round 2 blocks of PHP somewhere, but I can't suss where! 我敢肯定,这只是在某处切换2个PHP块的情况,但是我不能怀疑在哪里!
Anyone able to help...? 任何人都可以帮助...?
The easiest method is to edit one of the following files (depending on your configuration) in directory /components/com_virtuemart/themes/default/templates/browse/includes/
: 最简单的方法是在目录/components/com_virtuemart/themes/default/templates/browse/includes/
编辑以下文件之一(取决于您的配置):
browse_notables.php (div layout) and/or
browse_layouttable.php (table layout) and/or
browse_listtable.php (table for product list)
Find the line: 找到这行:
<?php echo $browsepage_header; ?>
and move it to the end of the file (or before recent products if you prefer). 并将其移动到文件末尾(如果需要,也可以将其移动到最新产品之前)。
Please note that $browsepage_header
contains various different content depending on how the virtuemart browse page is called, so you could have some collateral effects (the first i can think of is manufacturer description after product list). 请注意, $browsepage_header
包含各种不同的内容,具体取决于如何调用Constancemart浏览页面,因此您可能会有一些附带影响(我首先想到的是产品列表后的制造商说明)。
A better method would be to add a $browsepage_footer variable, echoed in the bottom part of each of the above files, containing the child categories list when needed. 更好的方法是添加一个$ browsepage_footer变量,该变量在上述每个文件的底部都回显,并在需要时包含子类别列表。
The category children list is created in the template file: 类别子级列表在模板文件中创建:
/components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php
and that result can be obtained editing the model file: 并可以通过编辑模型文件获得该结果:
/administrator/components/com_virtuemart/html/shop.browse.php
Similar to as it is done in this snippet: 与此代码段中的操作类似:
$browsepage_footer = $tpl->fetch( 'browse/includes/browse_orderbyformbottom.tpl.php' );
$tpl->set( 'browsepage_footer', $browsepage_footer );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.