[freeside] adding a custom service in freeside

Raj Shekhar rshekhar at dataarmor.net
Tue Feb 8 04:44:49 PST 2005


On Tue, 2005-02-08 at 12:53, Kristian Hoffmann wrote:
> First off, that's a perl compilation error, meaning you probably have a
> syntax error in your modifications.  So it's not what you're doing that's
> giving you that error, it's how. 

Thanks for the hint.  Following your advice I went through the file
again and corrected the errors.  It was my misunderstanding of the mason
syntax that was causing the problem. 

I have added a new table to freeside (called svc_test) and added a
reference it to the in the svc_part.cgi file.  Basically what I did was
to search the file for "svc_domain" and wherever I found that, I
appended svc_test .  However, svc_test still does not show up in the
final output (html file).


Is there some place else which needs to be updated to allow freeside
know another service has been added and which table to get the details
of the service from ? 



>  Once you get that straightened out,
> check out the file 'eg/table_template-svc.pm' in the freeside source tree.
> It's a skeleton example of the perl module that's required for a service
> table, as each table in the database needs to be represented by a perl
> module.  For example, the table svc_acct is represented in the code by the
> FS::svc_acct module.

Right now I just copied the eg/table_template-svc.pm file , renamed it
to "/usr/lib/perl5/site_perl/5.8.1/FS/svc_test.pm" .  Do I need to
implement any methods in that file to make the svc_tesy service show up?

Thanks again for your help .

-- 
Raj Shekhar <rshekhar at dataarmor.net>
Data Armor




More information about the freeside-users mailing list