andre 3 ani în urmă
părinte
comite
4aeb28ff9c
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      getorderdetails.php

+ 6 - 1
getorderdetails.php

@@ -80,7 +80,9 @@ $serviceIds = Capsule::table('tblhosting')
     ->get('id');
 // gathering informations of products
 $order_details['products'] = array();
+$serviceIdsArray = array();
 foreach($serviceIds as $serviceId) {
+    array_push($serviceIdsArray, $serviceId->id);
     unset($service_details);
     $service[$serviceId->id] = localAPI('GetClientsProducts', array('serviceid' => $serviceId->id));
     $service_details['id'] = $serviceId->id;
@@ -215,7 +217,7 @@ foreach($serviceIds as $serviceId) {
 // gathering informations of addons bought without buying a product
 $addons = Capsule::table('tblhostingaddons')
     ->where('orderid', $orderid)
-    ->whereNotIn('hostingid', $serviceIds)
+    ->whereNotIn('hostingid', $serviceIdsArray)
     ->get();
 $order_details['addons'] = array();
 foreach($addons as $addon) {
@@ -265,6 +267,9 @@ foreach($domains as $domain) {
     $domain_details['id'] = $domain->id;
     $domain_details['name'] = $domain->domain;
     $domain_details['type'] = $domain->type;
+    if(!empty($domain->registrar)) {
+        $domain_details['registrar'] = $domain->registrar;
+    }
     $domain_details['period'] = $billingterm[(string)$domain->registrationperiod];
     $tld = end(explode(".", $domain->domain));
     $tldPricing = localAPI('GetTLDPricing', array('currencyid' => $currencyId));