Selaa lähdekoodia

Merge branch 'develop'

master^2
Guillaume 3 vuotta sitten
vanhempi
commit
f0f34da279
2 muutettua tiedostoa jossa 17 lisäystä ja 1 poistoa
  1. +13
    -1
      ShopBundle/Model/OrderShop.php
  2. +4
    -0
      ShopBundle/Model/Product.php

+ 13
- 1
ShopBundle/Model/OrderShop.php Näytä tiedosto

@@ -303,8 +303,20 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa
/**
* @return Collection|OrderPayment[]
*/
public function getOrderPayments(): Collection
public function getOrderPayments($meanPayment = null): Collection
{
if($meanPayment) {
$orderPaymentsReturn = new ArrayCollection() ;

foreach($this->orderPayments as $orderPayment) {
if($orderPayment->getMeanPayment() == $meanPayment) {
$orderPaymentsReturn[] = $orderPayment ;
}
}

return $orderPaymentsReturn ;
}

return $this->orderPayments;
}


+ 4
- 0
ShopBundle/Model/Product.php Näytä tiedosto

@@ -66,6 +66,10 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod
$title .= ' - ' . $this->getTitle();
}

if($this->getProductFamily()->hasProductsWithVariousWeight()) {
$title .= ' - '.$this->getQuantityLabelInherited() ;
}

return $title;
}


Loading…
Peruuta
Tallenna