User Login
Latest Technology Articles
- A New Dimension of PCinvent Group Business Management
- Object's assignment, storage & grabage
- C# Mutliple Dimension Syntax
- Small Business System Diagram
- C# Desktop HTTP Post Method to Web
- PHP, Java & C# Documentation Compile
- C# to Open Firefox and go to a URL
- c++ 8 Queens Chessboard Placement in One Dimension
- My Old C++ Pointer Homework
- Simple C# Code to Open and Select File in WinForm
| How to extend Joomla/Virtuemart Module to have RSS List by Categories |
|
|
| Thursday, 05 June 2008 | |
|
Joomla has a great module system which allows us to have piece of script that appear in any module position that we set in the template. Here is the tutorial I wrote to guide you how to extend the module without corrupting the orignal module features......
We have a virtuemart module called "mod_product_categories.php" that allow us to show the category list with the product list linked. Bt our objective is to have the RSS feed linked instead. So you maight think that you can just change the A href in mod_product_categories.php, however, you can't find it anyway. Here is part of the original code of mod_product_categories.php:
So, you see the case option 'link' is very much similar to we we need.
$ps_product_category->get_category_tree
That means there is a ps_product_category class under /administrator/classes. So, when we open this class, we find that the function get_category_tree has this line which is the <A> tag: <a title="'.$catname.'" style="display:block;'.$style.'" class="'. $css_class .'" href="'. We look back to Virtuemart RSS page, we found that the only difference to that is the link should go to "shop.feed page" instead of "shop.browse" instead. ( with $categoryid). We could directly hard this line, but what if we need the "link" optiona as well, so why don't we enable another option in the switch above? under the switch( $menutype), we add this case:
Once we have this case added, will also need add the option in mod_product_categories.xml file, <param name="menutype" type="list" default="jscook"Anything has been done at this point, the last step is that you should go to the backend module manager, and switch the menutype option to "RSS list". If you are already have this module runing, you may just clonet his module in Backend, and change the option in the new created module without having to touch the orginal module. Comments (0)
![]() Write comment
Tags: Technology Programming How to extend Joomla/Virtuemart Module to have RSS List by Categories How to extend Joomla Module Virtuemart Virtuemart RSS Joomla module extend |
|
| Last Updated ( Thursday, 05 June 2008 ) |
| < Prev | Next > |
|---|




