Sun 03 Dec 2006
5:00PM
compton
Making Joomla Modules
There are two essential files: one the XML descriptor, and two the PHP code. Both filenames begin mod_, then are followed by the name of the module, and the appropriate file extension of course.
So, to make a new featured items module (or really a special offers module) is fairly straightforward. The problem is how to mark products for display in this module. It would require some new field in the database, say an extra column in the #__{vm}_product table. A way to mark products, which sets this column, is then required in the admin panel.
The current featured items module appears to use the product_special column of this table. So we need to add a second checkbox for setting the new column.
The admin page where this checkbox is to be added is defined by the page=product.product_form parameter. The tabs on this page must be controlled by JS as the querystring is not changed when the active tab is changed.
Let's find where the content for the product admin page is created. The main index2.php page gets its content from the index.php page of the current template. However, the template simply defines the wrapper for the page content. The content itself is loaded into the output buffer, with line 62 of index2.php. The buffer contains the content of the file $mainframe->getPath( 'admin' ), if it exists. If we echo this variable, we can find the page which creates the content for any of the admin sections.
Thus, it seems VirtueMart admin content is generated by /administrator/components/com_virtuemart/admin.virtuemart.php.
compton
11:58 am, Monday, 4 December 06
|
compton
12:08 pm, Monday, 4 December 06
|
compton
11:02 am, Tuesday, 5 December 06
|
compton
10:20 am, Thursday, 7 December 06
|
compton
11:12 am, Saturday, 24 March 07
|
|
/xkcd/ Archive Request