From c8ca338d68ad2bcffe6f4cd2aa7a378c726e1754 Mon Sep 17 00:00:00 2001 From: Deepa Gawade Date: Thu, 14 Jan 2021 11:24:56 +0530 Subject: [PATCH] Bug #167827 fix: Showing incomplete vendor profile --- src/com_tjvendors/site/includes/vendor.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/com_tjvendors/site/includes/vendor.php b/src/com_tjvendors/site/includes/vendor.php index 43ae3cce..c0557b05 100644 --- a/src/com_tjvendors/site/includes/vendor.php +++ b/src/com_tjvendors/site/includes/vendor.php @@ -636,14 +636,15 @@ public function getCity() /** * This function return vendor profile complete/incomplete status * - * @param Integer $userId userId - * @param Integer $client client + * @param Integer $userId userId + * @param Integer $client client + * @param String $sendPaymentsToOwner send payment directly to owner configuration field value * * @return Interger Percentage of vendor profile completion * * @since 1.4.0 */ - public function getVendorProfileStatus($userId, $client) + public function getVendorProfileStatus($userId, $client, $sendPaymentsToOwner = '0') { $data = $this->loadByUserId($userId, $client); @@ -660,7 +661,15 @@ public function getVendorProfileStatus($userId, $client) $total += (!empty($data->vat_number)) ? 5: 0; $total += (!empty($data->vendor_description)) ? 5: 0; $total += (!empty($data->vendor_logo))? 5: 0; - $total += (!empty($data->payment_gateway)) ? 5: 0; + + if ($sendPaymentsToOwner == '0') + { + $total += (!empty($data->payment_gateway)) ? 5: 0; + } + elseif ($sendPaymentsToOwner == '1') + { + $total += 5; + } return $total; }