|
|
@@ -1,4 +1,5 @@
|
|
|
<?php
|
|
|
+use Illuminate\Database\Capsule\Manager as Capsule;
|
|
|
|
|
|
// this hook returns $addon->subscriptionid as $addon.code in smarty
|
|
|
|
|
|
@@ -6,13 +7,10 @@ if (!defined("WHMCS"))
|
|
|
die("This file cannot be accessed directly");
|
|
|
|
|
|
add_hook('ClientAreaProductDetailsPreModuleTemplate', 1, function($vars) {
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'ClientAreaProductDetailsPreModuleTemplate',
|
|
|
- __FUNCTION__,
|
|
|
- $vars,
|
|
|
- 'debug',
|
|
|
- ''
|
|
|
- );
|
|
|
-
|
|
|
+ foreach($vars['addons'] as $addon) {
|
|
|
+ $servicecode[$addon['id']] = Capsule::table('tblhostingaddons')
|
|
|
+ ->where('id', $addon['id'])
|
|
|
+ ->value('subscriptionid');
|
|
|
+ }
|
|
|
+ return array('servicecodes' => $servicecode);
|
|
|
});
|