VirtueMart - 1.1 Developer's Guide

Page of 44
Finding the right File
16
3.2. Finding the right File
When you want to modify a part of your Shop (that can't be changed in its layout using the Joomla
template's CSS), you must of course know, which file you have to modify, to create the layout you
want.
To quickly find the file, which produces the HTML output you're seeing, you can enable the DEBUG
mode
 ("Admin" # "Configuration" # "Path & URL" # check "DEBUG?" and save.
After having done that, you will see blue info icons all over the Shop, which show the file name of
the included file on mouseover.
The most changed files are
.../html/shop.browse
 (the product listing / category overview)
.../html/shop.product_details.php
 (the product detail page / view)
.../html/shop.index.php
  (the  default  Shop  Homepage  (when  the  parameter 
page
  is
omitted))
3.3. Modifying Templates
3.3.1. Flypage Templates
Flypage  (or  product  details)  templates  can  be  found  in 
/themes/VM_THEME/templates/
product_details/
.
They are loaded and filled with content in the file 
/html/shop.product_details.php
.
3.3.2. Browse Templates
Browse templates define the display of a single product in the product listing. So you can only modify
the contents of the boxes, which are filled with product information in the product listing of a category.
The number of those "boxes" - which are displayed in a single row of the product listing - can be
changed in the Category Form of that category (see Number of Products per row) or globally in the
Shop Configuration (for the case that no category_id is passed to the Shop).
Browse  (or  product  listing)  templates  can  be  found  in 
/themes/VM_THEME/templates/
browse/
.
They are loaded and filled with content in the file 
/html/shop.browse.php
.
3.3.3. Order Confirmation Email Templates
Order Confirmaton Email Templates define the layout of the confirmation email that is sent out to a
user after having placed an order.
These  Email  templates  can  be  found  in 
/html/themes/VM_THEME/templates/
order_emails/
.
They are loaded and filled with content in the file 
/classes/ps_checkout.php
function
email_receipt()
.
The concept is to define placeholders in the template and replaced them by the real contents on load.
This is done using the PHP function 
str_replace
.