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

Fixed: incorrect icon besides shopify listing count message for products not in category but having incorrect listing (#260) #261

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 4 additions & 1 deletion src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,10 @@ export default defineComponent({
const shopListings = this.shopListings.filter((shopListing: any) => shopListing.shopifyShopProductId)
// Checking if we have the data
const shopListingsWithMissingData = shopListings.filter((shopifyListing: any) => !shopifyListing.status)
return !(shopListingsWithMissingData.length > 0) && ((this.poSummary.eligible && shopListings.length === this.poSummary.listedCount) || (!this.poSummary.eligible && shopListings.length !== this.poSummary.listedCount))
// returning true if no missing data is there and either the product is eligible and is listed on all stores
// or the product is not eligible and is not listed on any store (no need to check shop listing for that
// product as listing count check is enough)
return !(shopListingsWithMissingData.length > 0) && ((this.poSummary.eligible && shopListings.length === this.poSummary.listedCount) || (!this.poSummary.eligible && this.poSummary.listedCount === 0))
},
prepareListingCountStatusMsg() {
// Checking if it is linked
Expand Down
Loading