-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Issue: ready for confirmationReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.
Description
This issue is automatically created based on existing pull request: #40175: Fix: getSalableVariantsByParent hook up cataloginventory/options/show_out_of_stock setting
Issue
The function getSalableVariantsByParent
does not abide by the admin setting cataloginventory/options/show_out_of_stock
When OOS is set to Yes, the resolver does not return OOS variants.
Resolution
Load in config scope interface and pull value and apply to filters
Debug/Replication
Toggle show/hide oos items via magento admin config and check results contain stock_status = OUT_OF_STOCK or not
query DebugStockVariants($sku: String!) {
products(filter: {sku: {eq: $sku}}) {
items {
__typename
uid
sku
name
... on SimpleProduct {
quantity
only_x_left_in_stock
stock_status
}
... on ConfigurableProduct {
variants {
product {
name
sku
quantity
only_x_left_in_stock
stock_status
}
}
}
}
}
}
Select some options and check variant results abides by admin setting
query DebugConfigurableOptions($urlKey: String!, $selectedOptions: [ID!] = []) {
products(filter: {url_key: {eq: $urlKey}}) {
items {
... on ConfigurableProduct {
configurable_product_options_selection(
configurableOptionValueUids: $selectedOptions
) {
configurable_options {
attribute_code
values {
label
uid
}
}
options_available_for_selection {
attribute_code
option_value_uids
}
}
}
}
}
}
(patch attached for convinence)
magento-module-configurable-product-graph-ql-get-available-selections.patch
Metadata
Metadata
Assignees
Labels
Issue: ready for confirmationReported on 2.4.xIndicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.
Type
Projects
Status
Ready for Confirmation