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

Product labels new and sale use an incorrect boolean type #3800

Closed
2 of 5 tasks
themreza opened this issue Nov 11, 2019 · 5 comments
Closed
2 of 5 tasks

Product labels new and sale use an incorrect boolean type #3800

themreza opened this issue Nov 11, 2019 · 5 comments
Labels
1: Easy bug Bug reports
Milestone

Comments

@themreza
Copy link
Contributor

themreza commented Nov 11, 2019

Current behavior

The vue-storefront/core/modules/catalog/components/ProductTile.ts component looks for two fields in the ElasticSearch product record to decide if the new and sale labels should be displayed on each product.

The checks for these fields assumes the fields to be of type string with an exact value of '1'.

image

Expected behavior

The fields should accept the standard true / false boolean types as input.

Steps to reproduce the issue

Repository

https://github.com/DivanteLtd/vue-storefront/blob/release/v1.11/core/modules/catalog/components/ProductTile.ts#L37

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser:
  • OS:
  • Node:
  • Code Version:

Additional information

@themreza themreza added the bug Bug reports label Nov 11, 2019
@andrzejewsky andrzejewsky added this to the 1.11.0 milestone Nov 11, 2019
@andrzejewsky
Copy link
Contributor

thanks for reporting @themreza, actually we've fixed something similar, looks like easy to fix

@WaleedTikken
Copy link

It has been fixed along with the product display on latest option. :)

@WaleedTikken
Copy link

Just changed the default sort to

"sort": "updated_at",
instead of

"sort": "updated_at:desc",

@themreza
Copy link
Contributor Author

themreza commented Nov 12, 2019

Just changed the default sort to

"sort": "updated_at",
instead of

"sort": "updated_at:desc",

What does the sort order have to do with new and special labels?

If it was fixed, would you please share the link to the new ProductTile.ts?

@andrzejewsky
Copy link
Contributor

@WaleedTikken we've fixed issue with the sorting functionality on the category page and nothing else, this is about the isOnSale or isNew - it won't work if the value is different than '1' @themreza is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1: Easy bug Bug reports
Projects
None yet
Development

No branches or pull requests

4 participants