瀏覽代碼

ProductFamilySolver : vérification Section dans getProductCategoryChild()

develop
Guillaume 2 年之前
父節點
當前提交
12a042e28e
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      Solver/Product/ProductFamilySolver.php

+ 2
- 2
Solver/Product/ProductFamilySolver.php 查看文件

@@ -191,12 +191,12 @@ class ProductFamilySolver
}


public function getProductCategoryChild(ProductFamilyInterface $productFamily)
public function getProductCategoryChild(ProductFamilyInterface $productFamily, SectionInterface $section)
{
$productCategories = $productFamily->getProductCategories();

foreach ($productCategories as $productCategory) {
if ($productCategory->getParent()) {
if ($productCategory->getParent() && $productCategory->getSection() == $section) {
return $productCategory;
}
}

Loading…
取消
儲存