Created
April 23, 2022 18:49
-
-
Save dlyamkin/5a3c5e260a34ac34cc50957a13705352 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/backend/product_features.php b/app/controllers/backend/product_features.php | |
index 3342ce6912..948936a331 100644 | |
--- a/app/controllers/backend/product_features.php | |
+++ b/app/controllers/backend/product_features.php | |
@@ -584,6 +584,10 @@ elseif ($mode === 'get_features_list') { | |
$search['exclude_feature_id'] = $_REQUEST['exclude_feature_ids']; | |
} | |
+ if (isset($_REQUEST['filter_category_ids'])) { | |
+ $search['category_ids'] = fn_get_category_ids_with_parent($_REQUEST['filter_category_ids']); | |
+ } | |
+ | |
list($features, $search) = fn_get_product_features($search, $page_size, $lang_code); | |
// This weird recursive functional code is efficient, but is not nicely readable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/design/backend/templates/addons/product_variations/views/product_variations/components/generate_variations.tpl b/design/backend/templates/addons/product_variations/views/product_variations/components/generate_variations.tpl | |
index 679b66e80e..3632a9306f 100644 | |
--- a/design/backend/templates/addons/product_variations/views/product_variations/components/generate_variations.tpl | |
+++ b/design/backend/templates/addons/product_variations/views/product_variations/components/generate_variations.tpl | |
@@ -15,7 +15,7 @@ | |
<div class="control-toolbar"> | |
<div class="control-toolbar__btns cm-variations-generator__features" id="variations_generator_features"> | |
<div class="control-toolbar__btns-center"> | |
- {$search_data = ["product_id" => $product_data.product_id, "purpose" => []]} | |
+ {$search_data = ["product_id" => $product_data.product_id, "filter_category_ids" => $product_data.category_ids, "purpose" => []]} | |
{$search_data["purpose"][] = $purpose_group_catalog_item} | |
{$search_data["purpose"][] = $purpose_group_variation_catalog_item} | |
{$search_data["exclude_feature_ids"] = $feature_ids} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment