Pārlūkot izejas kodu

Ajout d'un fullTitle a product

packProduct
Fab pirms 2 gadiem
vecāks
revīzija
ef44c390ec
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. +10
    -0
      Solver/Product/ProductSolver.php

+ 10
- 0
Solver/Product/ProductSolver.php Parādīt failu

@@ -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()) {

Notiek ielāde…
Atcelt
Saglabāt