六年级语文公开课:How to Write a Module for osCommerce v3.0 | p...

来源:百度文库 编辑:中财网 时间:2024/05/08 07:18:18

How to Write a Module for osCommerce v3.0

First and foremost, I never condone using an alpha version of any software.  The version of osCommerce I will be talking about is in alpha stage.

This was one of the most tricky things I have come across in a long time.  There is some weird behavior going on with v3.0 as of today anyhow.  With that said I want to create a step by step guide to creating osCommerce v3.0 modules.  These steps are very important in to successfully create a module without driving yourself crazy.

First you need to create the module file in the template. Generally the files will be located in a structure something like this:

templates/{template_name}/modules/{boxes|content}

To do this simply copy an existing module file, then rename it as you see fit.  Finally, modify the file as necessary.  Pretty straightforward as you will see.

Second, create the module file in the core module folder.  This file is located in:

includes/modules/{boxes|content}

Again, duplicate an existing module file and rename as you see fit.  Finally modify the file as necessary.

There is nothing complicated about the steps so far.  As a matter of fact the only logical step is to create the language definition in the admin for the heading and you are pretty well set, but that may not be as easy as that…

Third, this is the tricky one… create your language definition in the language area in the admin!  DO NOT go seeking out an XML file to update manually.  This will not work!  What happens is when you go to view your module in the admin and to turn it on, you will not see your definition right away. It will have something similar to this… box_module_heading instead of your actual heading.  A very strange way of fixing this issue is to go back to your language definition for box_module_heading and resave it.  If that does not work go to your cache in the admin and clear that.  If that does not work I do not know what to tell you!  Maybe there is a ghost in your installation, like I thought mine had!

Usually some variation of the above will produce the desired effect and get your definitions working again.  When this happens it foo bars all your language definitions for all modules which is really strange.

In the end I believe it has something do to with the language definition script.