(sorry for my english)
I have a problem.
I installed:
- Phpbb 3.0.6
- Ultimate pointn sysmtem 1.0.6
- Shop mod 1.0 b5
The problem is when i buy a item, the sytem take the money, but whan i go to the other page in my forum, the money return to the original number, the money no change, no substract money.
1) I have money:
2) I buy a item, and i pay the amount
3) Magically, i have my original amount.
Please help me.
Note: Ultimate Points uses decimals
UPDATE: SOLUTION
I saw 2 problems:
In shop_bs.php
Find
Code: Select all
'USER_POINTS' => (get_points($user->data['user_id']) - $row['cost']),
Replace with
Code: Select all
'USER_POINTS' => (get_points($user->data['user_id'])),
In functions_shop.php
Find
Code: Select all
else if (file_exists($phpbb_root_path . 'includes/points/points_common.' . $phpEx))
Replace with
Code: Select all
else if (file_exists($phpbb_root_path . 'includes/points/functions_points.' . $phpEx))
Note: "The user does not have enough points" no work
Find
Code: Select all
// The user does not have enough points
if ($user->data[USER_POINTS] < $amount)
{
$result = false;
}
else
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . USER_POINTS . ' = ' . USER_POINTS . ' - ' . $amount . '
WHERE user_id = ' . $user_id;
$db->sql_query($sql);
$result = true;
}
Replace with:
Code: Select all
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . USER_POINTS . ' = ' . USER_POINTS . ' - ' . $amount . '
WHERE user_id = ' . $user_id;
$db->sql_query($sql);
$result = true;
I hope this help anyone.
