简体   繁体   English

VirtueMart浏览页面显示子类别和父产品-如何更改订单?

[英]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.

相关问题 具有子类别产品的Virtuemart(J!1.5)类别浏览页面 - Virtuemart (J!1.5) category browse page with sub-category products 如何按订单分类joomla VirtueMart组件产品? - How to sort joomla VirtueMart component products by order? 在商店页面上显示产品子类别(非父类别)和产品 - Display product subcategories (not parent categories) and products on shop page Virtuemart 2 / Joomla 2.5.4浏览页面上的Virtuemart添加到购物车按钮 - Virtuemart Add To Cart button on browse page for Virtuemart 2/Joomla 2.5.4 如何在德意志商品详细信息和相关产品中的同一页面上分开视图 - how to separate views on the same page in virtuemart productdetails and related products 如何在Virtuemart中获取所有类别和子类别的名称 - How to get all categories and subcategories name in Virtuemart 如何将“按类别过滤”下拉列表添加到Virtuemart shop.browse页面? - How can I add “Filter by Category” dropdown to a Virtuemart shop.browse page? 如何使页面使用php,ajax,jquery和下拉菜单以正确的顺序显示产品 - How to make a page shows products in the right order using php, ajax, jquery and a dropdown menu 如何只显示在WordPress的父类别页面中的子类别? - how to show only subcategories in parent category page in wordpress? 对于所有子类别,magento都会显示其父类别的描述 - for all subcategories magento shows the description of their parent category
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM