Freeside:1.7:Documentation:Developer:Price Plans

From Freeside
Revision as of 20:59, 12 August 2007 by LivVsx (talk | contribs)

Jump to: navigation, search

tariffa rca squadra calcio these words tu vuo everbody s gotta learn sometime div x lettori happy xmas war is over sigla telefilm buffy live sex pictures offerte lavoro bari fotocamere digitali kodak cx 7525 miwa oshiro pendrive lettori er lebt nog sat keys viacces www ferrari sole mio john candy ospedali a gap francia becco cerca giochi violenti kiera sky sexstar lampade da terra ufficio luna di togni ventola vcool banda larga lg 42px4rv usher ft ludacris yeah g400 konica minolta socket 370 film daredevil mezzanino lancia lybra 2 4 jtd victoria silvstedt mg yamaha dsp z9 calde notti destate diffusore scaffale benevento incontri color spreading v1.10 gocci di memoria canzoni di paso adelante eddie guerrero images erano nove celibi glay hockey ta tavolo metal building sara sony p42m1 nuova alfa romeo benzina auto nuove c336 usb driver lg dr 4800 maxtor diamondmax plus 9 80 gb tutti computer principe di piemonte hd esterno usb 2 0 250gb laghetto shpat kasapi axhami the sims fuori tutti xbox trans domina philips 109b50 19 singole veneto fox parker 1975 srl quin file midi immagini doi daasa twisted metal black tele per pittura sigla memole audio 7 1 aspirapolvere batterie ricaricabili lighting brek latex lingerie frigoriferi incasso combinato hub 5 porte ethernet mare dei tropici black eyed pears hitachi 400 gb hard disk e floppy tommy vee testo vacanze alternative telefilm paso adelante ascolta tutti i miei sbagli subsonica rammstein america mp3 parafrasi del ii canto del purgatorio xbox controller s the best of john belushi ricevitori audio-video copertina ascolta pooh dragstar 650 el mordisco sara pino daniele warburg, otto aquolina profumo francesco e chiara link erotic mobil turi srl viaggio columbus uol com sangue chiama chitarr daquino sonia pisello grosso terratec 5 1 lettore dvd dvx sintonizzatore portatile jej czarne oczy iwan i delfin atlante di anatomia umana libri ni una lagrima mas giochi nudi somewhere over the rainbow h arlen hd portatile toshiba divx portatili motorola v3 auricolare dj senol dj team peugeot 206 1.4 xt www alalba it filecabi elenco abbonati nome anna canon 1120 ravegnini mario bross 4 delitti in forma di stella summer go irradio combi auto noleggio lucca star blazers. serie 2. vol. 05 traina guado al tasso maggiolo masterizzatore double layer conaju callao www ic 3 cert it psp rechargeable handle pad nokia 6600 programmi istallare video de michael vieth scarpe gabbana toyota land cruiser sol elitos canciones de simpleplan tubi e tubazioni in metalli non ferrosi smak doun wallsend jimny disel www skynet com audigy nx usb dir en grey pesci lecce vedere il mondo tramite il satellite di googlee san giovanni bianco nortek lettore di mp3 1gb parmalat gioco del memory ivana spagna e penso a te gipsy king immagini endeavour (trasporti) liquid sanguinanti zucchero arriva la bomba nuova software house europea al debutto www postales com italiua hotel del sesso www b a l it dediche na raz dmc fz1 panasonic luigi revenger tps france epson stylus photo stampanti miami vice vol 1 www office blue it incontri chat donna sposate frases obi bermudez picasso elegance elo live at wembley dvd nokia gsm costeau indiana line comune di floridia camera pantelleria donne porche gratis custodia subacquea ixus snaidero tracce prima prova esame di stato 2004 non sono come fly with me frank sinatra ericsson con fotocamera www marinemax com koshu grante fratello file attivazioni v7 barbecue foppapedretti img tool roma-san pietroburgo traballa telefonino resistente timbri piacenza rosanna conti == Pricing Plans == Adding Pricing Plans is pretty easy, but has the potential to cause a lot of pain for other users. PLEASE use your new pricing plan in production on YOUR installation for a period of time before contributing back.

The part_pkg class links the packages to the database. The plan field indicates which pricing plan to use. The pricing plans are are found in FS/FS/part_pkg/. You will find such favorites as "flat" and "prorate" as well as new hits like "voip". You are welcome (and encouraged) to add your own plans and share them with the rest of us. Here's how to do it (I'm assuming that you have access to the code so that you can follow along):

  1. Find a package that is close to what you want to do. For example, if you wanted to add a plan that would give you until the end of the month for free and then charge you every month therafter, you would probably want to start with the prorate package because it's pretty similar.
  2. Make a copy of the old package under a new name. In this example you may want to call it free_rest_of_month.pm
  3. Change the following:
    •  %info hash - This is the description and fields for this package. The data here will be loaded upon instantiation and will be available for you to use in calculating the charge for this package. You should set the fieldorder and any defaults as appropriate.
    • calc_setup - This sub returns the amount to be added to the invoice line item if the setup date is null. you can do some magic here, but be VERY careful. The flat_delayed module does some of this magic. You won't have to add this one for our example.
    • calc_recur - This sub returns the amount to be added to the invoice line item. For examples of interesting recurs check out the voip packages. The most boring package, flat, just returns the value of recur from the package definition. We want to return the recur from the package definition if the last_bill and setup are set. We also want to be sure to do the $$sdate magic so that the next bill date is set correctly. We don't return anything if this is the first bill.
    • calc_remain - If you are accruing revenue, then you will defer revenue for accounts that prepay. This allows you to give them credit for the service that they've paid for when they cancel. This method calculates it for you. Be careful here because this is essentially giving back money.
    • is_free_options -
    • is_prepaid - If you're building a prepaid plan, this has to be 1

Once you've updated these methods, go ahead and create an account and take it for a spin. Remember, if you're changing an existing plan, then PLEASE run it in your production environment before contributing back. Good Luck!

Services

Exports