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

WZ-4212: Added more details in Wizzy section on Product Details Page … #145

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

smit-kandiya
Copy link
Collaborator

…- When a Product is Skipped

@smit-kandiya smit-kandiya requested a review from alok0590 October 18, 2024 11:25
@smit-kandiya smit-kandiya force-pushed the WZ-4212 branch 5 times, most recently from da27dfe to 3308aa4 Compare October 18, 2024 11:43
foreach ($entitiesSyncStatus as $entitySyncStatus) {
$entitiesSyncStatus_[] = [
"id" => $entitySyncStatus['id'],
"entity_id" => $entitySyncStatus['entity_id'],
Copy link
Member

Choose a reason for hiding this comment

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

Remove non required details

"updated_at" => $entitySyncStatus['updated_at'],
"skipped_data" => ($skippedEntitiesData && !empty($skippedEntitiesData['entity_data']))
? $skippedEntitiesData['entity_data']
: "",
Copy link
Member

Choose a reason for hiding this comment

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

Keep it null if not found.

@@ -57,4 +61,21 @@ public function deleteSkippedEntities($entityIds, $storeId, $entityType = self::

return $entities;
}
public function getSkippedEntities($storeId, $entityId, $entityType = null)
Copy link
Member

Choose a reason for hiding this comment

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

getSkippedEntityById

$collection->addFieldToFilter('entity_type', $entityType);
}

$entityDataArray = [];
Copy link
Member

Choose a reason for hiding this comment

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

$skippedEntities


$entityDataArray = [];
foreach ($collection->getItems() as $item) {
$entityDataArray['entity_data'] = $item->getData('entity_data');
Copy link
Member

Choose a reason for hiding this comment

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

Remove entity_data
A entity can be skipped for multiple store. Check what happens for the case.

<b><?= $block->escapeHtml('In sync'); ?></b>
<?php
} elseif ($sync['status'] == -1) { ?>
<b><?= $block->escapeHtml('No entities to be synced!'); ?></b>
Copy link
Member

Choose a reason for hiding this comment

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

Product is not added in sync yet.

<b><?= $block->escapeHtml('No entities to be synced!'); ?></b>
<?php
} elseif ($sync['skipped_data']) { ?>
<b><?= $block->escapeHtml('Product Skipped!'); ?></b>
Copy link
Member

Choose a reason for hiding this comment

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

Product Skipped during Sync

@smit-kandiya smit-kandiya force-pushed the WZ-4212 branch 2 times, most recently from 444a6bf to 9663651 Compare October 22, 2024 12:47
@smit-kandiya smit-kandiya requested a review from alok0590 October 22, 2024 12:48
@@ -4,7 +4,7 @@

class WizzyAPIEndPoints
{
const BASE_END_POINT = "https://api.wizsearch.in/v1";
const BASE_END_POINT = "https://testing.api.wizzy.ai/v1";
Copy link
Member

Choose a reason for hiding this comment

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

Remove this change


return $syncResults;
}
return [$entitiesSyncStatus_];
Copy link
Member

Choose a reason for hiding this comment

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

You're sending array of array.Won't this break functionalities on frontend ?

@alok0590 alok0590 merged commit c525d98 into dev Dec 23, 2024
2 checks passed
@alok0590 alok0590 deleted the WZ-4212 branch December 23, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants