Skip to content

Conversation

@hrath2015
Copy link
Collaborator

Resolves #4467
Impact: minor
Type: bugfix

Issue

When a Product is made visible and published without any Variant, Catalog customer gets price range as $NaN.undefined - $-NaN.undefined

Solution

Included a condition in Products Publication to base catalog selector to not include products with empty variants. Products without any Variant does not make any sense to end customer till it is complete. Let Admin work on the product in meantime and publish as many times as needed, customer will see only when product has at least 1 variant in Catalog.

Testing

From this branch start the app, login as admin, create a product by entering title, subtitle, vendor and description only( no variant detail). Make visible and publish.
Logout as admin and see product should not be displayed on homepage.

Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

It would be better to not put these in the catalog in the first place. We don't support selling a product that has no variants afaik.

We could throw in /imports/plugins/core/catalog/server/no-meteor/utils/publishProductToCatalog.js, or just make sure there is a minCount: 1 on the catalog schema, which is checked already. (Side note: It looks like we're catching and ignoring schema validation errors in that function, which we should not be doing.)

@aldeed aldeed changed the base branch from release-1.14.0 to release-1.15.0 August 2, 2018 03:09
@kieckhafer
Copy link
Member

Closing in favor of #4518

@kieckhafer kieckhafer closed this Aug 7, 2018
@aldeed aldeed deleted the fix-4467-hrath2015-PriceUndefined branch January 24, 2019 20:11
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.

4 participants