Can PayVeX be Customized?

It sure can! everything is open, it was written using something called MVC which stands for "Model View Controller" this approach makes it easy to adjust the web interface (everything is template driven) as well as the actual program logic (everything is divided into distinct areas, program logic does not depend on the HTML appearance and controller logic does not interfere with database logic)

If you sell digital goods on your own site, you'll probably want to customize payvex to work with your sites layout. There are a few ways to do this.

Most people will probably just want to change the CSS or the headers and footers, and thats easy to do.

CSS Layout

PayVeX has two sides, an administrative control panel that you interact with and a user area, that your customers interact with.

I'll assume you want to customize the user area, you can easily do this by simply editing the stylesheet style.css. This is by far the easiest way to change the colors, fonts and so-forth.

HTML Layout

All the HTML is controlled via templates, so you can easily change the template to adjust the layout. The user interface isn't very complex, so it's easy to tweak.

Tracking Your Changes

We provide both a stock-lib and a local-lib, this is optional, but highly useful (and recommended!)

Copy a template from stock-lib into local-lib and modify it, you'll then have a record of all the modifications you have done. If you need to revert back to the default, you can just remove your modified file (or rename it) and the original will appear. (By the way, this also works for program logic)

Headers and Footers

Two templates called "head.php" and "foot.php" are used to control the headers and footers. If your website has a standard header, you can just include it in the "head.php" template.

/* head.php - With your own company logo */
<?php include('your/company/header.html'); ?>

Of course, you can also just insert the HTML of your companies headers and footers directly into this template.

Figuring out what template/view/action controls what

PayVeX makes this easy, too. It has an option called Verbose Debug which can be turned on, this produces some text in the footer of each screen describing not only the template to use, but also which view ID it is and which method within the controller was used to produce this screen. In your control panel, select:

Configuration -> Main -> Verbose Debug -> "Yes, produce view ID's"

After you do this, a bit of text will appear in the footers, if you modified your foot.php template (and you copied it to local-lib!) all you should have to do is temporarily rename it for this information to appear.

Changing the error messages & other text

Most people won't need to do this, as the defaults should be acceptable, however, it's here should you ever need the functionality.

It would be tedious to have to edit multiple message-whatever.php templates, one for each message... therefore, PayVeX uses a view configuration file (concepts borrowed from the apache "Struts" package) this is an XML file located in PayVeX/Util/user.xml, you can change the text here (for example, translate it to another language) and simply run setup.php again for your new changes to take effect.

If you desire, this file can also tell payvex to use completely different template files for specific screens. (handy if you need a specialized error message in one area)

Adjusting Program Logic

PayVeX is not encrypted with ioncube or any other source code mangler, you're free to adjust it in any way you desire, moreover, it was specifically designed in such a way as to make it fairly painless to modify in subtle ways.

One of the things "Verbose Debug" does is, display the controller, method AND view used to produce a given screen. You can use this information to determine how a given screen was "built". Once you know this, it's usually a simple matter of looking for the do_ method and tracing it from there. Simple modifications are fairly painless using this system, once you understand one part of it, you'll be able to understand how everything else works, it's really quite simple.