瀏覽代碼

Ajout d'un fullTitle a product

packProduct
Fab 2 年之前
父節點
當前提交
ef44c390ec
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      Solver/Product/ProductSolver.php

+ 10
- 0
Solver/Product/ProductSolver.php 查看文件

@@ -126,6 +126,16 @@ class ProductSolver
}
}

public function getFullTitle(ProductInterface $product)
{
if ($product->getTitle()) {
$endOfTitle = $product->getTitle();
} else {
$endOfTitle = $this->getQuantityInherited($product).' '.$this->getUnitInherited($product)->getWordingShort();
}
return $product->getProductFamily()->getTitle(). ' - '. $endOfTitle;
}

public function getQuantityInherited(ProductInterface $product)
{
if ($product->getQuantity()) {

Loading…
取消
儲存