Vodes with cents
- Triky
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
15 years 10 months ago - 15 years 10 months ago #3768
by Triky
Thank you for this free extension, it was very useful!
On my website I need to see the money (euro) that my customers pay in cash or by paypal.
I'm using the "PayPal IPN system" and also I have to add the cash manually in the back-end menu Component/ Vodes / Credits.
The relation I need is 1 euro = 1 Vodes, and I also need to have the cents in the accounts, for example, 1.6 euro must not become 1 or 2 Vodes but remain 1.6 Vodes.
Can you help me? I'm not very good to use PHP!
For paypal payment , I believe this changes, in the file "vodes.php", should be enough:
$credit = ceil($payment_amount)*10;
to
$credit = $payment_amount;
but, for the manual insertion in Vodes/Credits/Edit, I don't find the functions "ceil, floor, round", I don't know how to avoid that the figures will be rounded.
I think the problem is simple to resolve for those who know PHP, but I'm not able to do it, I hope you can
help me!
Thank you.
Triky
Italy
On my website I need to see the money (euro) that my customers pay in cash or by paypal.
I'm using the "PayPal IPN system" and also I have to add the cash manually in the back-end menu Component/ Vodes / Credits.
The relation I need is 1 euro = 1 Vodes, and I also need to have the cents in the accounts, for example, 1.6 euro must not become 1 or 2 Vodes but remain 1.6 Vodes.
Can you help me? I'm not very good to use PHP!
For paypal payment , I believe this changes, in the file "vodes.php", should be enough:
$credit = ceil($payment_amount)*10;
to
$credit = $payment_amount;
but, for the manual insertion in Vodes/Credits/Edit, I don't find the functions "ceil, floor, round", I don't know how to avoid that the figures will be rounded.
I think the problem is simple to resolve for those who know PHP, but I'm not able to do it, I hope you can
help me!
Thank you.
Triky
Italy
Last Edit: 15 years 10 months ago by Triky.
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
15 years 10 months ago #3774
by Saka
Emir Sakic
www.sakic.net
I think the main problem is that the credit is defined as integer in the database table:
`credit` int(11) NOT NULL default '0'
so you can't have it as float.
You should change this to varchar or something in the manifest (vodes.xml) first and then reinstall.
`credit` int(11) NOT NULL default '0'
so you can't have it as float.
You should change this to varchar or something in the manifest (vodes.xml) first and then reinstall.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.