REQ Addon

Tunacha said:
i would lovce umore with the guide :p

Is there no readme? I thought I saw one in there.

BTW, I just noticed you posted in the wrong section. Note for next time. :)

Installation Procedure:

1. Do the following file edits:

Open the file "admincp/subscriptions.php" & search in it for the following code:
Code:
     	print_input_row($vbphrase['display_order'], 'sub[displayorder]', $sub['displayorder'], true, 5);

Add under it directly the following code:


Code:
// Subscription Certain Payment APIs
      	print_table_header($vbphrase['payment_api_manager'], 3);
      	$apiarray = array();
      	$apis = $db->query_read("
      		SELECT * FROM " . TABLE_PREFIX . "paymentapi
      	");
      	while ($api = $db->fetch_array($apis))
      	{
      		$apiarray[$api['classname']] = $api['title'];
      	}
      	print_select_row($vbphrase['paidsubcertainapi'], 'sub[paymentapi][]', $apiarray, $sub['paymentapi'] ?  unserialize($sub['paymentapi']): -1, false, 5, true);

In the same file "admincp/subscriptions.php" search for the following code:

Code:
      	$sub =& $vbulletin->GPC['sub'];

Add under it directly the following code:
Code:
    	// Subscription Certain Payment APIs
      	$sub['paymentapi'] = serialize($sub['paymentapi']);


Save the file admincp/subscriptions.php and upload it replacing the existing one.

Open the file "payments.php" and search in it for the following code:

Code:
$typetext = $method['classname'] . '_order_instructions';

Add under it directly the following code:
Code:
      				// Subscription Certain Payment APIs
      				$subapis = unserialize($sub['paymentapi']);
      				if (is_array($subapis) AND !empty($subapis) AND !in_array($method['classname'], $subapis))
      				{
      					continue;
      				}

Save the file "payments.php" and upload it replacing the existing one.
2. Import product's XML file from AdminCP.
3. Done.


Control:

* vBulletin AsminCP -> Paid Subscriptions -> Subscription Manager -> select a subscription -> Payment API Manager
 
Top