|
|
@@ -11,6 +11,9 @@ add_hook('ClientAreaPageCart', 1, function($vars) {
|
|
|
return;
|
|
|
}
|
|
|
$active_pids = array();
|
|
|
+ $free_pids = array();
|
|
|
+ $card_pids = array();
|
|
|
+ $free_card_pids = array();
|
|
|
$clientId = $vars['clientsdetails']['id'];
|
|
|
// get client products
|
|
|
$clientProducts = localAPI('GetClientsProducts', array('clientid' => $clientId, 'stats' => false));
|
|
|
@@ -19,6 +22,15 @@ add_hook('ClientAreaPageCart', 1, function($vars) {
|
|
|
}
|
|
|
foreach($clientProducts['products']['product'] as $product) {
|
|
|
array_push($active_pids, $product['pid']);
|
|
|
+ if($product['billingcycle'] == 'Free Account' && $product['status'] == 'Active') {
|
|
|
+ array_push($free_pids, $product['pid']);
|
|
|
+ }
|
|
|
}
|
|
|
- return array('clientPids' => $active_pids);
|
|
|
+ foreach($_SESSION['cart']['products'] as $item) {
|
|
|
+ array_push($card_pids, $item['pid']);
|
|
|
+ if($item['billingcycle'] == null) {
|
|
|
+ array_push($free_card_pids, $item['pid']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return array('clientPids' => $active_pids, 'clientActiveFree' => $free_pids, 'clientCard' => $card_pids, 'clientCardFree' => $free_card_pids);
|
|
|
});
|