Sfoglia il codice sorgente

Merge branch 'develop'

master^2
Guillaume 3 anni fa
parent
commit
f0f34da279
2 ha cambiato i file con 17 aggiunte e 1 eliminazioni
  1. +13
    -1
      ShopBundle/Model/OrderShop.php
  2. +4
    -0
      ShopBundle/Model/Product.php

+ 13
- 1
ShopBundle/Model/OrderShop.php Vedi File

@@ -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 Vedi File

@@ -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…
Annulla
Salva