Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #167827 fix: Showing incomplete vendor profile #126

Open
wants to merge 1 commit into
base: release-1.4.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/com_tjvendors/site/includes/vendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deepgawade89 you want to check 2 things here. First - send payment directly to the vendor is enabled or not.
OR
Second - Adaptive/split payment gateway is getting used by the client (JT/JGive)

{
$total += (!empty($data->payment_gateway)) ? 5: 0;
}
elseif ($sendPaymentsToOwner == '1')
{
$total += 5;
}

return $total;
}
Expand Down