The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Please, excuse my bad English.
This hack allows to assign to paid subscriptions a discount for selected usergroups. It is a very requested hack and I was tired to wait that somebody writes it. The problem is that I don?t know to code ![]() It has two ?minor? bugs and a very important bug: Minor bugs: 1) The discount is the same for all currencies (dollars, pounds, euros). It?s only a problem if you have prices in more than one currency. 2) The format of the cost changes from (for example) $5.00 to $5 (without the .00) if discount is applied. It is an aesthetic bug. The very important bug: 3) The transaction with paypal goes OK, the user pays his subscription (with discount), he receives his receipt, he returns to the forum but no subscription it is applied to the user or writen in the database. As the doctors say: the surgery has been a success but the patient has died. Is this forum the correct place and somebody can help me with this hack? Thanks in advance |
#2
|
||||
|
||||
![]()
First very important question. Do your non-discounted subscriptions work?
|
#3
|
|||
|
|||
![]()
Very good question, I see
![]() If discount = 0, OK If discount = "", OK If discount exists and user is not in usergroups with discount, OK if discount exist and user has discount, FAIL Thanks for your interest. |
#4
|
||||
|
||||
![]()
Next question. Look at the code where payments are accepted. In the area where it verifies the transaction and makes the usergroup switch, etc. does it check to see if the received payment equals the subscription amount that you established?
It looks like it does on this line in paypal.php Code:
$cost = unserialize($sub['cost']); |
#5
|
|||
|
|||
![]()
I have edited 3 files:
/includes/function_subscriptions.php /admincp/subscriptions.php /forum/subscriptions.php but not paypal.php file. Must I edit it? Please, which values/variables are compared? |
#6
|
||||
|
||||
![]()
I showed you the line. And, the file you edit depends on the type of subscription service you are using.
If you are using paypal, change that line so that the cost is equal to the base cost or the discounted cost. Then, it will pass that cost off to the build_subscriptions function and you should be good to go. |
#7
|
|||
|
|||
![]()
Thank you very much, as coder I am a pity but I´ll try.
Thanks again. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|