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

Fix numeric attributes not returned. Issue #74 #98

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ccraig
Copy link

@ccraig ccraig commented Feb 28, 2024

Numeric attributes are not stored in the Item Attribute Value table so they are never returned by get_attributes_and_values(). For reference, they are stored in Item Attribute table.

However, they are included in item_variants_data which is then loaded into valid_options. If they are not found in ordered_attribute_value_map sort and add them to it.

This does not include the entire range if there is no product associated with specific number. Only possible selectable values are returned so that the user doesn't waste time selecting a number that is not available.

For example, if the range is incremented by 1 for 1 to 100 but there are only variants for 1,20, and 37, the selectable options returned will be [1,20,37] instead of [1,2,3,...,99, 100] and making the user guess which item is available.

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.

1 participant