[freeside-users] Dynamically defining a pkgpart price in perl
Ivan Kohler
ivan at 420.am
Mon Feb 27 13:57:01 PST 2006
On Mon, Feb 27, 2006 at 03:45:52PM -0600, Lee Sharpe wrote:
> My overall goal is to make the setup and recurring fees for a package
> definition be different, depending on which agent purchased the package.
>
> To accomplish this, my plan was to insert perl code into the optionvalue
> column of the part_pkg_option table. For example (using some test code
> that would obviously always return 29.95):
>
> optionnum | pkgpart | optionname | optionvalue
>
>
> ----------+---------+---------------+-----------------------------------
> 596 | 2282 | recur_fee | if (1) { 29.95; } else { 19.95; }
>
> Is this allowed, and, if so, is this the correct way of doing this?
No and no. You could use separate package definitions for each agent,
or write a custom price plan in FS/FS/part_pkg/
--
_ivan
More information about the freeside-users
mailing list