On Thu, Dec 1, 2011 at 9:41 PM, oratile <[email protected]> wrote:

>
> Im interested in charging in format 0.50. need to know where i can change
> in the code inorder to allow dollars and cents?
>
>
alrite, here's a workaround to enable charging in 0.50 format. recalling
from our conversation notes a while ago there are 2 aspects that you need
to change.

1. inside the database
2. changing the script

let us begin:


   - first, let's modify the database. go to your database, more easily
   using phpmyadmin (http://localhost/phpmyadmin, or
http://localhost/pmaif you use portable senayan).
   - login to your database using root account
   - after loging in, click on your senayan database, then clik "item" table
   - look for "price" field within the table (if you can see the field
   list, clik on the "structure" tab, next to "browse" tab)
   - edit the field, look for type. change it from INT to DECIMAL
   - edit the length/values from 11 to 10,2
   - then click save

after a little touch on the database, we go to editing the sricpt:

   - we need to edit a script called "item.php", positioned in
   admin/modules/bibliography
   - open it and go to line 91 (or 85) where you'll find something like this

        $data['price'] = preg_replace('@[.,\-a-z ]@i', '',
> strip_tags($_POST['price']));


   - within that part of the script, you'll notice these
   characters @[.,\-a-z ]@i
   - look for the dot ( . ), remove the dot, so those characters will look
   like this @[,\-a-z ]@i (see the missing dot?)
   - then save the changes

then give the changes a try :). good luck and hope this help.


-- 
http://about.me/buitenzorg812


[Non-text portions of this message have been removed]



------------------------------------

--
Towards cyber libraries to support information society in Indonesia.
Joining ICS-isis by sending mailto:[email protected]
Visit ICS-Portal at http://digilib.binus.ac.id/ics/index.phpYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ics-isis/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ics-isis/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke