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

Text swatch "zero" not shown #7673

Closed
imgali opened this issue Dec 5, 2016 · 7 comments
Closed

Text swatch "zero" not shown #7673

imgali opened this issue Dec 5, 2016 · 7 comments
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@imgali
Copy link

imgali commented Dec 5, 2016

Steps to reproduce

  1. Create configurable product which has storefront text attribute with value "0" (zero) - let it be size for dress
  2. Navigate to category page

Expected result

  1. See the size "0" with other sizes (0, 2, 4, 6 etc)

Actual result

  1. Size "0" (zero) doesn't render

admin_product

front

@wert2all
Copy link
Contributor

wert2all commented Dec 5, 2016

Created internal issue MAGETWO-61828 to investigate and track this issue.

@imgali
Copy link
Author

imgali commented Dec 6, 2016

@wert2all, we found a solution to this.

Originally in /module-swatches/Helper/Data.php on line 412 there is a IF statement thats checking $item['value'] and it checks the value like this:

elseif ($item['store_id'] == $currentStoreId && $item['value'])

I think it should be:

elseif ($item['store_id'] == $currentStoreId && $item['value'] != '')

Cause when our swatch value is "0" (zero) it thinks that the second value ($item['value']) is FALSE (zero)

@vzabaznov vzabaznov added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Dec 9, 2016
@vzabaznov
Copy link
Contributor

Hi @imgali please fell free to create PR for this

@mkoperator
Copy link

This appears to still be an issue in 2.1.5

@orozcodiaz
Copy link
Contributor

@thecrazyrussian I made a pull request already and it was approved. Just use quick fix from @imgali message for now.

@mkoperator
Copy link

Thank you @oroskodias

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added Fixed in 2.3.x The issue has been fixed in 2.3 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line labels Sep 21, 2017
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Sep 21, 2017

@imgali Closing this issue for now due to fix is already available in 2.2-develop and develop branches. Thank you @oroskodias for the Pull Request and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants